netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Bhandare, KiranX" <kiranx.bhandare@intel.com>
To: Magnus Karlsson <magnus.karlsson@gmail.com>,
	"Karlsson, Magnus" <magnus.karlsson@intel.com>,
	"intel-wired-lan@lists.osuosl.org"
	<intel-wired-lan@lists.osuosl.org>,
	"Nguyen, Anthony L" <anthony.l.nguyen@intel.com>,
	"Fijalkowski, Maciej" <maciej.fijalkowski@intel.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"Joshi, Sreedevi" <sreedevi.joshi@intel.com>
Subject: RE: [Intel-wired-lan] [PATCH intel-net] i40e: fix receiving of single packets in xsk zero-copy mode
Date: Wed, 31 Mar 2021 12:57:35 +0000	[thread overview]
Message-ID: <DM6PR11MB3292D119D24C4E9291856E02F17C9@DM6PR11MB3292.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20210319094410.3633-1-magnus.karlsson@gmail.com>

> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Magnus Karlsson
> Sent: Friday, March 19, 2021 3:14 PM
> To: Karlsson, Magnus <magnus.karlsson@intel.com>; intel-wired-
> lan@lists.osuosl.org; Nguyen, Anthony L <anthony.l.nguyen@intel.com>;
> Fijalkowski, Maciej <maciej.fijalkowski@intel.com>
> Cc: netdev@vger.kernel.org; Joshi, Sreedevi <sreedevi.joshi@intel.com>
> Subject: [Intel-wired-lan] [PATCH intel-net] i40e: fix receiving of single packets
> in xsk zero-copy mode
> 
> From: Magnus Karlsson <magnus.karlsson@intel.com>
> 
> 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 <sreedevi.joshi@intel.com>
> Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
> ---
>  drivers/net/ethernet/intel/i40e/i40e_xsk.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 

Tested-by: Kiran Bhandare <kiranx.bhandare@intel.com>  A Contingent Worker at Intel

      parent reply	other threads:[~2021-03-31 12:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-19  9:44 [PATCH intel-net] i40e: fix receiving of single packets in xsk zero-copy mode Magnus Karlsson
2021-03-19 11:00 ` Maciej Fijalkowski
2021-03-19 12:14   ` Magnus Karlsson
2021-03-31 12:57 ` Bhandare, KiranX [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM6PR11MB3292D119D24C4E9291856E02F17C9@DM6PR11MB3292.namprd11.prod.outlook.com \
    --to=kiranx.bhandare@intel.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=maciej.fijalkowski@intel.com \
    --cc=magnus.karlsson@gmail.com \
    --cc=magnus.karlsson@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=sreedevi.joshi@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).