Commit Graph

12699 Commits

Author SHA1 Message Date
Alejandro Lucero
a922c6a789 net/nfp: support new HW offloads API
In next 18.05 the old hw offload API will be removed. This patch adds
support for just the new hw offload API.

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2018-04-14 00:40:21 +02:00
Alejandro Lucero
70217f1d8d net/nfp: remove files
New CPP interface makes NSPU interface obsolete. These files are
not needed anymore.

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2018-04-14 00:40:21 +02:00
Alejandro Lucero
b2a99605bc doc: update NFP guide
New CPP interface changes the way firmware upload is managed by
the PMD. It also supports different firmware file names for
having specific firmware applications per card.

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2018-04-14 00:40:21 +02:00
Alejandro Lucero
896c265ef9 net/nfp: use new CPP interface
PF PMD support was based on NSPU interface. This patch changes the
PMD for using the new CPP user space interface which gives more
flexibility for adding new functionalities.

This change just affects initialization with the datapath being the
same than before.

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2018-04-14 00:40:21 +02:00
Alejandro Lucero
c7e9729da6 net/nfp: support CPP
CPP refers to the internal NFP Command Push Pull bus. This patch allows
to create CPP commands from user space allowing to access any single
part of the chip.

This CPP interface is the base for having other functionalities like
mutexes when accessing specific chip components, chip resources management,
firmware upload or using the NSP, an embedded arm processor which can
perform tasks on demand.

NSP was the previous only way for doing things in the chip by the PMD,
where a NSPU interface was used for commands like firmware upload or
port link configuration. CPP interface supersedes NSPU, but it is still
possible to use NSP through CPP.

CPP interface adds a great flexibility for doing things like extended
stats or firmware debugging.

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2018-04-14 00:40:21 +02:00
Matej Vido
adcca66765 net/szedata2: implement dynamic logging
Signed-off-by: Matej Vido <vido@cesnet.cz>
2018-04-14 00:40:21 +02:00
Matej Vido
b91df5e8da net/szedata2: convert license headers to SPDX tags
Signed-off-by: Matej Vido <vido@cesnet.cz>
2018-04-14 00:40:21 +02:00
Matej Vido
ddbbe324db net/szedata2: fix format string for PCI address
For fscanf() function SCN macros should be used but PRI macros were
wrongly used.
Also use correct sizes of variables for read values.

Fixes: 83556fd2c0 ("szedata2: change to physical device type")
Cc: stable@dpdk.org

Signed-off-by: Matej Vido <vido@cesnet.cz>
2018-04-14 00:40:21 +02:00
Matej Vido
99ad0f1bb0 net/szedata2: add stat of mbuf allocation failures
Signed-off-by: Matej Vido <vido@cesnet.cz>
2018-04-14 00:40:21 +02:00
Matej Vido
4d0229f77c net/szedata2: use dynamically allocated queues
Previously the queues were the part of private data structure of the
Ethernet device.
Now the queues are allocated at setup thus numa-aware allocation is
possible.

Signed-off-by: Matej Vido <vido@cesnet.cz>
2018-04-14 00:40:21 +02:00
Matej Vido
745f6a1e7e net/szedata2: fix total stats
Counters from all queues have to be summed up for total stats
even though the number of queue stats counters is not sufficient.

Fixes: 83556fd2c0 ("szedata2: change to physical device type")
Cc: stable@dpdk.org

Signed-off-by: Matej Vido <vido@cesnet.cz>
2018-04-14 00:40:21 +02:00
Ferruh Yigit
e8b3e1a9b1 net/bonding: switch to new offloading API
Switch to new ethdev offloading API.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
2018-04-14 00:40:21 +02:00
Chas Williams
85d3c09a0f net/bonding: clear started state if start fails
There are several error paths where the bonding device may not start.
Clear dev_started before we return if we take one of these paths.

Fixes: 2efb58cbab ("bond: new link bonding library")
Cc: stable@dpdk.org

Signed-off-by: Chas Williams <chas3@att.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
2018-04-14 00:40:21 +02:00
Chas Williams
3639903f48 net/bonding: fix setting VLAN ID on slave ports
The pos returned is just the offset of the slab.  You need to use this
to offset the bits in the slab.

Fixes: c771e4ef38 ("net/bonding: enable slave VLAN filter")
Cc: stable@dpdk.org

Signed-off-by: Chas Williams <chas3@att.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
2018-04-14 00:40:21 +02:00
Stephen Hemminger
3a4b87c897 net/octeontx: fix uninitialized speed variable
This is fix for Coverity Defect 268319 about uninitialized speed
in an error case. Also drop unnecessary assignment.

