enic: fix hash creation when not using first numa node
authorDavid Marchand <david.marchand@6wind.com>
Fri, 11 Sep 2015 08:02:31 +0000 (10:02 +0200)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 20 Oct 2015 19:32:06 +0000 (21:32 +0200)
If dpdk is run with memory only available on socket != 0, then hash
creation will fail and flow director feature won't be available.
Fix this by asking for allocation on caller socket.

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked by: Sujith Sankar <ssujith@cisco.com>

drivers/net/enic/enic_clsf.c

index 2050985..9c2bc21 100644 (file)
@@ -60,7 +60,6 @@
 #define DEFAULT_HASH_FUNC       rte_jhash
 #endif
 
-#define SOCKET_0                0
 #define ENICPMD_CLSF_HASH_ENTRIES       ENICPMD_FDIR_MAX
 
 void enic_fdir_stats_get(struct enic *enic, struct rte_eth_fdir_stats *stats)
@@ -246,7 +245,7 @@ int enic_clsf_init(struct enic *enic)
                .key_len = sizeof(struct rte_eth_fdir_filter),
                .hash_func = DEFAULT_HASH_FUNC,
                .hash_func_init_val = 0,
-               .socket_id = SOCKET_0,
+               .socket_id = SOCKET_ID_ANY,
        };
 
        enic->fdir.hash = rte_hash_create(&hash_params);