From: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
To: intel-wired-lan@lists.osuosl.org
Cc: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Subject: [PATCH iwl-next v1 0/2] ice: offload not fragmented ip packets
Date: Tue, 6 Oct 2026 12:47:02 +0200 [thread overview]
Message-ID: <20261006104704.3584666-1-michal.swiatkowski@linux.intel.com> (raw)
Hi,
OVS in default mode adds tc flower filters with "ip_flags nofrag". ice
rejects any match on control flags, so these flows can't be offloaded
and all IP traffic goes through the slow path.
HW has a metadata flag that says whether a packet is fragmented (IPv4
or IPv6). Use it to offload the "not fragmented" case. Matching on
fragments isn't supported, because it would need different training
packets and would break L4 matching. Tunneled filters are also
rejected, as the flag can come from either the outer or the inner IP
header.
The first patch is a preparation: all 32 bits of the tc flower flags
are already used, so the field is extended to u64 and the defines use
BIT_ULL(). The second patch adds the nofrag match.
Example:
$ tc filter add dev $VF_PR ingress protocol ip prio 1 flower \
src_mac 0a:7a:c1:6b:8e:1c dst_mac be:9d:68:58:51:d8 \
ip_flags nofrag skip_sw \
action mirred egress redirect dev $VF2_PR
Tested with iperf traffic between OVS bridge ports in switchdev mode.
All packets are offloaded.
Michal Swiatkowski (2):
ice: extend tc flags field to u64
ice: allow matching on no_frag ip packets
drivers/net/ethernet/intel/ice/ice_main.c | 2 +-
.../ethernet/intel/ice/ice_protocol_type.h | 1 +
drivers/net/ethernet/intel/ice/ice_switch.c | 7 ++
drivers/net/ethernet/intel/ice/ice_switch.h | 1 +
drivers/net/ethernet/intel/ice/ice_tc_lib.c | 51 +++++++++++---
drivers/net/ethernet/intel/ice/ice_tc_lib.h | 67 ++++++++++---------
6 files changed, 85 insertions(+), 44 deletions(-)
--
2.49.0
next reply other threads:[~2026-10-06 11:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-06 10:47 Michal Swiatkowski [this message]
2026-10-06 10:47 ` [PATCH iwl-next v1 1/2] ice: extend tc flags field to u64 Michal Swiatkowski
2026-10-06 10:47 ` [PATCH iwl-next v1 2/2] ice: allow matching on no_frag ip packets Michal Swiatkowski
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=20261006104704.3584666-1-michal.swiatkowski@linux.intel.com \
--to=michal.swiatkowski@linux.intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
/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