net/qede: fix odd number of queues usage in 100G mode
authorShahed Shaikh <shshaikh@marvell.com>
Thu, 12 Sep 2019 15:24:13 +0000 (08:24 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 20 Sep 2019 08:19:41 +0000 (10:19 +0200)
commit8de0c42019260813b71699748a08bc94b608b5d9
tree9bfbf268a95932f7bd82b2c4d48f3284e9887f57
parent642f25da9c561f6e831cb5ea6f7d79c04d804081
net/qede: fix odd number of queues usage in 100G mode

As per HW design of 100Gb mode, device internally uses 2 engines
(eng0 and eng1), and both engines need to be configured symmetrically.
Based on this requirement, driver design chose an approach
to allow user to allocate only even number of queues and split
those queues on both engines equally.

This approach puts a limitation on number of queues to be allocated -
i.e. user can't configure odd number of queues on 100Gb mode.
OVS configures DPDK port with 1 rxq and 1 txq, which causes initialization
of qede port to fail.

Issue is fixed by changing the implementation of queue allocation and
assignment to hw engines only for 100Gb devices and allowing user to
configure odd number queues.

New approach works as below -
- Create 'struct qede_fastpath_cmt' to hold hw queue pair of both engines
  and provide it to rte_ethdev's Rx/Tx queues structure.
- So ethdev will see only one queue for underlying queue pair created for
  hw engine pair.
- Install separate Rx/Tx data path handlers for 100Gb mode and regular mode
- Rx/Tx handlers for 100Gb mode will split packet processing across both
  engines by providing hw queue structures from 'struct qede_fastpath_cmt'
  passed by Rx/Tx callbacks to respective engines.

Fixes: 2af14ca79c0a ("net/qede: support 100G")
Cc: stable@dpdk.org
Signed-off-by: Shahed Shaikh <shshaikh@marvell.com>
drivers/net/qede/qede_ethdev.c
drivers/net/qede/qede_ethdev.h
drivers/net/qede/qede_filter.c
drivers/net/qede/qede_rxtx.c
drivers/net/qede/qede_rxtx.h