Coverity issue: 268319
Fixes: 4fac7c0a14 ("net/octeontx: add link update")
CC: stable@dpdk.org

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-04-14 00:40:21 +02:00
Santosh Shukla
ecc3fa6d3e net/octeontx: remove redundant driver name update
Cc: stable@dpdk.org

Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Reviewed-by: David Marchand <david.marchand@6wind.com>
2018-04-14 00:40:21 +02:00
Andrew Rybchenko
553af25720 ethdev: fix library version in meson build
Fixes: 653e038efc ("ethdev: remove versioning of filter control function")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-04-14 00:40:21 +02:00
Shagun Agrawal
436125e641 net/cxgbe: update to Rx/Tx offload API
Update to new Rx/Tx offload API. Always set CRC stripping during
configuration, since it can't be disabled.

Signed-off-by: Shagun Agrawal <shaguna@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
2018-04-14 00:40:21 +02:00
Shagun Agrawal
cda260a4ac net/cxgbe: add option to keep outer VLAN tag in QinQ
Add devargs option to keep outer VLAN tag in Q-in-Q packets.

Signed-off-by: Shagun Agrawal <shaguna@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
2018-04-14 00:40:21 +02:00
Kumar Sanghvi
a9e3e99916 doc: add VF in CXGBE guide
Add documentation on running DPDK on SR-IOV virtual functions for
Chelsio NICs.

Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
2018-04-14 00:40:21 +02:00
Matej Vido
e71530f98c net/szedata2: convert to new offload API
Offload API is currently used only to setup correct receive function
for scattered packets.
Use offloads member instead of bitfield and advertise correct
capabilities.

Signed-off-by: Matej Vido <vido@cesnet.cz>
2018-04-14 00:40:21 +02:00
Scott Branden
fd710bb1f6 net/bnxt: convert to SPDX license tag
Update the license header on bnxt files to be the standard
BSD-3-Clause license used for the rest of DPDK,
bring the files in compliance with the DPDK licensing policy.

Signed-off-by: Scott Branden <scott.branden@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-04-14 00:40:21 +02:00
Pavan Nikhilesh
a92870896b net/octeontx: use the new offload APIs
Use the new Rx/Tx offload APIs and remove the old style offloads.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
2018-04-14 00:40:21 +02:00
Yongseok Koh
f84411be9e net/mlx5: remove excessive data prefetch
In Enhanced Multi-Packet Send (eMPW), entire packet data is prefetched to
LLC if it isn't inlined. Even though this helps reducing jitter when HW
fetches data by DMA, this can thresh the LLC with evicting precious data.
And if the size of queue is large and there are many queues, this might not
be effective. Also, if application runs on a remote node from the PCIe
link, it may not be helpful and can even cause bad results.

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2018-04-14 00:40:21 +02:00
Bin Huang
0915e287a6 net/mlx5: add packet type index for TCP ack
According to CQE format:
- l4_hdr_type:
     0 - None
     1 - TCP header was present in the packet
     2 - UDP header was present in the packet
     3 - TCP header was present in the packet with Empty
         TCP ACK indication. (TCP packet <ACK> flag is set,
         and packet carries no data)
     4 - TCP header was present in the packet with TCP ACK indication.
         (TCP packet <ACK> flag is set, and packet carries data).

A packet should be identified as TCP packet if l4_hdr_type is 1, 3 or 4.
Add corresponding idx of TCP ACK to ptype table.

previous discussion:
https://www.mail-archive.com/users@dpdk.org/msg02980.html

Signed-off-by: Bin Huang <bin.huang@hxt-semitech.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2018-04-14 00:40:21 +02:00
Bruce Richardson
a11dfe9b65 net/mlx: fix warnings for unused compiler arguments
When linking the mlx glue code libraries using CC, the linker arguments in
LDFLAGS are not prefixed with -Wl. [The EXTRA_LDFLAGS are though.] This
leads to warning messages on build:

clang-5.0: warning: argument unused during compilation: '-e xport-dynamic'

Fix this by checking for $LINK_USING_CC in the Makefiles and prefixing the
LDFLAGS appropriately if set.

Fixes: 27cea11686 ("net/mlx4: spawn rdma-core dependency plug-in")
Fixes: 59b91bec12 ("net/mlx5: spawn rdma-core dependency plug-in")
Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2018-04-14 00:40:21 +02:00
Rami Rosen
4db261fc88 net/mlx4: fix a typo in header file
This patch fixes a trivial typo in mlx4 header file.

