public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Lorenzo Bianconi <lorenzo@kernel.org>
To: "Loktionov, Aleksandr" <aleksandr.loktionov@intel.com>
Cc: Donald Hunter <donald.hunter@gmail.com>,
	Jakub Kicinski <kuba@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Jesper Dangaard Brouer <hawk@kernel.org>,
	John Fastabend <john.fastabend@gmail.com>,
	Stanislav Fomichev <sdf@fomichev.me>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"Nguyen, Anthony L" <anthony.l.nguyen@intel.com>,
	"Kitszel, Przemyslaw" <przemyslaw.kitszel@intel.com>,
	"Lobakin, Aleksander" <aleksander.lobakin@intel.com>,
	Andrii Nakryiko <andrii@kernel.org>,
	Martin KaFai Lau <martin.lau@linux.dev>,
	Eduard Zingerman <eddyz87@gmail.com>, Song Liu <song@kernel.org>,
	Yonghong Song <yonghong.song@linux.dev>,
	KP Singh <kpsingh@kernel.org>, Hao Luo <haoluo@google.com>,
	Jiri Olsa <jolsa@kernel.org>, Shuah Khan <shuah@kernel.org>,
	"Fijalkowski, Maciej" <maciej.fijalkowski@intel.com>,
	Jakub Sitnicki <jakub@cloudflare.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"bpf@vger.kernel.org" <bpf@vger.kernel.org>,
	"intel-wired-lan@lists.osuosl.org"
	<intel-wired-lan@lists.osuosl.org>,
	"linux-kselftest@vger.kernel.org"
	<linux-kselftest@vger.kernel.org>
Subject: Re: [Intel-wired-lan] [PATCH bpf-next 2/5] net: veth: Add xmo_rx_checksum callback to veth driver
Date: Fri, 13 Feb 2026 16:22:03 +0100	[thread overview]
Message-ID: <aY9Bm0ewK6lLWpqe@lore-desk> (raw)
In-Reply-To: <IA3PR11MB8986DFE4F3C0D804F50B0A56E563A@IA3PR11MB8986.namprd11.prod.outlook.com>

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

