DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/octeontx2: add support for VLAN based RSS hash
@ 2020-08-13  7:22 kirankumark
  2020-09-28  7:37 ` Jerin Jacob
  0 siblings, 1 reply; 2+ messages in thread
From: kirankumark @ 2020-08-13  7:22 UTC (permalink / raw)
  To: Jerin Jacob, Nithin Dabilpuram, Kiran Kumar K; +Cc: dev

From: Kiran Kumar K <kirankumark@marvell.com>

Adding support for VLAN based RSS hash. 2 bytes of SPI will
be considered for hashing.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
---
 drivers/common/octeontx2/otx2_mbox.h | 2 ++
 drivers/net/octeontx2/otx2_ethdev.h  | 2 +-
 drivers/net/octeontx2/otx2_rss.c     | 3 +++
 3 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/common/octeontx2/otx2_mbox.h b/drivers/common/octeontx2/otx2_mbox.h
index 34b1d0663..831445703 100644
--- a/drivers/common/octeontx2/otx2_mbox.h
+++ b/drivers/common/octeontx2/otx2_mbox.h
@@ -966,6 +966,8 @@ struct nix_rss_flowkey_cfg {
 #define FLOW_KEY_TYPE_INNR_SCTP     BIT(16)
 #define FLOW_KEY_TYPE_INNR_ETH_DMAC BIT(17)
 #define FLOW_KEY_TYPE_CH_LEN_90B	BIT(18)
+#define FLOW_KEY_TYPE_CUSTOM0		BIT(19)
+#define FLOW_KEY_TYPE_VLAN		BIT(20)
 #define FLOW_KEY_TYPE_L4_DST BIT(28)
 #define FLOW_KEY_TYPE_L4_SRC BIT(29)
 #define FLOW_KEY_TYPE_L3_DST BIT(30)
diff --git a/drivers/net/octeontx2/otx2_ethdev.h b/drivers/net/octeontx2/otx2_ethdev.h
index e9efe52bb..c4cb09621 100644
--- a/drivers/net/octeontx2/otx2_ethdev.h
+++ b/drivers/net/octeontx2/otx2_ethdev.h
@@ -119,7 +119,7 @@
 #define NIX_RSS_OFFLOAD		(ETH_RSS_PORT | ETH_RSS_IP | ETH_RSS_UDP |\
 				 ETH_RSS_TCP | ETH_RSS_SCTP | \
 				 ETH_RSS_TUNNEL | ETH_RSS_L2_PAYLOAD | \
-				 NIX_RSS_L3_L4_SRC_DST)
+				 NIX_RSS_L3_L4_SRC_DST | ETH_RSS_C_VLAN)
 
 #define NIX_TX_OFFLOAD_CAPA ( \
 	DEV_TX_OFFLOAD_MBUF_FAST_FREE	| \
diff --git a/drivers/net/octeontx2/otx2_rss.c b/drivers/net/octeontx2/otx2_rss.c
index d859937e6..364dc623c 100644
--- a/drivers/net/octeontx2/otx2_rss.c
+++ b/drivers/net/octeontx2/otx2_rss.c
@@ -238,6 +238,9 @@ otx2_rss_ethdev_to_nix(struct otx2_eth_dev *dev, uint64_t ethdev_rss,
 		flowkey_cfg |= FLOW_KEY_TYPE_CH_LEN_90B;
 	}
 
+	if (ethdev_rss & ETH_RSS_C_VLAN)
+		flowkey_cfg |= FLOW_KEY_TYPE_VLAN;
+
 	if (ethdev_rss & ETH_RSS_L3_SRC_ONLY)
 		flowkey_cfg |= FLOW_KEY_TYPE_L3_SRC;
 
-- 
2.25.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] net/octeontx2: add support for VLAN based RSS hash
  2020-08-13  7:22 [dpdk-dev] [PATCH] net/octeontx2: add support for VLAN based RSS hash kirankumark
@ 2020-09-28  7:37 ` Jerin Jacob
  0 siblings, 0 replies; 2+ messages in thread