Fixes: 3d555728c9 ("net/mlx4: separate Rx/Tx definitions")
Cc: stable@dpdk.org

Signed-off-by: Rami Rosen <rami.rosen@intel.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2018-04-14 00:40:21 +02:00
Tiwei Bie
9c7ce8bd2a net/virtio: move to new offloads API
Ethdev offloads API has changed since:

commit ce17eddefc ("ethdev: introduce Rx queue offloads API")
commit cba7f53b71 ("ethdev: introduce Tx queue offloads API")

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2018-04-14 00:40:21 +02:00
Wei Zhao
433d9226db net/i40e: fix flow RSS TCI use
Vlan tci configuration from testpmd is stored in big endian, changing
it to little endian is needed before using it.

Fixes: ecad87d223 ("net/i40e: move RSS to flow API")
Cc: stable@dpdk.org

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Tested-by: Yuan Peng <yuan.peng@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-04-14 00:40:21 +02:00
Wei Dai
e5c05e6590 net/e1000: convert to new Tx offloads API
Ethdev Tx offloads API has changed since:
commit cba7f53b71 ("ethdev: introduce Tx queue offloads API")
This commit support the new Tx offloads API.

Signed-off-by: Wei Dai <wei.dai@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-04-14 00:40:21 +02:00
Wei Dai
ef990fb56e net/e1000: convert to new Rx offloads API
Ethdev Rx offloads API has changed since:
commit ce17eddefc ("ethdev: introduce Rx queue offloads API")
This commit support the new Rx offloads API.

Signed-off-by: Wei Dai <wei.dai@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-04-14 00:40:21 +02:00
Wei Dai
51215925a3 net/ixgbe: convert to new Tx offloads API
Ethdev Tx offloads API has changed since:
commit cba7f53b71 ("ethdev: introduce Tx queue offloads API")
This commit support the new Tx offloads API.

Signed-off-by: Wei Dai <wei.dai@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-04-14 00:40:21 +02:00
Wei Dai
ec3b1124d1 net/ixgbe: convert to new Rx offloads API
Ethdev Rx offloads API has changed since:
commit ce17eddefc ("ethdev: introduce Rx queue offloads API")
This commit support the new Rx offloads API.

Signed-off-by: Wei Dai <wei.dai@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-04-14 00:40:21 +02:00
Wei Dai
860a94d3c6 net/ixgbe: support VLAN strip per queue offloading in VF
VLAN strip is a per queue offloading in VF. With this patch
it can be enabled or disabled on any Rx queue in VF.

Signed-off-by: Wei Dai <wei.dai@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-04-14 00:40:21 +02:00
Wei Dai
216f78f4d5 net/ixgbe: support VLAN strip per queue offloading in PF
VLAN strip is a per queue offloading in PF. With this patch
it can be enabled or disabled on any Rx queue in PF.

Signed-off-by: Wei Dai <wei.dai@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-04-14 00:40:21 +02:00
Yanglong Wu
7497d3e2f7 net/i40e: convert to new Tx offloads API
Ethdev Tx offloads API has changed since:
commit cba7f53b71 ("ethdev: introduce Tx queue offloads API")
This commit support the new Tx offloads API.

Signed-off-by: Yanglong Wu <yanglong.wu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-04-14 00:40:21 +02:00
Yanglong Wu
c3ac7c5b0b net/i40e: convert to new Rx offloads API
Ethdev Rx offloads API has changed since:
commit cba7f53b71 ("ethdev: introduce Rx queue offloads API")
This commit support the new Rx offloads API.

Signed-off-by: Yanglong Wu <yanglong.wu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-04-14 00:40:21 +02:00
Wenzhuo Lu
605c6f9ca5 net/avf: convert to new Rx and Tx offload API
Ethdev Tx offloads API has changed since:
commit cba7f53b71 ("ethdev: introduce Tx queue offloads API")
This commit support the new Rx and Tx offloads API.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2018-04-14 00:40:21 +02:00
Wei Dai
30f3ce999e net/fm10k: convert to new Tx offloads API
Ethdev Tx offloads API has changed since:
commit cba7f53b71 ("ethdev: introduce Tx queue offloads API")
This commit support the new Rx and Tx offloads API.