> 
> 
> > -----Original Message-----
> > From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf
> > Of Lorenzo Bianconi
> > Sent: Tuesday, February 10, 2026 6:22 PM
> > To: Donald Hunter <donald.hunter@gmail.com>; Jakub Kicinski
> > <kuba@kernel.org>; David S. Miller <davem@davemloft.net>; Eric Dumazet
> > <edumazet@google.com>; Paolo Abeni <pabeni@redhat.com>; Simon Horman
> > <horms@kernel.org>; Alexei Starovoitov <ast@kernel.org>; Daniel
> > Borkmann <daniel@iogearbox.net>; Jesper Dangaard Brouer
> > <hawk@kernel.org>; John Fastabend <john.fastabend@gmail.com>;
> > Stanislav Fomichev <sdf@fomichev.me>; Andrew Lunn
> > <andrew+netdev@lunn.ch>; Nguyen, Anthony L
> > <anthony.l.nguyen@intel.com>; Kitszel, Przemyslaw
> > <przemyslaw.kitszel@intel.com>; Lobakin, Aleksander
> > <aleksander.lobakin@intel.com>; Andrii Nakryiko <andrii@kernel.org>;
> > Martin KaFai Lau <martin.lau@linux.dev>; Eduard Zingerman
> > <eddyz87@gmail.com>; Song Liu <song@kernel.org>; Yonghong Song
> > <yonghong.song@linux.dev>; KP Singh <kpsingh@kernel.org>; Hao Luo
> > <haoluo@google.com>; Jiri Olsa <jolsa@kernel.org>; Shuah Khan
> > <shuah@kernel.org>; Fijalkowski, Maciej <maciej.fijalkowski@intel.com>
> > Cc: Jakub Sitnicki <jakub@cloudflare.com>; netdev@vger.kernel.org;
> > bpf@vger.kernel.org; intel-wired-lan@lists.osuosl.org; linux-
> > kselftest@vger.kernel.org; Lorenzo Bianconi <lorenzo@kernel.org>
> > Subject: [Intel-wired-lan] [PATCH bpf-next 2/5] net: veth: Add
> > xmo_rx_checksum callback to veth driver
> > 
> > Implement xmo_rx_checksum callback in veth driver to report RX
> > checksum result to the eBPF program bounded to the veth device.
> > 
> > Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> > ---
> >  drivers/net/veth.c | 20 ++++++++++++++++++++
> >  1 file changed, 20 insertions(+)
> > 
> > diff --git a/drivers/net/veth.c b/drivers/net/veth.c index
> > 14e6f2a2fb7783334d8f6afd54e658cf9a0e6f3d..38b70ad62db7e92cccc6c6c9ed1f
> > 5573d8baf48b 100644
> > --- a/drivers/net/veth.c
> > +++ b/drivers/net/veth.c
> > @@ -1693,6 +1693,25 @@ static int veth_xdp_rx_vlan_tag(const struct
> > xdp_md *ctx, __be16 *vlan_proto,
> >  	return err;
> >  }
> > 
> > +static int veth_xdp_rx_checksum(const struct xdp_md *ctx,
> > +				enum xdp_checksum *ip_summed,
> > +				u32 *cksum_meta)
> > +{
> > +	const struct veth_xdp_buff *_ctx = (void *)ctx;
> > +	const struct sk_buff *skb = _ctx->skb;
> > +
> > +	if (!skb)
> > +		return -ENODATA;
> > +
> > +	/* For locally generated packets ip_summed is set to
> > +	 * CHECKSUM_PARTIAL.
> > +	 */
> > +	*ip_summed = skb->ip_summed;
> > +	*cksum_meta = 0;
> > +
> > +	return 0;
> > +}
> > +
> >  static const struct net_device_ops veth_netdev_ops = {
> >  	.ndo_init            = veth_dev_init,
> >  	.ndo_open            = veth_open,
> > @@ -1718,6 +1737,7 @@ static const struct xdp_metadata_ops
> > veth_xdp_metadata_ops = {
> >  	.xmo_rx_timestamp		= veth_xdp_rx_timestamp,
> >  	.xmo_rx_hash			= veth_xdp_rx_hash,
> >  	.xmo_rx_vlan_tag		= veth_xdp_rx_vlan_tag,
> > +	.xmo_rx_checksum		= veth_xdp_rx_checksum,
> >  };
> > 
> >  #define VETH_FEATURES (NETIF_F_SG | NETIF_F_FRAGLIST |
> > NETIF_F_HW_CSUM | \
> > 
> > --
> > 2.53.0
> 
> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>

@Aleksandr: veth implementation is quite different in v2 so I will
remove your Reviewed-by tag.
Can you please take a look to the new version when you have some free cycles?
Thanks in advance.

Regards,
Lorenzo

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

  reply	other threads:[~2026-02-13 15:22 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-10 17:21 [PATCH bpf-next 0/5] Add the the capability to load HW RX checsum in eBPF programs Lorenzo Bianconi
2026-02-10 17:21 ` [PATCH bpf-next 1/5] netlink: specs: Add XDP RX checksum capability to XDP metadata specs Lorenzo Bianconi
2026-02-10 17:54   ` bot+bpf-ci
2026-02-13  5:18   ` Stanislav Fomichev
2026-02-13 10:40     ` Lorenzo Bianconi
2026-02-10 17:21 ` [PATCH bpf-next 2/5] net: veth: Add xmo_rx_checksum callback to veth driver Lorenzo Bianconi
2026-02-10 17:54   ` bot+bpf-ci
2026-02-11  8:04   ` [Intel-wired-lan] " Loktionov, Aleksandr
2026-02-13 15:22     ` Lorenzo Bianconi [this message]
2026-02-10 17:21 ` [PATCH bpf-next 3/5] net: ice: Add xmo_rx_checksum callback Lorenzo Bianconi
2026-02-10 17:54   ` bot+bpf-ci
2026-02-11  6:07   ` [Intel-wired-lan] " kernel test robot
2026-02-10 17:21 ` [PATCH bpf-next 4/5] selftests/bpf: Add selftest support for bpf_xdp_metadata_rx_checksum Lorenzo Bianconi
2026-02-10 17:55   ` bot+bpf-ci
2026-02-11  8:05   ` [Intel-wired-lan] " Loktionov, Aleksandr
2026-02-10 17:21 ` [PATCH bpf-next 5/5] selftests/bpf: Add bpf_xdp_metadata_rx_checksum support to xdp_hw_metadat prog Lorenzo Bianconi
2026-02-10 17:54   ` bot+bpf-ci

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=aY9Bm0ewK6lLWpqe@lore-desk \
    --to=lorenzo@kernel.org \
    --cc=aleksander.lobakin@intel.com \
    --cc=aleksandr.loktionov@intel.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=andrii@kernel.org \
    --cc=anthony.l.nguyen@intel.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=donald.hunter@gmail.com \
    --cc=eddyz87@gmail.com \
    --cc=edumazet@google.com \
    --cc=haoluo@google.com \
    --cc=hawk@kernel.org \
    --cc=horms@kernel.org \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jakub@cloudflare.com \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kpsingh@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=maciej.fijalkowski@intel.com \
    --cc=martin.lau@linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=przemyslaw.kitszel@intel.com \
    --cc=sdf@fomichev.me \
    --cc=shuah@kernel.org \
    --cc=song@kernel.org \
    --cc=yonghong.song@linux.dev \
    /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