The function names for converting between RQ indexes known to
the RTE code and internal RQ indexes for primary Start of Packet
(SOP) queues and spill-over (Data) queues was unclear and
confusing.
Clarify with more explicit function names.
Signed-off-by: John Daley <johndale@cisco.com>
Reviewed-by: Nelson Escobar <neescoba@cisco.com>
1300 series Cisco adapter firmware version 2.0(13) for UCS
C-series servers and 3.1(2) for blade servers supports more
filtering capabilities. The feature can be enabled via Cisco
CIMC or USCM with the 'advanced filters' radio button. When
enabled, the these additional flow director modes are available:
RTE_ETH_FLOW_NONFRAG_IPV4_OTHER
RTE_ETH_FLOW_NONFRAG_IPV4_SCTP
RTE_ETH_FLOW_NONFRAG_IPV6_UDP
RTE_ETH_FLOW_NONFRAG_IPV6_TCP
RTE_ETH_FLOW_NONFRAG_IPV6_SCTP
RTE_ETH_FLOW_NONFRAG_IPV6_OTHER
Changes:
- Detect and set an 'advanced filters' flag dependent on the adapter
capability.
- Implement RTE_ETH_FILTER_INFO filter op to return the flow types
available dependent on whether advanced filters are enabled.
- Use a function pointer to select how filters are added to the adapter:
copy_fltr_v1() for older firmware/adapters or copy_fltr_v2() for
adapters which support advanced filters.
- Apply fdir global masks to filters when in advanced filter mode.
- Update documentation.
Signed-off-by: John Daley <johndale@cisco.com>
Reviewed-by: Nelson Escobar <neescoba@cisco.com>
When flow director filters where removed when an enic device is
stopped, the filters were freed but the pointer was not set to
NULL so the next stop would try to free them again.
Fixes: fefed3d1e6 ("enic: new driver")
Signed-off-by: John Daley <johndale@cisco.com>
The wrong queue id was being used in the enic
flow director code after the scattered Rx feature
was added.
Fixes: 856d7ba7ed ("net/enic: support scattered Rx")
Signed-off-by: John Daley <johndale@cisco.com>
One instance of a filter add failure was not incrementing the
the fail counter.
Fixes: 4c2c7bf41f ("net/enic: fix negative array index write")
Signed-off-by: John Daley <johndale@cisco.com>
The enic_clsf_init() function is called once per enic instance, but it
used a static name to create the hash table. Consequently when using
more than one enic instance, there was a name collision which caused
errors:
EAL: memzone_reserve_aligned_thread_unsafe():
memzone<RG_HT_enicpmd_clsf_hash> already exists
RING: Cannot reserve memory
HASH: memory allocation failed
PMD: rte_enic_pmd: Init of hash table for clsf failed.
Flow director feature will not work
This patch changes the name to be unique per enic instance.
Fixes: fefed3d1e6 ("enic: new driver")
Signed-off-by: Nelson Escobar <neescoba@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
Negative array index write using variable pos as an index to array
enic->fdir.nodes. Fixed by add array index check.
Coverity issue: 13270
Fixes: fefed3d1e6 ("enic: new driver")
Signed-off-by: John Daley <johndale@cisco.com>
fix the error reported by checkpatch:
"ERROR: return is not a function, parentheses are not required"
remove parentheses in return like:
"return (logical expressions)"
remove parentheses in return a function like:
"return (rte_mempool_lookup(...))"
Fixes: 6307b909b8 ("lib: remove extra parenthesis after return")
Signed-off-by: Huawei Xie <huawei.xie@intel.com>
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>
RTE_HASH_KEY_LENGTH_MAX was deprecated, and the hash table
actually is hosting bigger keys than that size, so key length
has been increased to properly allocate all keys.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Sujith Sankar <ssujith@cisco.com>
The cuckoo hash has a fixed number of entries per bucket, so the
configuration parameter for this is unused. We change this field in the
parameters struct to "reserved" to indicate that there is now no such
parameter value, while at the same time keeping ABI consistency.
Fixes: 48a3991196 ("hash: replace with cuckoo hash implementation")
Suggested-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
move enic PMD to drivers/net directory
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
[Thomas: move vnic/ to base/]
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>