net/sfc: correct RSS hash availability condition
authorAndrew Rybchenko <arybchenko@solarflare.com>
Tue, 18 Apr 2017 13:03:08 +0000 (14:03 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 19 Apr 2017 13:37:37 +0000 (15:37 +0200)
RSS hash is computed by hardware if corresponding Rx filter (for
example, default Rx filters) has RSS flag set which is set if
the number of RSS channels is greater than zero.

Fixes: 4ec1fc3ba881 ("net/sfc: add basic stubs for RSS support on driver attach")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
drivers/net/sfc/sfc_rx.c

index 664b38d..2ecd6f2 100644 (file)
@@ -930,7 +930,7 @@ sfc_rx_qinit(struct sfc_adapter *sa, unsigned int sw_index,
        info.prefix_size = encp->enc_rx_prefix_size;
 
 #if EFSYS_OPT_RX_SCALE
-       if (sa->hash_support == EFX_RX_HASH_AVAILABLE)
+       if (sa->hash_support == EFX_RX_HASH_AVAILABLE && sa->rss_channels > 0)
                info.flags |= SFC_RXQ_FLAG_RSS_HASH;
 #endif