Re: Can multiple apps listen for TCP on the same port?

2014-12-01 Thread Someone Somewhere
backlog is more than one since nc can wait for multiple connections via -k option(and also because backlog value is hard coded). https://www.freebsd.org/cgi/man.cgi?query=nc&apropos=0&sektion=0&manpath=FreeBSD+10.1-RELEASE&arch=default&format=html On 2 December 2014 at 11:26, Yuri wrote: > On 1

Re: Can multiple apps listen for TCP on the same port?

2014-12-01 Thread Yuri
On 12/01/2014 20:22, Someone Somewhere wrote: I think backlog value has no direct implication here. What matters is if the listening socket has been closed after accepting the client connection or not. -Kunal. I think backlog >1 in one-user one-connect app (as nc) might catch other connections

Re: Enabling VIMAGE in GENERIC

2014-12-01 Thread George Neville-Neil
On 1 Dec 2014, at 23:12, Julian Elischer wrote: On 12/2/14, 12:07 PM, George Neville-Neil wrote: On 30 Nov 2014, at 5:04, Julian Elischer wrote: On 11/29/14, 5:28 PM, Craig Rodrigues wrote: On Mon, Nov 24, 2014 at 9:03 AM, Julian Elischer mailto:jul...@freebsd.org>> wrote: > > > also look a

Re: Can multiple apps listen for TCP on the same port?

2014-12-01 Thread Someone Somewhere
I think backlog value has no direct implication here. What matters is if the listening socket has been closed after accepting the client connection or not. -Kunal. On 2 December 2014 at 07:32, Yuri wrote: > I figured it out. This is 'nc' from the base, imported from OpenBSD 5.6. > > nc has two f

Re: Enabling VIMAGE in GENERIC

2014-12-01 Thread Julian Elischer
On 12/2/14, 12:07 PM, George Neville-Neil wrote: On 30 Nov 2014, at 5:04, Julian Elischer wrote: On 11/29/14, 5:28 PM, Craig Rodrigues wrote: On Mon, Nov 24, 2014 at 9:03 AM, Julian Elischer mailto:jul...@freebsd.org>> wrote: > > > also look at the following: (a little dated) > > http://p4we

Re: Enabling VIMAGE in GENERIC

2014-12-01 Thread George Neville-Neil
On 30 Nov 2014, at 5:04, Julian Elischer wrote: On 11/29/14, 5:28 PM, Craig Rodrigues wrote: On Mon, Nov 24, 2014 at 9:03 AM, Julian Elischer > wrote: > > > also look at the following: (a little dated) > > http://p4web.freebsd.org/@md=d&cd=//depot/projects/vimage/&cd

Re: Can multiple apps listen for TCP on the same port?

2014-12-01 Thread Yuri
I figured it out. This is 'nc' from the base, imported from OpenBSD 5.6. nc has two flaws in its code: it listens with backlog=5 (not 1), and it doesn't close the listening socket after accept, only after client is done communicating. Fixing these two problems makes my app work. I first confu

Re: Problems with Intel X520-SR2

2014-12-01 Thread Marcelo Gondim
Hi Jeffrey, On 01/12/2014 19:29, Pieper, Jeffrey E wrote: Hi Marcelo, A couple of questions - you are using 1310nm fiber on ix0, correct? The difference seems to be that ix0 is LR and ix1 is SR. Also, is there a reason that the interrupt rate is set higher for ix0? dev.ix.0.queue0.interrupt_

Re: How do I use net-mgmt/unifi{2,3,4} for Ubiquity UAP-PRO?

2014-12-01 Thread Mark Felder
Hi David, The port installs an rc script so you can automate launching the service. I've seen on some systems that it takes a very long time (15 minutes!) for the web interface to become accessible because java is stuck in some weird "gettimeofday()" loop. I haven't seen it with recent openjdk/uni

Re: Can multiple apps listen for TCP on the same port?

2014-12-01 Thread Adrian Chadd
On 1 December 2014 at 09:03, Joe Holden wrote: > Was there a specific reason why we couldn't just extend REUSEADDR/PORT to do > this a la Linux? Just a simple round robin would make those useful perhaps Because REUSEADDR/REUSEPORT have different meanings, doubly so if you're using multicast. I c

