* [net-next PATCH 0/2] Add support for VLAN based flow distribution
@ 2020-09-22 13:07 George Cherian
2020-09-22 13:07 ` [net-next PATCH 1/2] octeontx2-af: Add support for VLAN based RSS hashing George Cherian
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: George Cherian @ 2020-09-22 13:07 UTC (permalink / raw)
To: netdev, linux-kernel; +Cc: George Cherian
This series add support for VLAN based flow distribution for octeontx2
netdev driver. This adds support for configuring the same via ethtool.
Following tests have been done.
- Multi VLAN flow with same SD
- Multi VLAN flow with same SDFN
- Single VLAN flow with multi SD
- Single VLAN flow with multi SDFN
All tests done for udp/tcp both v4 and v6
George Cherian (2):
octeontx2-af: Add support for VLAN based RSS hashing
octeontx2-pf: Support to change VLAN based RSS hash options via
ethtool
drivers/net/ethernet/marvell/octeontx2/af/mbox.h | 1 +
drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c | 10 +++++++++-
.../net/ethernet/marvell/octeontx2/nic/otx2_common.c | 2 +-
.../net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c | 7 +++++++
4 files changed, 18 insertions(+), 2 deletions(-)
--
2.25.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [net-next PATCH 1/2] octeontx2-af: Add support for VLAN based RSS hashing
2020-09-22 13:07 [net-next PATCH 0/2] Add support for VLAN based flow distribution George Cherian
@ 2020-09-22 13:07 ` George Cherian
2020-09-22 13:07 ` [net-next PATCH 2/2] octeontx2-pf: Support to change VLAN based RSS hash options via ethtool George Cherian
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: George Cherian @ 2020-09-22 13:07 UTC (permalink / raw)
To: netdev, linux-kernel
Cc: George Cherian, Sunil Goutham, Linu Cherian, Geetha sowjanya,
Jerin Jacob, David S. Miller
Added support for PF/VF drivers to choose RSS flow key algorithm
with VLAN tag included in hashing input data. Only CTAG is considered.
Signed-off-by: George Cherian <george.cherian@marvell.com>
Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
---
drivers/net/ethernet/marvell/octeontx2/af/mbox.h | 1 +
drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c | 8 ++++++++
2 files changed, 9 insertions(+)
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/mbox.h b/drivers/net/ethernet/marvell/octeontx2/af/mbox.h
index 4aaef0a2b51c..aa3bda3f34be 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/mbox.h
+++ b/drivers/net/ethernet/marvell/octeontx2/af/mbox.h
@@ -625,6 +625,7 @@ struct nix_rss_flowkey_cfg {
#define NIX_FLOW_KEY_TYPE_INNR_UDP BIT(15)
#define NIX_FLOW_KEY_TYPE_INNR_SCTP BIT(16)
#define NIX_FLOW_KEY_TYPE_INNR_ETH_DMAC BIT(17)
+#define NIX_FLOW_KEY_TYPE_VLAN BIT(20)
u32 flowkey_cfg; /* Flowkey types selected */
u8 group; /* RSS context or group */
};
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
index 08181fc5f5d4..4bdc4baa3c59 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
@@ -2509,6 +2509,14 @@ static int set_flowkey_fields(struct nix_rx_flowkey_alg *alg, u32 flow_cfg)
field->ltype_match = NPC_LT_LE_GTPU;
field->ltype_mask = 0xF;
break;
+ case NIX_FLOW_KEY_TYPE_VLAN:
+ field->lid = NPC_LID_LB;
+ field->hdr_offset = 2; /* Skip TPID (2-bytes) */
+ field->bytesm1 = 1; /* 2 Bytes (Actually 12 bits) */
+ field->ltype_match = NPC_LT_LB_CTAG;
+ field->ltype_mask = 0xF;
+ field->fn_mask = 1; /* Mask out the first nibble */
+ break;
}
field->ena = 1;
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [net-next PATCH 2/2] octeontx2-pf: Support to change VLAN based RSS hash options via ethtool
2020-09-22 13:07 [net-next PATCH 0/2] Add support for VLAN based flow distribution George Cherian
2020-09-22 13:07 ` [net-next PATCH 1/2] octeontx2-af: Add support for VLAN based RSS hashing George Cherian
@ 2020-09-22 13:07 ` George Cherian
2020-09-22 17:13 ` [net-next PATCH 0/2] Add support for VLAN based flow distribution Jakub Kicinski
2020-09-24 0:46 ` David Miller
3 siblings, 0 replies; 5+ messages in thread
From: George Cherian @ 2020-09-22 13:07 UTC (permalink / raw)
To: netdev, linux-kernel
Cc: George Cherian, Sunil Goutham, David S. Miller,
Sunil Kovvuri Goutham, Geetha sowjanya, Subbaraya Sundeep,
Tomasz Duszynski, Aleksey Makarov, Christina Jacob,
Hariprasad Kelam, Felix Manlunas, hariprasad
Add support to control rx-flow-hash based on VLAN.
By default VLAN plus 4-tuple based hashing is enabled.
Changes can be done runtime using ethtool
To enable 2-tuple plus VLAN based flow distribution
# ethtool -N <intf> rx-flow-hash <prot> sdv
To enable 4-tuple plus VLAN based flow distribution
# ethtool -N <intf> rx-flow-hash <prot> sdfnv
Signed-off-by: George Cherian <george.cherian@marvell.com>
Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
---
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c | 2 +-
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c | 7 +++++++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
index 820fc660de66..d2581090f9a4 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
@@ -355,7 +355,7 @@ int otx2_rss_init(struct otx2_nic *pfvf)
rss->flowkey_cfg = rss->enable ? rss->flowkey_cfg :
NIX_FLOW_KEY_TYPE_IPV4 | NIX_FLOW_KEY_TYPE_IPV6 |
NIX_FLOW_KEY_TYPE_TCP | NIX_FLOW_KEY_TYPE_UDP |
- NIX_FLOW_KEY_TYPE_SCTP;
+ NIX_FLOW_KEY_TYPE_SCTP | NIX_FLOW_KEY_TYPE_VLAN;
ret = otx2_set_flowkey_cfg(pfvf);
if (ret)
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
index 0341d9694e8b..662fb80dbb9d 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
@@ -428,6 +428,8 @@ static int otx2_get_rss_hash_opts(struct otx2_nic *pfvf,
/* Mimimum is IPv4 and IPv6, SIP/DIP */
nfc->data = RXH_IP_SRC | RXH_IP_DST;
+ if (rss->flowkey_cfg & NIX_FLOW_KEY_TYPE_VLAN)
+ nfc->data |= RXH_VLAN;
switch (nfc->flow_type) {
case TCP_V4_FLOW:
@@ -477,6 +479,11 @@ static int otx2_set_rss_hash_opts(struct otx2_nic *pfvf,
if (!(nfc->data & RXH_IP_SRC) || !(nfc->data & RXH_IP_DST))
return -EINVAL;
+ if (nfc->data & RXH_VLAN)
+ rss_cfg |= NIX_FLOW_KEY_TYPE_VLAN;
+ else
+ rss_cfg &= ~NIX_FLOW_KEY_TYPE_VLAN;
+
switch (nfc->flow_type) {
case TCP_V4_FLOW:
case TCP_V6_FLOW:
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [net-next PATCH 0/2] Add support for VLAN based flow distribution
2020-09-22 13:07 [net-next PATCH 0/2] Add support for VLAN based flow distribution George Cherian
2020-09-22 13:07 ` [net-next PATCH 1/2] octeontx2-af: Add support for VLAN based RSS hashing George Cherian
2020-09-22 13:07 ` [net-next PATCH 2/2] octeontx2-pf: Support to change VLAN based RSS hash options via ethtool George Cherian
@ 2020-09-22 17:13 ` Jakub Kicinski
2020-09-24 0:46 ` David Miller
3 siblings, 0 replies; 5+ messages in thread
From: Jakub Kicinski @ 2020-09-22 17:13 UTC (permalink / raw)
To: George Cherian; +Cc: netdev, linux-kernel
On Tue, 22 Sep 2020 18:37:25 +0530 George Cherian wrote:
> This series add support for VLAN based flow distribution for octeontx2
> netdev driver. This adds support for configuring the same via ethtool.
>
> Following tests have been done.
> - Multi VLAN flow with same SD
> - Multi VLAN flow with same SDFN
> - Single VLAN flow with multi SD
> - Single VLAN flow with multi SDFN
> All tests done for udp/tcp both v4 and v6
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [net-next PATCH 0/2] Add support for VLAN based flow distribution
2020-09-22 13:07 [net-next PATCH 0/2] Add support for VLAN based flow distribution George Cherian
` (2 preceding siblings ...)
2020-09-22 17:13 ` [net-next PATCH 0/2] Add support for VLAN based flow distribution Jakub Kicinski
@ 2020-09-24 0:46 ` David Miller
3 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2020-09-24 0:46 UTC (permalink / raw)
To: george.cherian; +Cc: netdev, linux-kernel
From: George Cherian <george.cherian@marvell.com>
Date: Tue, 22 Sep 2020 18:37:25 +0530
> This series add support for VLAN based flow distribution for octeontx2
> netdev driver. This adds support for configuring the same via ethtool.
>
> Following tests have been done.
> - Multi VLAN flow with same SD
> - Multi VLAN flow with same SDFN
> - Single VLAN flow with multi SD
> - Single VLAN flow with multi SDFN
> All tests done for udp/tcp both v4 and v6
Series applied to net-next, thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-09-24 0:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-22 13:07 [net-next PATCH 0/2] Add support for VLAN based flow distribution George Cherian
2020-09-22 13:07 ` [net-next PATCH 1/2] octeontx2-af: Add support for VLAN based RSS hashing George Cherian
2020-09-22 13:07 ` [net-next PATCH 2/2] octeontx2-pf: Support to change VLAN based RSS hash options via ethtool George Cherian
2020-09-22 17:13 ` [net-next PATCH 0/2] Add support for VLAN based flow distribution Jakub Kicinski
2020-09-24 0:46 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.