From: Daniel Zahka <daniel.zahka@gmail.com>
To: Alexander Duyck <alexanderduyck@fb.com>,
Jakub Kicinski <kuba@kernel.org>,
kernel-team@meta.com, Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Paolo Abeni <pabeni@redhat.com>,
Dimitri Daskalakis <dimitri.daskalakis1@gmail.com>,
Mohsin Bashir <mohsin.bashr@gmail.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH net-next v2 0/6] eth: mpnic: checksum and segmentation offloads
Date: Tue, 10 Nov 2026 14:06:33 -0800 [thread overview]
Message-ID: <20261110-mpnic-lso-v2-0-ccd37b051d08@gmail.com> (raw)
Add checksum and segmentation offload support. Tx checksum offload
follows the generic csum_start/csum_offset model. Rx checksum also
follows the normal unnecessary/complete model. The device can validate l4
checksums for tcp or udp, when the l3 type is one of: ipv4, ipv6,
ipv4-in-ipv6, or ipv6-in-ipv6. The full l2 checksum of a frame is always
passed to driver via a Rx completion descriptor field, which can be used
for checksum complete on other packet types.
Tx segmentation supports tcp or udp in ipv4, ipv6, 4-in-6, or 6-in-6
natively, and can support most other tunnels with GSO_PARTIAL.
Counters for CSO/LSO are exported via the netdev qstats API.
Signed-off-by: Daniel Zahka <daniel.zahka@gmail.com>
---
Changes in v2:
- eth: mpnic: Tx checksum offload
- use skb_network_offset() for the L2 header length in
mpnic_features_check(), since the mac header is not yet set when
called from the IP GSO slow path
- also enable Tx checksum offload for encapsulated packets via
hw_enc_features (moved from the IPv4 and IPv6 in IPv6 patch)
- eth: mpnic: Rx checksum offload
- convert l2_csum with cpu_to_le16() before csum_unfold(), since the
device reports it in network byte order and skb->csum was wrong on
big-endian hosts
- eth: mpnic: TCP segmentation offload
- count discarded skbs rather than segments in twq.dropped, matching
the xmit error path and the core's tx_dropped
- report only hw_gso_wire_packets; drop the super-packet counter
- eth: mpnic: UDP segmentation offload
- fall back to SW GSO for skbs shorter than MPNIC_MIN_FRAME_LEN, since
HW LSO would segment the zero padding as payload
- eth: mpnic: IPv4 and IPv6 in IPv6 tunnel segmentation
- derive inner L3 header length from csum_start rather than
inner_transport_header, which can be stale for DODGY skbs
- check the outer header is IPv6 in mpnic_ipxip6_gso_ok(), since
SKB_GSO_IPXIP6 can be set by a nested tunnel under an IPv4 outer
- move hw_enc_features setup to the Tx checksum offload patch
- eth: mpnic: add GSO_PARTIAL for other tunnels
- derive the L3 header length from csum_start rather than
inner_transport_header, matching mpnic_features_check() and
mpnic_tx_lso()
- Link to v1: https://lore.kernel.org/r/20261106-mpnic-lso-v1-0-e943ff1493e4@gmail.com
---
Daniel Zahka (6):
eth: mpnic: Tx checksum offload
eth: mpnic: Rx checksum offload
eth: mpnic: TCP segmentation offload
eth: mpnic: UDP segmentation offload
eth: mpnic: IPv4 and IPv6 in IPv6 tunnel segmentation
eth: mpnic: add GSO_PARTIAL for other tunnels
drivers/net/ethernet/meta/mpnic/mpnic_csr.h | 41 +++++
drivers/net/ethernet/meta/mpnic/mpnic_init.c | 14 ++
drivers/net/ethernet/meta/mpnic/mpnic_netdev.c | 40 +++-
drivers/net/ethernet/meta/mpnic/mpnic_netdev.h | 5 +
drivers/net/ethernet/meta/mpnic/mpnic_txrx.c | 242 ++++++++++++++++++++++++-
drivers/net/ethernet/meta/mpnic/mpnic_txrx.h | 8 +
6 files changed, 346 insertions(+), 4 deletions(-)
---
base-commit: 97ced2c090bfc2156db31fca9f52cf253e4bc186
change-id: 20261102-mpnic-lso-19aeb38e5648
Best regards,
--
Daniel Zahka <daniel.zahka@gmail.com>
next reply other threads:[~2026-11-10 22:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 22:06 Daniel Zahka [this message]
2026-11-10 22:06 ` [PATCH net-next v2 1/6] eth: mpnic: Tx checksum offload Daniel Zahka
2026-11-10 22:06 ` [PATCH net-next v2 2/6] eth: mpnic: Rx " Daniel Zahka
2026-11-10 22:06 ` [PATCH net-next v2 3/6] eth: mpnic: TCP segmentation offload Daniel Zahka
2026-11-10 22:06 ` [PATCH net-next v2 4/6] eth: mpnic: UDP " Daniel Zahka
2026-11-10 22:06 ` [PATCH net-next v2 5/6] eth: mpnic: IPv4 and IPv6 in IPv6 tunnel segmentation Daniel Zahka
2026-11-10 22:06 ` [PATCH net-next v2 6/6] eth: mpnic: add GSO_PARTIAL for other tunnels Daniel Zahka
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=20261110-mpnic-lso-v2-0-ccd37b051d08@gmail.com \
--to=daniel.zahka@gmail.com \
--cc=alexanderduyck@fb.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=dimitri.daskalakis1@gmail.com \
--cc=edumazet@kernel.org \
--cc=kernel-team@meta.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mohsin.bashr@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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
all inboxes | Powered by JetHome®