Skip to contentSkip to conversation

net/i40e: refactor of hash flow

RFC In review Zhang,Alvin 2 participants 3 messages Oct 23, 2020 – Oct 26, 2020

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

RFC 1/1 net/i40e: refactor of hash flow

From: Alvin Zhang <[email protected]>

1. Delete original code.
2. Add 2 tables(pattern RSS type matched PCTYPE, RSS type to input set).
3. Parse RSS pattern and RSS type to get PCTYPE.
4. Parse RSS action to get queues, RSS function and hash field.
5. Create and destroy RSS filters.
6. Create new files for hash flows.
7. Update doc.

---
 doc/guides/nics/i40e.rst       |    4 +-
 drivers/net/i40e/i40e_ethdev.c |  840 ++++++-------------------
 drivers/net/i40e/i40e_ethdev.h |   43 +-
 drivers/net/i40e/i40e_flow.c   |  617 +------------------
 drivers/net/i40e/i40e_hash.c   | 1315 ++++++++++++++++++++++++++++++++++++++++
 drivers/net/i40e/i40e_hash.h   |   34 ++
 drivers/net/i40e/meson.build   |    1 +
 7 files changed, 1587 insertions(+), 1267 deletions(-)
 create mode 100644 drivers/net/i40e/i40e_hash.c
 create mode 100644 drivers/net/i40e/i40e_hash.h
doc/guides/nics/i40e.rst +2 -2
index a0b81e6..077b3dc 100644
@@ -585,9 +585,9 @@ Generic flow API
 - ``RSS Flow``
 
   RSS Flow supports to set hash input set, hash function, enable hash
-  and configure queue region.
+  and configure queues.
   For example:
-  Configure queue region as queue 0, 1, 2, 3.
+  Configure queues as queue 0, 1, 2, 3.
 
   .. code-block:: console
 
drivers/net/i40e/i40e_ethdev.c +193 -647

981 lines not on this page · raw message

drivers/net/i40e/i40e_ethdev.h +29 -14

103 lines not on this page · raw message

drivers/net/i40e/i40e_flow.c +13 -604

671 lines not on this page · raw message

drivers/net/i40e/i40e_hash.c new file +1315 -0

1,234 lines not on this page · raw message

drivers/net/i40e/i40e_hash.h new file +34 -0
new file mode 100644
index 0000000..ff8c91c

Lines of this file are not shown. View the raw message.

drivers/net/i40e/meson.build +1 -0
index 68f9895..4dcb3a3 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
1.8.3.1

Part of the diff is not shown here. View the raw message.

#1 lore raw

Hi, Alvin

Quoted 31 lines

-----Original Message-----
From: dev <[email protected]> On Behalf Of Zhang,Alvin
Sent: Friday, October 23, 2020 2:56 PM
To: [email protected]
Cc: Zhang, AlvinX <[email protected]>
Subject: [dpdk-dev] [RFC] net/i40e: refactor of hash flow

From: Alvin Zhang <[email protected]>

1. Delete original code.
2. Add 2 tables(pattern RSS type matched PCTYPE, RSS type to input set).
3. Parse RSS pattern and RSS type to get PCTYPE.
4. Parse RSS action to get queues, RSS function and hash field.
5. Create and destroy RSS filters.
6. Create new files for hash flows.
7. Update doc.

---
 doc/guides/nics/i40e.rst       |    4 +-
 drivers/net/i40e/i40e_ethdev.c |  840 ++++++-------------------
 drivers/net/i40e/i40e_ethdev.h |   43 +-
 drivers/net/i40e/i40e_flow.c   |  617 +------------------
 drivers/net/i40e/i40e_hash.c   | 1315
++++++++++++++++++++++++++++++++++++++++
 drivers/net/i40e/i40e_hash.h   |   34 ++
 drivers/net/i40e/meson.build   |    1 +
 7 files changed, 1587 insertions(+), 1267 deletions(-)
 create mode 100644 drivers/net/i40e/i40e_hash.c
 create mode 100644 drivers/net/i40e/i40e_hash.h

<snip>

Quoted 1 line
drivers/net/i40e/i40e_hash.c +0 -0

<snip>

drivers/net/i40e/i40e_hash.c line 203

Quoted 5 lines

+#define I40E_HASH_VLAN_RSS_MASK (ETH_RSS_S_VLAN |
ETH_RSS_C_VLAN)
+#define I40E_HASH_L2_RSS_MASK (ETH_RSS_ETH |
ETH_RSS_L2_SRC_ONLY | \

drivers/net/i40e/i40e_hash.c +1 -0
+					ETH_RSS_L2_SRC_ONLY)

This should be ETH_RSS_L2_DST_ONLY, right?

drivers/net/i40e/i40e_hash.c line 208

