cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
1,773 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
Highlighted
Moderator
Moderator
2,249 Views
Registered: ‎12-04-2016

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

3 Replies
Highlighted
Moderator
Moderator
2,250 Views
Registered: ‎12-04-2016

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

Highlighted
Visitor
Visitor
1,710 Views
Registered: ‎11-10-2017

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
Highlighted
Contributor
Contributor
330 Views
Registered: ‎06-17-2020

thanks ,it is very greatful to use this solution.

thanks again!!!

0 Kudos