Skip to contentSkip to conversation

i40e: Add flow director support for IPv6

PATCH New Arkadiusz Kubalewski 2 participants 2 messages Aug 6, 2020 – Aug 7, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i40e: Add flow director support for IPv6

From: Przemyslaw Patynowski <[email protected]>

Flow director for IPv6 is not supported.
Implementation of support for IPv6 flow director. Added handlers for addition of TCP6, UDP6, SCTP6, IPv6. Refactored legacy code to make it more generic. Added packet templates for TCP6, UDP6, SCTP6, IPv6. Added handling of IPv6 source and destination addres for flow director. Improved argument passing for source and destination port in TCP6, UDP6 and SCTP6. Added handling of ethtool -n for IPv6, TCP6, UDP6, SCTP6. Used correct bit flag regarding FLEXOFF field of flow director data descriptor.
Without this patch, there would be no support for flow director on IPv6, TCP6, UDP6, SCTP6.

---
 drivers/net/ethernet/intel/i40e/i40e.h        |   9 +-
 .../net/ethernet/intel/i40e/i40e_ethtool.c    | 210 +++++++++-
 drivers/net/ethernet/intel/i40e/i40e_main.c   |  79 +++-
 drivers/net/ethernet/intel/i40e/i40e_txrx.c   | 371 +++++++++++++-----
 4 files changed, 550 insertions(+), 119 deletions(-)
drivers/net/ethernet/intel/i40e/i40e.h +8 -1
index ada0e93..54054fc 100644
@@ -209,10 +209,12 @@ struct i40e_fdir_filter {
 	struct hlist_node fdir_node;
 	/* filter ipnut set */
 	u8 flow_type;
-	u8 ip4_proto;
+	u8 ipl4_proto;
 	/* TX packet view of src and dst */
 	__be32 dst_ip;
 	__be32 src_ip;
+	__be32 dst_ip6[4];
+	__be32 src_ip6[4];
 	__be16 src_port;
 	__be16 dst_port;
 	__be32 sctp_v_tag;
@@ -470,6 +472,11 @@ struct i40e_pf {
 	u16 fd_sctp4_filter_cnt;
 	u16 fd_ip4_filter_cnt;
 
+	u16 fd_tcp6_filter_cnt;
+	u16 fd_udp6_filter_cnt;
+	u16 fd_sctp6_filter_cnt;
+	u16 fd_ip6_filter_cnt;
+
 	/* Flexible filter table values that need to be programmed into
 	 * hardware, which expects L3 and L4 to be programmed separately. We
 	 * need to ensure that the values are in ascended order and don't have
drivers/net/ethernet/intel/i40e/i40e_ethtool.c +193 -17

281 lines not on this page · raw message

drivers/net/ethernet/intel/i40e/i40e_main.c +69 -10

138 lines not on this page · raw message

drivers/net/ethernet/intel/i40e/i40e_txrx.c +280 -91

568 lines not on this page · raw message

Signature · 7 lines
2.26.0

---------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
ul. Sowackiego 173 | 80-298 Gdask | Sd Rejonowy Gdask Pnoc | VII Wydzia Gospodarczy Krajowego Rejestru Sdowego - KRS 101882 | NIP 957-07-52-316 | Kapita zakadowy 200.000 PLN.
Ta wiadomo wraz z zacznikami jest przeznaczona dla okrelonego adresata i moe zawiera informacje poufne. W razie przypadkowego otrzymania tej wiadomoci, prosimy o powiadomienie nadawcy oraz trwae jej usunicie; jakiekolwiek przegldanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited.
#1 lore raw

PATCH 1/1 i40e: Add flow director support for IPv6

Quoted 24 lines

-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Arkadiusz Kubalewski
Sent: Thursday, August 6, 2020 6:37 AM
To: intel-wired-lan at lists.osuosl.org
Cc: Loktionov, Aleksandr <[email protected]>; Patynowski, PrzemyslawX <[email protected]>
Subject: [Intel-wired-lan] [PATCH] i40e: Add flow director support for IPv6

From: Przemyslaw Patynowski <[email protected]>

Flow director for IPv6 is not supported.
Implementation of support for IPv6 flow director. Added handlers for addition of TCP6, UDP6, SCTP6, IPv6. Refactored legacy code to make it more generic. Added packet templates for TCP6, UDP6, SCTP6, IPv6. Added handling of IPv6 source and destination addres for flow director. Improved argument passing for source and destination port in TCP6, UDP6 and SCTP6. Added handling of ethtool -n for IPv6, TCP6, UDP6, SCTP6. Used correct bit flag regarding FLEXOFF field of flow director data descriptor. Without this patch, there would be no support for flow director on IPv6, TCP6, UDP6, SCTP6.

Signed-off-by: Przemyslaw Patynowski
<[email protected]>

Quoted 8 lines
---
 drivers/net/ethernet/intel/i40e/i40e.h        |   9 +-
 .../net/ethernet/intel/i40e/i40e_ethtool.c    | 210 +++++++++-
 drivers/net/ethernet/intel/i40e/i40e_main.c   |  79 +++-
 drivers/net/ethernet/intel/i40e/i40e_txrx.c   | 371 +++++++++++++-----
 4 files changed, 550 insertions(+), 119 deletions(-)