Quoted 6 lines
drivers/net/i40e/i40e_hash.c +2 -0
+
+#define I40E_HASH_L23_RSS_MASK		(I40E_HASH_L2_RSS_MASK |

\

drivers/net/i40e/i40e_hash.c +3 -0
+					I40E_HASH_VLAN_RSS_MASK | \
+					ETH_RSS_L3_SRC_ONLY | \
+					ETH_RSS_L3_SRC_ONLY)

ETH_RSS_L3_DST_ONLY ?

drivers/net/i40e/i40e_hash.c

Quoted 6 lines
drivers/net/i40e/i40e_hash.c +2 -0
+
+#define I40E_HASH_L234_RSS_MASK		(I40E_HASH_L23_RSS_MASK

| \

drivers/net/i40e/i40e_hash.c +1 -0
+					ETH_RSS_PORT |

ETH_RSS_L3_SRC_ONLY | \

drivers/net/i40e/i40e_hash.c +1 -0
+					ETH_RSS_L3_SRC_ONLY)

ETH_RSS_L3_DST_ONLY ?

Thanks
Shougang

#2 lore raw

Thanks Shougang,

Yes, I will update them.
BR,
Alvin

Quoted 70 lines

-----Original Message-----
From: Wang, ShougangX <[email protected]>
Sent: Friday, October 23, 2020 4:43 PM
To: Zhang, AlvinX <[email protected]>; [email protected]
Subject: RE: [dpdk-dev] [RFC] net/i40e: refactor of hash flow

Hi, Alvin

Quoted 31 lines

-----Original Message-----
From: dev <[email protected]> On Behalf Of Zhang,Alvin
Sent: Friday, October 23, 2020 2:56 PM
To: [email protected]
Cc: Zhang, AlvinX <[email protected]>
Subject: [dpdk-dev] [RFC] net/i40e: refactor of hash flow

From: Alvin Zhang <[email protected]>

1. Delete original code.
2. Add 2 tables(pattern RSS type matched PCTYPE, RSS type to input set).
3. Parse RSS pattern and RSS type to get PCTYPE.
4. Parse RSS action to get queues, RSS function and hash field.
5. Create and destroy RSS filters.
6. Create new files for hash flows.
7. Update doc.

---
 doc/guides/nics/i40e.rst       |    4 +-
 drivers/net/i40e/i40e_ethdev.c |  840 ++++++-------------------
 drivers/net/i40e/i40e_ethdev.h |   43 +-
 drivers/net/i40e/i40e_flow.c   |  617 +------------------
 drivers/net/i40e/i40e_hash.c   | 1315
++++++++++++++++++++++++++++++++++++++++
 drivers/net/i40e/i40e_hash.h   |   34 ++
 drivers/net/i40e/meson.build   |    1 +
 7 files changed, 1587 insertions(+), 1267 deletions(-)  create mode

100644 drivers/net/i40e/i40e_hash.c create mode 100644 drivers/net/i40e/i40e_hash.h

<snip>

Quoted 2 lines
drivers/net/i40e/i40e_hash.c +0 -0

<snip>

drivers/net/i40e/i40e_hash.c line 203

Quoted 5 lines

+#define I40E_HASH_VLAN_RSS_MASK (ETH_RSS_S_VLAN |
ETH_RSS_C_VLAN)
+#define I40E_HASH_L2_RSS_MASK (ETH_RSS_ETH |
ETH_RSS_L2_SRC_ONLY | \

drivers/net/i40e/i40e_hash.c +1 -0
+					ETH_RSS_L2_SRC_ONLY)

This should be ETH_RSS_L2_DST_ONLY, right?

drivers/net/i40e/i40e_hash.c line 208

Quoted 6 lines
drivers/net/i40e/i40e_hash.c +2 -0
+
+#define I40E_HASH_L23_RSS_MASK		(I40E_HASH_L2_RSS_MASK |

\

drivers/net/i40e/i40e_hash.c +3 -0
+					I40E_HASH_VLAN_RSS_MASK | \
+					ETH_RSS_L3_SRC_ONLY | \
+					ETH_RSS_L3_SRC_ONLY)

ETH_RSS_L3_DST_ONLY ?

drivers/net/i40e/i40e_hash.c

Quoted 6 lines
drivers/net/i40e/i40e_hash.c +2 -0
+
+#define I40E_HASH_L234_RSS_MASK		(I40E_HASH_L23_RSS_MASK

| \

drivers/net/i40e/i40e_hash.c +1 -0
+					ETH_RSS_PORT |

ETH_RSS_L3_SRC_ONLY | \

drivers/net/i40e/i40e_hash.c +1 -0
+					ETH_RSS_L3_SRC_ONLY)

ETH_RSS_L3_DST_ONLY ?

Thanks
Shougang