From: Jerin Jacob @ 2020-09-28  7:37 UTC (permalink / raw)
  To: Kiran Kumar K; +Cc: Jerin Jacob, Nithin Dabilpuram, dpdk-dev

On Thu, Aug 13, 2020 at 12:53 PM <kirankumark@marvell.com> wrote:
>
> From: Kiran Kumar K <kirankumark@marvell.com>
>
> Adding support for VLAN based RSS hash. 2 bytes of SPI will

s/SPI/TCI

Fixed above comment on merge.

> be considered for hashing.
>
> Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>



Acked-by: Jerin Jacob <jerinj@marvell.com>
Applied to dpdk-next-net-mrvl/master. Thanks


> ---
>  drivers/common/octeontx2/otx2_mbox.h | 2 ++
>  drivers/net/octeontx2/otx2_ethdev.h  | 2 +-
>  drivers/net/octeontx2/otx2_rss.c     | 3 +++
>  3 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/common/octeontx2/otx2_mbox.h b/drivers/common/octeontx2/otx2_mbox.h
> index 34b1d0663..831445703 100644
> --- a/drivers/common/octeontx2/otx2_mbox.h
> +++ b/drivers/common/octeontx2/otx2_mbox.h
> @@ -966,6 +966,8 @@ struct nix_rss_flowkey_cfg {
>  #define FLOW_KEY_TYPE_INNR_SCTP     BIT(16)
>  #define FLOW_KEY_TYPE_INNR_ETH_DMAC BIT(17)
>  #define FLOW_KEY_TYPE_CH_LEN_90B       BIT(18)
> +#define FLOW_KEY_TYPE_CUSTOM0          BIT(19)
> +#define FLOW_KEY_TYPE_VLAN             BIT(20)
>  #define FLOW_KEY_TYPE_L4_DST BIT(28)
>  #define FLOW_KEY_TYPE_L4_SRC BIT(29)
>  #define FLOW_KEY_TYPE_L3_DST BIT(30)
> diff --git a/drivers/net/octeontx2/otx2_ethdev.h b/drivers/net/octeontx2/otx2_ethdev.h
> index e9efe52bb..c4cb09621 100644
> --- a/drivers/net/octeontx2/otx2_ethdev.h
> +++ b/drivers/net/octeontx2/otx2_ethdev.h
> @@ -119,7 +119,7 @@
>  #define NIX_RSS_OFFLOAD                (ETH_RSS_PORT | ETH_RSS_IP | ETH_RSS_UDP |\
>                                  ETH_RSS_TCP | ETH_RSS_SCTP | \
>                                  ETH_RSS_TUNNEL | ETH_RSS_L2_PAYLOAD | \
> -                                NIX_RSS_L3_L4_SRC_DST)
> +                                NIX_RSS_L3_L4_SRC_DST | ETH_RSS_C_VLAN)
>
>  #define NIX_TX_OFFLOAD_CAPA ( \
>         DEV_TX_OFFLOAD_MBUF_FAST_FREE   | \
> diff --git a/drivers/net/octeontx2/otx2_rss.c b/drivers/net/octeontx2/otx2_rss.c
> index d859937e6..364dc623c 100644
> --- a/drivers/net/octeontx2/otx2_rss.c
> +++ b/drivers/net/octeontx2/otx2_rss.c
> @@ -238,6 +238,9 @@ otx2_rss_ethdev_to_nix(struct otx2_eth_dev *dev, uint64_t ethdev_rss,
>                 flowkey_cfg |= FLOW_KEY_TYPE_CH_LEN_90B;
>         }
>
> +       if (ethdev_rss & ETH_RSS_C_VLAN)
> +               flowkey_cfg |= FLOW_KEY_TYPE_VLAN;
> +
>         if (ethdev_rss & ETH_RSS_L3_SRC_ONLY)
>                 flowkey_cfg |= FLOW_KEY_TYPE_L3_SRC;
>
> --
> 2.25.1
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-09-28  7:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-13  7:22 [dpdk-dev] [PATCH] net/octeontx2: add support for VLAN based RSS hash kirankumark
2020-09-28  7:37 ` Jerin Jacob

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git