Commit Graph

25 Commits

Author SHA1 Message Date
Andrew Rybchenko
29e4237d46 net/sfc: remove TxQ control from shared TxQ info
libefx is not multi-process aware and all related structures
should be moved to primary process only.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2019-02-07 16:06:30 +01:00
Andrew Rybchenko
dbe26517cd net/sfc: remove unnecessary functions to get TxQ index
TxQ index is stored in generic datapath queue structure.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2019-02-07 16:06:30 +01:00
Andrew Rybchenko
42ce2521a8 net/sfc: move datapath TxQ handle to shared TxQ info
If datapath supports multi-process, it should be possible to get
its TxQ structure by the queue index.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2019-02-07 16:06:30 +01:00
Andrew Rybchenko
561508da06 net/sfc: move TxQ state to multi-process shared location
Secondary process needs to know TxQ state.
TxQ control structure will become primary process private.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2019-02-07 16:06:30 +01:00
Andrew Rybchenko
b57870f2ab net/sfc: avoid usage of TxQ control structure in info get
TxQ control structure contains primary process only data and will become
primary process only. TxQ info get is supported in secondary process.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2019-02-07 16:06:30 +01:00
Ferruh Yigit
ab3ce1e0c1 ethdev: remove old offload API
In DPDK 17.11, the ethdev offloads API has changed:
	commit cba7f53b71 ("ethdev: introduce Tx queue offloads API")
	commit ce17eddefc ("ethdev: introduce Rx queue offloads API")
The new API is documented in the programmer's guide:
	http://doc.dpdk.org/guides/prog_guide/poll_mode_drv.html#hardware-offload

For reminder, the main concepts in the new API were:
	- All offloads are disabled by default
	- Distinction between per port and per queue offloads.

The transition bits are now removed:
	- Translation of the old API in ethdev
	- rte_eth_conf.rxmode.ignore_offload_bitfield
	- ETH_TXQ_FLAGS_IGNORE

The old API bits are now removed:
	- Rx per-port rte_eth_conf.rxmode.[bit-fields]
	- Tx per-queue rte_eth_txconf.txq_flags
	- ETH_TXQ_FLAGS_NO*

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Shahaf Shuler <shahafs@mellanox.com>
2018-07-04 21:50:32 +02:00
Ferruh Yigit
ffc905f3b8 ethdev: separate driver APIs
Create a rte_ethdev_driver.h file and move PMD specific APIs here.
Drivers updated to include this new header file.

There is no update in header content and since ethdev.h included by
ethdev_driver.h, nothing changed from driver point of view, only
logically grouping of APIs. From applications point of view they can't
access to driver specific APIs anymore and they shouldn't.

More PMD specific data structures still remain in ethdev.h because of
inline functions in header use them. Those will be handled separately.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2018-01-22 01:26:49 +01:00
Ivan Malov
c78d280e88 net/sfc: convert to new Tx offload API
Ethdev Tx offloads API has changed since:
commit cba7f53b71 ("ethdev: introduce Tx queue offloads API")
This commit support the new Tx offloads API.

The code which fills in txq_flags in default_txconf is preserved
because rte_eth_dev_info_get() lacks conversion between offloads
and txq_flags fields which means that a legacy application which
relies on default_txconf will fail to configure Tx queues in the
case when some bits in txq_flags are mandatory.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-01-21 15:51:52 +01:00
Ivan Malov
85069adea7 net/sfc: factor out function to report Tx capabilities
The patch adds a separate function to report supported
Tx capabilities because this function will be required
in more places across the code in the upcoming patches.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-01-21 15:51:52 +01:00
Andrew Rybchenko
44c0947bae net/sfc: change license to BSD-3-Clause
Change license from BSD-2-Clause to BSD-3-Clause.
Bump copyright year.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-16 18:47:49 +01:00
Andrew Rybchenko
eaab5d96c4 net/sfc: use Tx queue max fill level calculated on init
Prepare to support more options for number of Tx descriptors.

libefx-based datapath is updated just for completeness to
make code more readable and less error-prone.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
2018-01-16 18:47:49 +01:00
Andrew Rybchenko
a47c6d6246 net/sfc: add Tx queue flush failed flag for sanity
Avoid usage of flushing state when Tx queue flush init failed.

Fixes: fed9aeb46c ("net/sfc: implement transmit path start / stop")
Cc: stable@dpdk.org

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-06-12 10:41:27 +01:00
Andrew Rybchenko
df64eadd29 net/sfc: clarify Tx subsystem configure/close function names
Prepare to fix device reconfigure. Make it clear that corresponding
functions should be called on device configure and close operations.
No functional change.

Fixes: a8ad8cf83f ("net/sfc: provide basic stubs for Tx subsystem")
Cc: stable@dpdk.org

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
2017-04-04 19:03:00 +02:00
Andrew Rybchenko
dbdc82416b net/sfc: factor out libefx-based Tx datapath
Split control and datapath to make datapath substitutable and
possibly reusable with alternative control path.

libefx-based Tx datapath is bound to libefx control path, but
it should be possible to use other datapaths with alternative
control path(s).

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-04-04 18:59:43 +02:00
Andrew Rybchenko
244cfa79a4 net/sfc: add missing BSD license line and update year
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-04-04 18:59:41 +02:00
Andrew Rybchenko
676d11ffb2 net/sfc: remove Tx DMA descriptor boundary crossing limit
EF10 supported by the PMD has no limitations on address boundary
crossing by Tx DMA descriptors.

Fixes: 428c7ddd2f ("net/sfc: send bursts of packets")
Fixes: fec33d5bb3 ("net/sfc: support firmware-assisted TSO")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-04-04 15:52:52 +02:00
Andrew Rybchenko
2a5a433ba5 net/sfc: enable TSO by default
Remove RTE_LIBRTE_SFC_EFX_TSO config option since it is not
required any more:
 - unreasonable limit on number of Tx queues when TSO is not
   actually required should be solved using per-device parameter
 - performance difference with and without TSO compiled in is small

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-01-30 22:18:26 +01:00
Ivan Malov
fec33d5bb3 net/sfc: support firmware-assisted TSO
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
Reviewed-by: Mark Spender <mspender@solarflare.com>
Reviewed-by: Robert Stonehouse <rstonehouse@solarflare.com>
2017-01-17 19:40:51 +01:00
Ivan Malov
7fd636815a net/sfc: support VLAN offload on transmit path
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
Reviewed-by: Robert Stonehouse <rstonehouse@solarflare.com>
2017-01-17 19:40:50 +01:00
Ivan Malov
c6a1d9b5ab net/sfc: support deferred start of transmit queues
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
Reviewed-by: Robert Stonehouse <rstonehouse@solarflare.com>
2017-01-17 19:40:50 +01:00
Ivan Malov
21f6411c89 net/sfc: support Tx free threshold
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
Reviewed-by: Robert Stonehouse <rstonehouse@solarflare.com>
2017-01-17 19:40:50 +01:00
Ivan Malov
428c7ddd2f net/sfc: send bursts of packets
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-01-17 19:39:27 +01:00
Ivan Malov
fed9aeb46c net/sfc: implement transmit path start / stop
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-01-17 19:39:27 +01:00
Ivan Malov
b1b7ad933b net/sfc: set up and release Tx queues
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-01-17 19:39:27 +01:00
Ivan Malov
a8ad8cf83f net/sfc: provide basic stubs for Tx subsystem
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-01-17 19:39:27 +01:00