FDio / govpp

Go toolset for the VPP.
Apache License 2.0
192 stars 81 forks source link

gomemif: Packet sent on Tx queue is received back on Rx queue of sender #164

Closed nikhil-agarwal-git closed 8 months ago

nikhil-agarwal-git commented 10 months ago

Hi,

I am hitting an issue where in Tx packet send is received back in sender's Rx queue intermittently. And this behavior is observed both on govpp as well as vpp side.

Setup details : Gomemif in slave mode and vpp in master mode with single pair of queues. Gomemif is latest and VPP release is 21.10.1

Packets are being pumped from both master(from vpp side) and slaves(from gomemif) simultaneously and rate is roughly 100/s each side.

On further digging in the gomemif code, I see that Rx descriptor's buffers offset are set to Tx descriptors buffer offset instead of seperate buffers even though region(shared memory) for sepearte Tx and Rx rings,descriptors and buffers is allocated. This also leads to use of only half of the total descriptors allocated.

I tried with a minor fix(attached-gomemif-descriptor-fix.txt) with which I was able use separate buffers for Tx and Rx and get around this issue. After this fix, no such issue was observed on even 1000/s rate for longer runs(more than 12 hrs) I can push this fix for review incase required or can wait for fix from contributors. Either way is fine.

gomemif-descriptor-fix.txt

ondrej-fabry commented 10 months ago

Hello, thanks for the information. If you have managed to implement a fix, feel free to open a PR.

nikhil-agarwal-git commented 10 months ago

ok.will do