UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor wittich
Visitor
1,217 Views
Registered: ‎11-10-2017

problem with connecting to a socket on Petalinux 2017.2

Jump to solution

Hi, I'm trying to build the xvcServer code for a petalinux 2017.2 installation on an Enclustra ZX2, using a custom base board. The code is based on the XAPP1251 code.

 

I can get the code to compile and build, and networking works fine on the Zynq. I can ssh to and from the machine, copy files back and forth, no problem.

 

I try to connect to the server from a remote machine on the network using the command 

 

open_hw_target -xvc_url 192.168.38.200:2542

that times out. On the console on the Zynq, where I launched the command, I see the following message: 

TCP: request_sock_TCP: Possible SYN flooding on port 2542. Dropping request.  Check SNMP counters.

but I never see an ack (I'm running in verbose mode, and I seem to get stuck in the blocking call

    if (select(maxfd + 1, &read, 0, &except, 0) < 0) {
      perror("select");
      break;
    }

I try to just blast the server with some traffic using netcat  from a different machine and the same error occurs. So the Zynq is seeing the network traffic, but it never gets to the server code.

 

 

If I run the same code compiled with vanilla gcc on my linux x86 box the same netcat trick gets past the select and instead complains about an error message.  So on the linux box it works as expected.

 

I've tried to much with various things in sysctl or puzzle about what network kernel configurations I have done wrong, but so far no luck.

 

Any suggestions would be greatly appreciated!

sol 

0 Kudos
1 Solution

Accepted Solutions
Moderator
Moderator
1,693 Views
Registered: ‎12-04-2016

Re: problem with connecting to a socket on Petalinux 2017.2

Jump to solution

Hi

 

Try to increase listen backlog from 0 to 5 in the XVC application and see if this issue goes away.
------------------------------
if (listen(s, 5) < 0) 

 

 

Best Regards

Shabbir

View solution in original post

2 Replies
Moderator
Moderator
1,694 Views
Registered: ‎12-04-2016

Re: problem with connecting to a socket on Petalinux 2017.2

Jump to solution

Hi

 

Try to increase listen backlog from 0 to 5 in the XVC application and see if this issue goes away.
------------------------------
if (listen(s, 5) < 0) 

 

 

Best Regards

Shabbir

View solution in original post

Visitor wittich
Visitor
1,154 Views
Registered: ‎11-10-2017

Re: problem with connecting to a socket on Petalinux 2017.2

Jump to solution

Thanks a lot, @shabbirk, that seems to have solved the problem. I am not an expert in socket programming, so I am learning something.

 

Is it clear why this change would be needed on an ARM platform and not an x86 platform? (They are also running different kernels - the x86 is running scientific linux with a 3.10 kernel, so maybe that is the difference.)

 

Finally just let me say that it would be great if XAPP1252 got updated to a current version of the tools. There are enough changes (e.g. for the UIO drivers) that maybe an update is called for.

 

Best 

Sol

0 Kudos