diff mbox

linux-generic: dpdk: always set input hash functions

Message ID D6FC4FAD05B5CC44927BD3216F244C2A03C07709@DEMUMBX011.nsn-intra.net
State Accepted
Commit 61526dabde8acc24c7f7dc80d151b26b77fa0462
Headers show

Commit Message

Elo, Matias (Nokia - FI/Espoo) April 6, 2016, 5:18 a.m. UTC
Thanks,
-Matias

From: EXT Bill Fischofer [mailto:bill.fischofer@linaro.org]

Sent: Wednesday, April 06, 2016 3:22 AM
To: Elo, Matias (Nokia - FI/Espoo) <matias.elo@nokia.com>
Cc: LNG ODP Mailman List <lng-odp@lists.linaro.org>
Subject: Re: [lng-odp] [PATCH] linux-generic: dpdk: always set input hash functions



On Thu, Mar 10, 2016 at 3:12 AM, Matias Elo <matias.elo@nokia.com<mailto:matias.elo@nokia.com>> wrote:
Always set at least the default input hash functions to
enable DPDK RSS hash calculation.

Signed-off-by: Matias Elo <matias.elo@nokia.com<mailto:matias.elo@nokia.com>>


Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org<mailto:bill.fischofer@linaro.org>>


---
 platform/linux-generic/pktio/dpdk.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

--
1.9.1

_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org<mailto:lng-odp@lists.linaro.org>
https://lists.linaro.org/mailman/listinfo/lng-odp

Comments

Maxim Uvarov April 6, 2016, 1:08 p.m. UTC | #1
Merged,
Maxim.

On 04/06/16 08:18, Elo, Matias (Nokia - FI/Espoo) wrote:
>
> Thanks,
>
> -Matias
>
> *From:*EXT Bill Fischofer [mailto:bill.fischofer@linaro.org]
> *Sent:* Wednesday, April 06, 2016 3:22 AM
> *To:* Elo, Matias (Nokia - FI/Espoo) <matias.elo@nokia.com>
> *Cc:* LNG ODP Mailman List <lng-odp@lists.linaro.org>
> *Subject:* Re: [lng-odp] [PATCH] linux-generic: dpdk: always set input 
> hash functions
>
> On Thu, Mar 10, 2016 at 3:12 AM, Matias Elo <matias.elo@nokia.com 
> <mailto:matias.elo@nokia.com>> wrote:
>
>     Always set at least the default input hash functions to
>     enable DPDK RSS hash calculation.
>
>     Signed-off-by: Matias Elo <matias.elo@nokia.com
>     <mailto:matias.elo@nokia.com>>
>
> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org 
> <mailto:bill.fischofer@linaro.org>>
>
>     ---
>      platform/linux-generic/pktio/dpdk.c | 8 +++++++-
>      1 file changed, 7 insertions(+), 1 deletion(-)
>
>     diff --git a/platform/linux-generic/pktio/dpdk.c
>     b/platform/linux-generic/pktio/dpdk.c
>     index a39e7dc..10daa29 100644
>     --- a/platform/linux-generic/pktio/dpdk.c
>     +++ b/platform/linux-generic/pktio/dpdk.c
>     @@ -185,7 +185,13 @@ static int dpdk_setup_port(pktio_entry_t
>     *pktio_entry)
>             pkt_dpdk_t *pkt_dpdk = &pktio_entry->s.pkt_dpdk;
>             struct rte_eth_rss_conf rss_conf;
>
>     -       rss_conf_to_hash_proto(&rss_conf, &pkt_dpdk->hash);
>     +       /* Always set some hash functions to enable DPDK RSS hash
>     calculation */
>     +       if (pkt_dpdk->hash.all_bits == 0) {
>     +               memset(&rss_conf, 0, sizeof(struct rte_eth_rss_conf));
>     +               rss_conf.rss_hf = ETH_RSS_IP | ETH_RSS_TCP |
>     ETH_RSS_UDP;
>     +       } else {
>     +  rss_conf_to_hash_proto(&rss_conf, &pkt_dpdk->hash);
>     +       }
>
>             struct rte_eth_conf port_conf = {
>                     .rxmode = {
>     --
>     1.9.1
>
>     _______________________________________________
>     lng-odp mailing list
>     lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org>
>     https://lists.linaro.org/mailman/listinfo/lng-odp
>
>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp
diff mbox

Patch

diff --git a/platform/linux-generic/pktio/dpdk.c b/platform/linux-generic/pktio/dpdk.c
index a39e7dc..10daa29 100644
--- a/platform/linux-generic/pktio/dpdk.c
+++ b/platform/linux-generic/pktio/dpdk.c
@@ -185,7 +185,13 @@  static int dpdk_setup_port(pktio_entry_t *pktio_entry)
        pkt_dpdk_t *pkt_dpdk = &pktio_entry->s.pkt_dpdk;
        struct rte_eth_rss_conf rss_conf;

-       rss_conf_to_hash_proto(&rss_conf, &pkt_dpdk->hash);
+       /* Always set some hash functions to enable DPDK RSS hash calculation */
+       if (pkt_dpdk->hash.all_bits == 0) {
+               memset(&rss_conf, 0, sizeof(struct rte_eth_rss_conf));
+               rss_conf.rss_hf = ETH_RSS_IP | ETH_RSS_TCP | ETH_RSS_UDP;
+       } else {
+               rss_conf_to_hash_proto(&rss_conf, &pkt_dpdk->hash);
+       }

        struct rte_eth_conf port_conf = {
                .rxmode = {