All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kurt Kanzenbach <kurt@linutronix.de>
To: Benjamin Steinke <benjamin.steinke@woks-audio.com>,
	Sriram Yagnaraman <sriram.yagnaraman@est.tech>
Cc: intel-wired-lan@osuosl.org,
	"Maciej Fijalkowski" <maciej.fijalkowski@intel.com>,
	"Jesper Dangaard Brouer" <hawk@kernel.org>,
	"Daniel Borkmann" <daniel@iogearbox.net>,
	netdev@vger.kernel.org,
	"Jonathan Lemon" <jonathan.lemon@gmail.com>,
	"John Fastabend" <john.fastabend@gmail.com>,
	"Alexei Starovoitov" <ast@kernel.org>,
	"Björn Töpel" <bjorn@kernel.org>,
	"Eric Dumazet" <edumazet@google.com>,
	"Sriram Yagnaraman" <sriram.yagnaraman@est.tech>,
	"Tony Nguyen" <anthony.l.nguyen@intel.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	bpf@vger.kernel.org, "Paolo Abeni" <pabeni@redhat.com>,
	"David S . Miller" <davem@davemloft.net>,
	"Magnus Karlsson" <magnus.karlsson@intel.com>
Subject: Re: [Intel-wired-lan] [PATCH iwl-next v4 0/4] igb: Add support for AF_XDP zero-copy
Date: Thu, 27 Jun 2024 19:18:37 +0200	[thread overview]
Message-ID: <87cyo2fgnm.fsf@kurt.kurt.home> (raw)
In-Reply-To: <3253130.2gtjKKCVsX@desktop>

