szedata2: change to physical device type
PMD was of type PMD_VDEV which means that PCI device is not recognised automatically during EAL initialization, but it has to be created by EAL option --vdev. Now, PMD is of type PMD_PDEV which means that PCI device is probed and recognised during EAL initialization automatically. Path to szedata2 device file is matched with device and the count of available RX and TX DMA channels is found out during device initialization. Initialization, starting and stopping of queues is changed to better correspond with Ethernet device API model. Function callbacks (rx|tx)_queue_(start|stop) are added. Unnecessary items are removed from ethernet device private data structure. Signed-off-by: Matej Vido <vido@cesnet.cz>
This commit is contained in:
parent
5cc9ad56c2
commit
83556fd2c0
@ -1,5 +1,5 @@
|
||||
.. BSD LICENSE
|
||||
Copyright 2015 CESNET
|
||||
Copyright 2015 - 2016 CESNET
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@ -33,8 +33,8 @@ SZEDATA2 poll mode driver library
|
||||
|
||||
The SZEDATA2 poll mode driver library implements support for cards from COMBO
|
||||
family (**COMBO-80G**, **COMBO-100G**).
|
||||
The SZEDATA2 PMD is virtual PMD which uses interface provided by libsze2
|
||||
library to communicate with COMBO cards over sze2 layer.
|
||||
The SZEDATA2 PMD uses interface provided by libsze2 library to communicate
|
||||
with COMBO cards over sze2 layer.
|
||||
|
||||
More information about family of
|
||||
`COMBO cards <https://www.liberouter.org/technologies/cards/>`_
|
||||
@ -74,50 +74,29 @@ separately:
|
||||
* szedata2_cv3
|
||||
|
||||
Kernel modules manage initialization of hardware, allocation and
|
||||
sharing of resources for user space applications:
|
||||
sharing of resources for user space applications.
|
||||
|
||||
Information about getting the dependencies can be found `here
|
||||
<https://www.liberouter.org/technologies/netcope/access-to-libsze2-library/>`_.
|
||||
|
||||
Configuration
|
||||
-------------
|
||||
|
||||
These configuration options can be modified before compilation in the
|
||||
``.config`` file:
|
||||
|
||||
* ``CONFIG_RTE_LIBRTE_PMD_SZEDATA2`` default value: **n**
|
||||
|
||||
Value **y** enables compilation of szedata2 PMD.
|
||||
|
||||
Using the SZEDATA2 PMD
|
||||
----------------------
|
||||
|
||||
SZEDATA2 PMD can be created by passing ``--vdev=`` option to EAL in the
|
||||
following format:
|
||||
From DPDK version 16.04 the type of SZEDATA2 PMD is changed to PMD_PDEV.
|
||||
SZEDATA2 device is automatically recognized during EAL initialization.
|
||||
No special command line options are needed.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
--vdev 'DEVICE,dev_path=PATH,rx_ifaces=RX_MASK,tx_ifaces=TX_MASK'
|
||||
|
||||
``DEVICE`` and options ``dev_path``, ``rx_ifaces``, ``tx_ifaces`` are mandatory
|
||||
and must be separated by commas.
|
||||
|
||||
* ``DEVICE``: contains prefix ``eth_szedata2`` followed by numbers or letters,
|
||||
must be unique for each virtual device
|
||||
|
||||
* ``dev_path``: Defines path to szedata2 device.
|
||||
Value is valid path to szedata2 device. Example:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
dev_path=/dev/szedataII0
|
||||
|
||||
* ``rx_ifaces``: Defines which receive channels will be used.
|
||||
For each channel is created one queue. Value is mask for selecting which
|
||||
receive channels are required. Example:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
rx_ifaces=0x3
|
||||
|
||||
* ``tx_ifaces``: Defines which transmit channels will be used.
|
||||
For each channel is created one queue. Value is mask for selecting which
|
||||
transmit channels are required. Example:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
tx_ifaces=0x3
|
||||
Kernel modules have to be loaded before running the DPDK application.
|
||||
|
||||
Example of usage
|
||||
----------------
|
||||
@ -128,5 +107,39 @@ transmit channel:
|
||||
.. code-block:: console
|
||||
|
||||
$RTE_TARGET/app/testpmd -c 0xf -n 2 \
|
||||
--vdev 'eth_szedata20,dev_path=/dev/szedataII0,rx_ifaces=0x3,tx_ifaces=0x3' \
|
||||
-- --port-topology=chained --rxq=2 --txq=2 --nb-cores=2
|
||||
-- --port-topology=chained --rxq=2 --txq=2 --nb-cores=2 -i -a
|
||||
|
||||
Example output:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
[...]
|
||||
EAL: PCI device 0000:06:00.0 on NUMA socket -1
|
||||
EAL: probe driver: 1b26:c1c1 rte_szedata2_pmd
|
||||
PMD: Initializing szedata2 device (0000:06:00.0)
|
||||
PMD: SZEDATA2 path: /dev/szedataII0
|
||||
PMD: Available DMA channels RX: 8 TX: 8
|
||||
PMD: resource0 phys_addr = 0xe8000000 len = 134217728 virt addr = 7f48f8000000
|
||||
PMD: szedata2 device (0000:06:00.0) successfully initialized
|
||||
Interactive-mode selected
|
||||
Auto-start selected
|
||||
Configuring Port 0 (socket 0)
|
||||
Port 0: 00:11:17:00:00:00
|
||||
Checking link statuses...
|
||||
Port 0 Link Up - speed 10000 Mbps - full-duplex
|
||||
Done
|
||||
Start automatic packet forwarding
|
||||
io packet forwarding - CRC stripping disabled - packets/burst=32
|
||||
nb forwarding cores=2 - nb forwarding ports=1
|
||||
RX queues=2 - RX desc=128 - RX free threshold=0
|
||||
RX threshold registers: pthresh=0 hthresh=0 wthresh=0
|
||||
TX queues=2 - TX desc=512 - TX free threshold=0
|
||||
TX threshold registers: pthresh=0 hthresh=0 wthresh=0
|
||||
TX RS bit threshold=0 - TXQ flags=0x0
|
||||
testpmd>
|
||||
|
||||
.. note::
|
||||
|
||||
Link speed API currently supports speeds up to 40 Gbps.
|
||||
Therefore there is used 10G constant for 100 Gbps cards until the link speed
|
||||
API is not changed.
|
||||
|
@ -181,6 +181,12 @@ This section should contain new features added in this release. Sample format:
|
||||
|
||||
Only available with Mellanox OFED >= 3.2.
|
||||
|
||||
* **Changed szedata2 type of driver from vdev to pdev.**
|
||||
|
||||
Previously szedata2 device had to be added by ``--vdev`` option.
|
||||
Now szedata2 PMD recognises the device automatically during EAL
|
||||
initialization.
|
||||
|
||||
* **Increased number of next hops for LPM IPv4 to 2^24.**
|
||||
|
||||
The next_hop field is extended from 8 bits to 24 bits for IPv4.
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -34,6 +34,14 @@
|
||||
#ifndef RTE_PMD_SZEDATA2_H_
|
||||
#define RTE_PMD_SZEDATA2_H_
|
||||
|
||||
/* PCI Vendor ID */
|
||||
#define PCI_VENDOR_ID_NETCOPE 0x1b26
|
||||
|
||||
/* PCI Device IDs */
|
||||
#define PCI_DEVICE_ID_NETCOPE_COMBO80G 0xcb80
|
||||
#define PCI_DEVICE_ID_NETCOPE_COMBO100G 0xc1c1
|
||||
#define PCI_DEVICE_ID_NETCOPE_COMBO100G2 0xc2c1
|
||||
|
||||
/* szedata2_packet header length == 4 bytes == 2B segment size + 2B hw size */
|
||||
#define RTE_SZE2_PACKET_HEADER_SIZE 4
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user