> -----Original Message----- > From: Intel-wired-lan <[email protected]> On Behalf Of > Magnus Karlsson > Sent: Friday, March 19, 2021 3:14 PM > To: Karlsson, Magnus <[email protected]>; intel-wired- > [email protected]; Nguyen, Anthony L <[email protected]>; > Fijalkowski, Maciej <[email protected]> > Cc: [email protected]; Joshi, Sreedevi <[email protected]> > Subject: [Intel-wired-lan] [PATCH intel-net] i40e: fix receiving of single > packets > in xsk zero-copy mode > > From: Magnus Karlsson <[email protected]> > > Fix so that single packets are received immediately instead of in batches of > 8. > If you sent 1 pss to a system, you received 8 packets every 8 seconds instead > of 1 packet every second. The problem behind this was that the work_done > reporting from the Tx part of the driver was broken. The work_done > reporting in i40e controls not only the reporting back to the napi logic but > also the setting of the interrupt throttling logic. When Tx or Rx reports > that it > has more to do, interrupts are throttled or coalesced and when they both > report that they are done, interrupts are armed right away. If the wrong > work_done value is returned, the logic will start to throttle interrupts in a > situation where it should have just enabled them. This leads to the undesired > batching behavior seen in user-space. > > Fix this by returning the correct boolean value from the Tx xsk zero-copy > path. Return true if there is nothing to do or if we got fewer packets to > process than we asked for. Return false if we got as many packets as the > budget since there might be more packets we can process. > > Fixes: 3106c580fb7c ("i40e: Use batched xsk Tx interfaces to increase > performance") > Reported-by: Sreedevi Joshi <[email protected]> > Signed-off-by: Magnus Karlsson <[email protected]> > --- > drivers/net/ethernet/intel/i40e/i40e_xsk.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >
Tested-by: Kiran Bhandare <[email protected]> A Contingent Worker at Intel
