[dpdk-dev,34/38] net/dpaa: add support for hashed RSS

Message ID 1497591668-3320-35-git-send-email-shreyansh.jain@nxp.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Shreyansh Jain June 16, 2017, 5:41 a.m. UTC
  Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
---
 doc/guides/nics/features/dpaa.ini |  1 +
 drivers/net/dpaa/dpaa_ethdev.c    |  1 +
 drivers/net/dpaa/dpaa_ethdev.h    | 10 ++++++++++
 3 files changed, 12 insertions(+)
  

Comments

Ferruh Yigit June 28, 2017, 3:48 p.m. UTC | #1
On 6/16/2017 6:41 AM, Shreyansh Jain wrote:
> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>

Just to confirm:

Is no HW configuration required to enable RSS?
Is HW updates mbuf->rss automatically, without driver involvement?

<...>

>  Promiscuous mode     = Y
>  Allmulticast mode    = Y
>  Unicast MAC filter   = Y
> +RSS hash             = Y
>  Flow control         = Y
>  Basic stats          = Y
>  ARMv8                = Y

<...>
  
Shreyansh Jain June 30, 2017, 10:31 a.m. UTC | #2
On Wednesday 28 June 2017 09:18 PM, Ferruh Yigit wrote:
> On 6/16/2017 6:41 AM, Shreyansh Jain wrote:
>> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
>> Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
> 
> Just to confirm:
> 
> Is no HW configuration required to enable RSS?
> Is HW updates mbuf->rss automatically, without driver involvement?
> 
> <...>

For DPAA platform, the configuration of queues and RSS on them is done using an external tool - just before executing DPDK application. This is part of application startup.
Though, I did notice that I have not documented this explicitly in the dpaa.rst. I will correct the documentation.

> 
>>  Promiscuous mode     = Y
>>  Allmulticast mode    = Y
>>  Unicast MAC filter   = Y
>> +RSS hash             = Y
>>  Flow control         = Y
>>  Basic stats          = Y
>>  ARMv8                = Y
> 
> <...>
>
  
Ferruh Yigit June 30, 2017, 11:39 a.m. UTC | #3
On 6/30/2017 11:31 AM, Shreyansh Jain wrote:
> On Wednesday 28 June 2017 09:18 PM, Ferruh Yigit wrote:
>> On 6/16/2017 6:41 AM, Shreyansh Jain wrote:
>>> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
>>> Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
>>
>> Just to confirm:
>>
>> Is no HW configuration required to enable RSS?
>> Is HW updates mbuf->rss automatically, without driver involvement?
>>
>> <...>
> 
> For DPAA platform, the configuration of queues and RSS on them is done using an external tool - just before executing DPDK application. This is part of application startup.
> Though, I did notice that I have not documented this explicitly in the dpaa.rst. I will correct the documentation.

For second question, I have seen next patch updates the mbuf->rss,
perhaps "RSS hash" support can be claimed with that patch.

> 
>>
>>>  Promiscuous mode     = Y
>>>  Allmulticast mode    = Y
>>>  Unicast MAC filter   = Y
>>> +RSS hash             = Y
>>>  Flow control         = Y
>>>  Basic stats          = Y
>>>  ARMv8                = Y
>>
>> <...>
>>
>
  
Shreyansh Jain July 4, 2017, 2:49 p.m. UTC | #4
On Friday 30 June 2017 05:09 PM, Ferruh Yigit wrote:
> On 6/30/2017 11:31 AM, Shreyansh Jain wrote:
>> On Wednesday 28 June 2017 09:18 PM, Ferruh Yigit wrote:
>>> On 6/16/2017 6:41 AM, Shreyansh Jain wrote:
>>>> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
>>>> Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
>>>
>>> Just to confirm:
>>>
>>> Is no HW configuration required to enable RSS?
>>> Is HW updates mbuf->rss automatically, without driver involvement?
>>>
>>> <...>
>>
>> For DPAA platform, the configuration of queues and RSS on them is done using an external tool - just before executing DPDK application. This is part of application startup.
>> Though, I did notice that I have not documented this explicitly in the dpaa.rst. I will correct the documentation.
> 
> For second question, I have seen next patch updates the mbuf->rss,
> perhaps "RSS hash" support can be claimed with that patch.

I have fixed this in v2.

> 
>>
>>>
>>>>  Promiscuous mode     = Y
>>>>  Allmulticast mode    = Y
>>>>  Unicast MAC filter   = Y
>>>> +RSS hash             = Y
>>>>  Flow control         = Y
>>>>  Basic stats          = Y
>>>>  ARMv8                = Y
>>>
>>> <...>
>>>
>>
> 
>
  

Patch

diff --git a/doc/guides/nics/features/dpaa.ini b/doc/guides/nics/features/dpaa.ini
index ea4c2fe..adb8458 100644
--- a/doc/guides/nics/features/dpaa.ini
+++ b/doc/guides/nics/features/dpaa.ini
@@ -12,6 +12,7 @@  MTU update           = Y
 Promiscuous mode     = Y
 Allmulticast mode    = Y
 Unicast MAC filter   = Y
+RSS hash             = Y
 Flow control         = Y
 Basic stats          = Y
 ARMv8                = Y
diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index 3cfbae0..fa664d8 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -158,6 +158,7 @@  static void dpaa_eth_dev_info(struct rte_eth_dev *dev,
 	dev_info->max_hash_mac_addrs = 0;
 	dev_info->max_vfs = 0;
 	dev_info->max_vmdq_pools = ETH_16_POOLS;
+	dev_info->flow_type_rss_offloads = DPAA_RSS_OFFLOAD_ALL;
 }
 
 static int dpaa_eth_link_update(struct rte_eth_dev *dev,
diff --git a/drivers/net/dpaa/dpaa_ethdev.h b/drivers/net/dpaa/dpaa_ethdev.h
index da7f3be..a9d1c2c 100644
--- a/drivers/net/dpaa/dpaa_ethdev.h
+++ b/drivers/net/dpaa/dpaa_ethdev.h
@@ -91,6 +91,16 @@ 
 #define DPAA_DEBUG_FQ_RX_ERROR   0
 #define DPAA_DEBUG_FQ_TX_ERROR   1
 
+#define DPAA_RSS_OFFLOAD_ALL ( \
+	ETH_RSS_FRAG_IPV4 | \
+	ETH_RSS_NONFRAG_IPV4_TCP | \
+	ETH_RSS_NONFRAG_IPV4_UDP | \
+	ETH_RSS_NONFRAG_IPV4_SCTP | \
+	ETH_RSS_FRAG_IPV6 | \
+	ETH_RSS_NONFRAG_IPV6_TCP | \
+	ETH_RSS_NONFRAG_IPV6_UDP | \
+	ETH_RSS_NONFRAG_IPV6_SCTP)
+
 #define DPAA_TX_CKSUM_OFFLOAD_MASK (             \
 		PKT_TX_IP_CKSUM |                \
 		PKT_TX_TCP_CKSUM |               \