[-- Attachment #1: Type: text/plain, Size: 1933 bytes --]

Hi Benjamin,

On Thu Jun 27 2024, Benjamin Steinke wrote:
> On Thursday, 27 June 2024, 09:07:55 CEST, Kurt Kanzenbach wrote:
>> Hi Sriram,
>> 
>> On Fri Aug 04 2023, Sriram Yagnaraman wrote:
>> > The first couple of patches adds helper funcctions to prepare for AF_XDP
>> > zero-copy support which comes in the last couple of patches, one each
>> > for Rx and TX paths.
>> > 
>> > As mentioned in v1 patchset [0], I don't have access to an actual IGB
>> > device to provide correct performance numbers. I have used Intel 82576EB
>> > emulator in QEMU [1] to test the changes to IGB driver.
>> 
>> I gave this patch series a try on a recent kernel and silicon
>> (i210). There was one issue in igb_xmit_zc(). But other than that it
>> worked very nicely.
>
> Hi Kurt and Sriram,
>
> I recently tried the patches on a 6.1 kernel. On two different devices i210 & 
> i211 I couldn't see any packets being transmitted on the wire. Perhaps caused 
> by the issue in igb_xmit_zc() you mentioned, Kurt? Can you share your findings, 
> please?

Yeah, that's exactly the issue.

Following igb_xmit_xdp_ring() I've added PAYLEN to the Tx descriptor
instead of setting it to zero:

igb_xmit_zc()
{
        [...]

	/* put descriptor type bits */
	cmd_type = E1000_ADVTXD_DTYP_DATA | E1000_ADVTXD_DCMD_DEXT |
		   E1000_ADVTXD_DCMD_IFCS;
	olinfo_status = descs[i].len << E1000_ADVTXD_PAYLEN_SHIFT;
	
	cmd_type |= descs[i].len | IGB_TXD_DCMD;
	tx_desc->read.cmd_type_len = cpu_to_le32(cmd_type);
	tx_desc->read.olinfo_status = cpu_to_le32(olinfo_status);

	[...]
}

Afterwards packets are transmitted on the wire.

>
> RX seemed to work on first sight.
>

Yes, Rx works even with PTP enabled.

>> It seems like it hasn't been merged yet. Do you have any plans for
>> continuing to work on this?
>
> I can offer to do testing and debugging on real hardware if this helps.

Great. Thanks!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Kurt Kanzenbach <kurt@linutronix.de>
To: Benjamin Steinke <benjamin.steinke@woks-audio.com>,
	Sriram Yagnaraman <sriram.yagnaraman@est.tech>
Cc: "Maciej Fijalkowski" <maciej.fijalkowski@intel.com>,
	"Jesper Dangaard Brouer" <hawk@kernel.org>,
	"Daniel Borkmann" <daniel@iogearbox.net>,
	intel-wired-lan@osuosl.org,
	"John Fastabend" <john.fastabend@gmail.com>,
	"Alexei Starovoitov" <ast@kernel.org>,
	"Sriram Yagnaraman" <sriram.yagnaraman@est.tech>,
	"Björn Töpel" <bjorn@kernel.org>,
	netdev@vger.kernel.org,
	"Tony Nguyen" <anthony.l.nguyen@intel.com>,
	"Magnus Karlsson" <magnus.karlsson@intel.com>,
	"Jonathan Lemon" <jonathan.lemon@gmail.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	bpf@vger.kernel.org, "Paolo Abeni" <pabeni@redhat.com>,
	"David S . Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>
Subject: Re: [Intel-wired-lan] [PATCH iwl-next v4 0/4] igb: Add support for AF_XDP zero-copy
Date: Thu, 27 Jun 2024 19:18:37 +0200	[thread overview]
Message-ID: <87cyo2fgnm.fsf@kurt.kurt.home> (raw)
In-Reply-To: <3253130.2gtjKKCVsX@desktop>

[-- Attachment #1: Type: text/plain, Size: 1933 bytes --]

Hi Benjamin,

On Thu Jun 27 2024, Benjamin Steinke wrote:
> On Thursday, 27 June 2024, 09:07:55 CEST, Kurt Kanzenbach wrote:
>> Hi Sriram,
>> 
>> On Fri Aug 04 2023, Sriram Yagnaraman wrote:
>> > The first couple of patches adds helper funcctions to prepare for AF_XDP
>> > zero-copy support which comes in the last couple of patches, one each
>> > for Rx and TX paths.
>> > 
>> > As mentioned in v1 patchset [0], I don't have access to an actual IGB
>> > device to provide correct performance numbers. I have used Intel 82576EB
>> > emulator in QEMU [1] to test the changes to IGB driver.
>> 
>> I gave this patch series a try on a recent kernel and silicon
>> (i210). There was one issue in igb_xmit_zc(). But other than that it
>> worked very nicely.
>
> Hi Kurt and Sriram,
>
> I recently tried the patches on a 6.1 kernel. On two different devices i210 & 
> i211 I couldn't see any packets being transmitted on the wire. Perhaps caused 
> by the issue in igb_xmit_zc() you mentioned, Kurt? Can you share your findings, 
> please?

Yeah, that's exactly the issue.

Following igb_xmit_xdp_ring() I've added PAYLEN to the Tx descriptor
instead of setting it to zero:

igb_xmit_zc()
{
        [...]

	/* put descriptor type bits */
	cmd_type = E1000_ADVTXD_DTYP_DATA | E1000_ADVTXD_DCMD_DEXT |
		   E1000_ADVTXD_DCMD_IFCS;
	olinfo_status = descs[i].len << E1000_ADVTXD_PAYLEN_SHIFT;
	
	cmd_type |= descs[i].len | IGB_TXD_DCMD;
	tx_desc->read.cmd_type_len = cpu_to_le32(cmd_type);
	tx_desc->read.olinfo_status = cpu_to_le32(olinfo_status);

	[...]
}

Afterwards packets are transmitted on the wire.

>
> RX seemed to work on first sight.
>

Yes, Rx works even with PTP enabled.

>> It seems like it hasn't been merged yet. Do you have any plans for
>> continuing to work on this?
>
> I can offer to do testing and debugging on real hardware if this helps.

Great. Thanks!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]

  reply	other threads:[~2024-06-27 17:18 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-04  8:40 [PATCH iwl-next v4 0/4] igb: Add support for AF_XDP zero-copy Sriram Yagnaraman
2023-08-04  8:40 ` [Intel-wired-lan] " Sriram Yagnaraman
2023-08-04  8:40 ` [PATCH iwl-next v4 1/4] igb: prepare for AF_XDP zero-copy support Sriram Yagnaraman
2023-08-04  8:40   ` [Intel-wired-lan] " Sriram Yagnaraman
2023-08-04  8:40 ` [PATCH iwl-next v4 2/4] igb: Introduce XSK data structures and helpers Sriram Yagnaraman
2023-08-04  8:40   ` [Intel-wired-lan] " Sriram Yagnaraman
2023-08-04  8:40 ` [PATCH iwl-next v4 3/4] igb: add AF_XDP zero-copy Rx support Sriram Yagnaraman
2023-08-04  8:40   ` [Intel-wired-lan] " Sriram Yagnaraman
2023-08-05 14:54   ` kernel test robot
2023-08-05 14:54     ` kernel test robot
2023-08-04  8:40 ` [PATCH iwl-next v4 4/4] igb: add AF_XDP zero-copy Tx support Sriram Yagnaraman
2023-08-04  8:40   ` [Intel-wired-lan] " Sriram Yagnaraman
2024-06-27  7:07 ` [PATCH iwl-next v4 0/4] igb: Add support for AF_XDP zero-copy Kurt Kanzenbach
2024-06-27  7:07   ` [Intel-wired-lan] " Kurt Kanzenbach
2024-06-27 16:49   ` Benjamin Steinke
2024-06-27 16:49     ` Benjamin Steinke
2024-06-27 17:18     ` Kurt Kanzenbach [this message]
2024-06-27 17:18       ` Kurt Kanzenbach
2024-07-05 21:22       ` Sriram Yagnaraman
2024-07-05 21:22         ` Sriram Yagnaraman
2024-07-08  6:51         ` Kurt Kanzenbach
2024-07-08  6:51           ` Kurt Kanzenbach
2024-07-15 11:34       ` Benjamin Steinke
2024-07-15 11:34         ` Benjamin Steinke

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=87cyo2fgnm.fsf@kurt.kurt.home \
    --to=kurt@linutronix.de \
    --cc=anthony.l.nguyen@intel.com \
    --cc=ast@kernel.org \
    --cc=benjamin.steinke@woks-audio.com \
    --cc=bjorn@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hawk@kernel.org \
    --cc=intel-wired-lan@osuosl.org \
    --cc=john.fastabend@gmail.com \
    --cc=jonathan.lemon@gmail.com \
    --cc=kuba@kernel.org \
    --cc=maciej.fijalkowski@intel.com \
    --cc=magnus.karlsson@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sriram.yagnaraman@est.tech \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.