net/sfc/base: define a handle to denote default RSS context
authorMark Spender <mspender@solarflare.com>
Wed, 30 Aug 2017 18:17:32 +0000 (19:17 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 6 Oct 2017 00:49:47 +0000 (02:49 +0200)
Make the existing filter-specific define more general.
This is the same as MC_CMD_RSS_CONTEXT_ALLOC_OUT_RSS_CONTEXT_ID_INVALID.

Signed-off-by: Mark Spender <mspender@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
drivers/net/sfc/base/efx.h
drivers/net/sfc/base/efx_filter.c
drivers/net/sfc/sfc_flow.c

index 211480e..1e369bf 100644 (file)
@@ -1882,6 +1882,9 @@ efx_rx_scatter_enable(
        __in            unsigned int buf_size);
 #endif /* EFSYS_OPT_RX_SCATTER */
 
+/* Handle to represent use of the default RSS context. */
+#define        EFX_RSS_CONTEXT_DEFAULT 0xffffffff
+
 #if EFSYS_OPT_RX_SCALE
 
 typedef enum efx_rx_hash_alg_e {
@@ -2309,7 +2312,6 @@ typedef struct efx_filter_spec_s {
 
 
 /* Default values for use in filter specifications */
-#define        EFX_FILTER_SPEC_RSS_CONTEXT_DEFAULT     0xffffffff
 #define        EFX_FILTER_SPEC_RX_DMAQ_ID_DROP         0xfff
 #define        EFX_FILTER_SPEC_VID_UNSPEC              0xffff
 
index 2e0f9a3..9804468 100644 (file)
@@ -302,7 +302,7 @@ efx_filter_spec_init_rx(
        memset(spec, 0, sizeof (*spec));
        spec->efs_priority = priority;
        spec->efs_flags = EFX_FILTER_FLAG_RX | flags;
-       spec->efs_rss_context = EFX_FILTER_SPEC_RSS_CONTEXT_DEFAULT;
+       spec->efs_rss_context = EFX_RSS_CONTEXT_DEFAULT;
        spec->efs_dmaq_id = (uint16_t)erp->er_index;
 }
 
index 110dfb8..8ca0a63 100644 (file)
@@ -803,7 +803,7 @@ sfc_flow_parse_attr(const struct rte_flow_attr *attr,
        }
 
        flow->spec.efs_flags |= EFX_FILTER_FLAG_RX;
-       flow->spec.efs_rss_context = EFX_FILTER_SPEC_RSS_CONTEXT_DEFAULT;
+       flow->spec.efs_rss_context = EFX_RSS_CONTEXT_DEFAULT;
 
        return 0;
 }