Signed-off-by: Wei Dai <wei.dai@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-04-14 00:40:21 +02:00
Wei Dai
7151de0f57 net/fm10k: convert to new Rx offloads API
Ethdev Rx offloads API has changed since:
commit ce17eddefc ("ethdev: introduce Rx queue offloads API")
This commit support the new Rx offloads API.

Signed-off-by: Wei Dai <wei.dai@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-04-14 00:40:21 +02:00
Zhiyong Yang
40a7be870e net/virtio-user: fix port id type
virtio-user port_id range should be increased from 8 bits to 16 bits.

Fixes: f8244c6399 ("ethdev: increase port id range")
Cc: stable@dpdk.org

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2018-04-14 00:40:21 +02:00
Zhihong Wang
bd2e0c3fe5 vhost: add APIs for live migration
This patch adds APIs to enable live migration for non-builtin data paths.

At src side, last_avail/used_idx from the device need to be set into the
virtio_net structure, and the log_base and log_size from the virtio_net
structure need to be set into the device.

At dst side, last_avail/used_idx need to be read from the virtio_net
structure and set into the device.

Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2018-04-14 00:40:21 +02:00
Zhihong Wang
07718b4f87 vhost: adapt library for selective datapath
This patch adapts vhost lib for selective datapath by calling device ops
at the corresponding stage.

Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2018-04-14 00:40:21 +02:00
Zhihong Wang
b4953225ce vhost: add APIs for datapath configuration
This patch adds APIs for datapath configuration.

The did of the vhost-user socket can be set to identify the backend device,
in this case each vhost-user socket can have only 1 connection. The did is
set to -1 by default when the software datapath is used.

Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2018-04-14 00:40:21 +02:00
Zhihong Wang
d7280c9fff vhost: support selective datapath
This patch set introduces support for selective datapath in DPDK vhost-user
lib. vDPA stands for vhost Data Path Acceleration. The idea is to support
virtio ring compatible devices to serve virtio driver directly to enable
datapath acceleration.

A set of device ops is defined for device specific operations:

     a. get_queue_num: Called to get supported queue number of the device.

     b. get_features: Called to get supported features of the device.

     c. get_protocol_features: Called to get supported protocol features of
        the device.

     d. dev_conf: Called to configure the actual device when the virtio
        device becomes ready.

     e. dev_close: Called to close the actual device when the virtio device
        is stopped.

     f. set_vring_state: Called to change the state of the vring in the
        actual device when vring state changes.

     g. set_features: Called to set the negotiated features to device.

     h. migration_done: Called to allow the device to response to RARP
        sending.

     i. get_vfio_group_fd: Called to get the VFIO group fd of the device.

     j. get_vfio_device_fd: Called to get the VFIO device fd of the device.

     k. get_notify_area: Called to get the notify area info of the queue.

Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2018-04-14 00:40:21 +02:00
Zhihong Wang
2e28f45b69 vhost: export vhost feature definitions
This patch exports vhost-user protocol features to support device driver
development.

Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2018-04-14 00:40:21 +02:00
Ferruh Yigit
315ee8374e doc: reduce initial offload API rework scope to drivers
Do ethdev new offloading API switch in two steps.

In v18.05 target is implementing the new ethdev-PMD offload interface,
which means converting all PMDs to new offloading API.

Next target is removing the old ethdev offload API.
It will effect applications and will force them to implement new
offloading API.

Fixes: 3004d34541 ("doc: update deprecation of ethdev offload API")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2018-04-15 15:12:27 +02:00
Shreyansh Jain
0da959d484 hash: fix comment for lookup
rte_hash_lookup_with_hash() has wrong comment for its 'sig' param.

Fixes: 1a9f648be2 ("hash: fix for multi-process apps")
Cc: stable@dpdk.org

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2018-04-15 15:07:11 +02:00
Allain Legacy
4f512a1919 ip_frag: fix double free of chained mbufs
The first mbuf and the last mbuf to be visited in the preceding loop
are not set to NULL in the fragmentation table.  This creates the
possibility of a double free when the fragmentation table is later freed
with rte_ip_frag_table_destroy().

Fixes: 95908f5239 ("ip_frag: free mbufs on reassembly table destroy")
Cc: stable@dpdk.org

Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2018-04-15 14:44:07 +02:00
Gowrishankar Muthukrishnan
85bf2b6001 bus/fslmc: fix 64-bit format specifiers
Instead of llX, use C99 standard "PRIu64" in format specifier. Former one
breaks compile in ppc64le.

Fixes: c2c167fdb3 ("bus/fslmc: support memory event callbacks for VFIO")

Signed-off-by: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-04-15 14:14:21 +02:00