RE: Problems with Intel X520-SR2

2014-12-01 Thread Pieper, Jeffrey E
Hi Marcelo, A couple of questions - you are using 1310nm fiber on ix0, correct? The difference seems to be that ix0 is LR and ix1 is SR. Also, is there a reason that the interrupt rate is set higher for ix0? dev.ix.0.queue0.interrupt_rate: 5 dev.ix.1.queue0.interrupt_rate: 11627 Jeff

[Differential] [Abandoned] D1251: Test, please ignore.

2014-12-01 Thread rpaulo (Rui Paulo)
rpaulo abandoned this revision. REVISION DETAIL https://reviews.freebsd.org/D1251 To: rpaulo Cc: freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-u

[Differential] [Request, 2 lines] D1251: Test, please ignore.

2014-12-01 Thread rpaulo (Rui Paulo)
rpaulo created this revision. rpaulo added a subscriber: freebsd-net. REVISION SUMMARY Test. BRANCH /head REVISION DETAIL https://reviews.freebsd.org/D1251 AFFECTED FILES COPYRIGHT To: rpaulo Cc: freebsd-net ___ freebsd-net@freebsd.org mailin

Re: Problems with Intel X520-SR2

2014-12-01 Thread Marcelo Gondim
On 30/11/2014 22:37, Marcelo Gondim wrote: Hi Jack, On 30/11/2014 16:20, Jack Vogel wrote: Good suggestions, do you ever see any 'interrupt throttled' messages? You might want to change the storm threshold to 0 and disable it. I can try this: sysctl hw.intr_storm_threshold=0 Hi Jack, Same

Re: Can multiple apps listen for TCP on the same port?

2014-12-01 Thread Joe Holden
Was there a specific reason why we couldn't just extend REUSEADDR/PORT to do this a la Linux? Just a simple round robin would make those useful perhaps On 01/12/2014 16:21, Adrian Chadd wrote: Hi, I introduced a socket option in -HEAD that lets you bind multiple things to the same listen port

Re: Can multiple apps listen for TCP on the same port?

2014-12-01 Thread Adrian Chadd
Hi, I introduced a socket option in -HEAD that lets you bind multiple things to the same listen ports. They're only load balanced if you're using RSS and set up RSS socket options as well; otherwise only one gets the incoming requests. IP_BINDMULTI and IP6_BINDMULTI. -a On 1 December 2014 at

Re: Can multiple apps listen for TCP on the same port?

2014-12-01 Thread Someone Somewhere
@Yuri , are you sure that the second instance of nc does not accept any connection? I did a simple test : -> #: nc -l 12345 (shell 1) #: nc localhost 12345 (shell2) at this point netstat shows that there is no one listening on 12345. This means any process should not be able to bind over port 12345

Re: Can multiple apps listen for TCP on the same port?

2014-12-01 Thread Karl Denninger
The second bind() call does fail but if the application ignores the return code...‎. Are you sure all the associated system call return codes are being checked? The right way to do this Imho  is to have a parent process that calls bind and listen, gets the notification of an incoming connection

Re: Can multiple apps listen for TCP on the same port?

2014-12-01 Thread Yuri
On 12/01/2014 07:02, Daniel Corbe wrote: Generally the answer to your question is no. Two applications cannot occupy the same port on the same protocol at the same time. To expand on this answer and to hopefully shed some light on why the behavior you're observing with your application is absol

Re: Can multiple apps listen for TCP on the same port?

2014-12-01 Thread Daniel Corbe
Generally the answer to your question is no. Two applications cannot occupy the same port on the same protocol at the same time. To expand on this answer and to hopefully shed some light on why the behavior you're observing with your application is absolutely correct; the calling application (in

Can multiple apps listen for TCP on the same port?

2014-12-01 Thread Yuri
I have a simple 'nc' based TCP server with shell script serving http protocol. But when I run the second instance, it never gets any connections and never fails. 'nc -l PORT' first calls listen with backlog=1 and socket option SO_REUSEADDR, and then calls accept. Once client is accepted, it cl