Commit Graph

4892 Commits

Author SHA1 Message Date
Fiona Trahe
3b12d382db crypto/qat: fix truncated response ring value
Issue detected by coverity. Could never actually cause a
problem as truncated value (0x7f7f7f7f->0x7f) is what's needed.
But fix in code for correctness.

Coverity issue: 194998
Fixes: 571365dd4c ("crypto/qat: enable Rx head writes coalescing")
Cc: stable@dpdk.org

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
2018-01-29 20:22:33 +01:00
Fiona Trahe
4e0955bddb crypto/qat: fix null auth algo overwrite
If auth algorithm is RTE_CRYPTO_AUTH_NULL and digest_length is 0
in the xform and digest pointer is set in the op, then
the PMD may overwrite memory at the digest pointer.
With this patch the memory is not overwritten.

Fixes: db0e952a5c ("crypto/qat: add NULL capability")
Cc: stable@dpdk.org

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
2018-01-29 20:22:33 +01:00
Tomasz Jozwiak
c202320775 crypto/qat: fix parameter type
This commit fixes right cast from qat_cipher_get_block_size
function. This function can return -EFAULT in case of
any error, and that value must be cast to int instead of uint8_t

Fixes: d18ab45f76 ("crypto/qat: support DOCSIS BPI mode")
Cc: stable@dpdk.org

Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2018-01-29 20:22:33 +01:00
Tomasz Jozwiak
2c4e6fd19c crypto/qat: fix typo in error message
This commit fixes typo in bpi_cipher_decrypt error message

Fixes: d18ab45f76 ("crypto/qat: support DOCSIS BPI mode")
Cc: stable@dpdk.org

Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2018-01-29 20:22:33 +01:00
Tomasz Jozwiak
8aa8ee9d2d crypto/qat: fix out-of-bounds access
This commit fixes
  - bpi_cipher_encrypt to prevent before 'array subscript is
    above array bounds' error
  - bpi_cipher_decrypt to prevent before 'array subscript is
    above array bounds' error

Fixes: d18ab45f76 ("crypto/qat: support DOCSIS BPI mode")
Cc: stable@dpdk.org

Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2018-01-29 20:22:33 +01:00
Akhil Goyal
a74af788c6 crypto/dpaa_sec: support scatter gather
Signed-off-by: Alok Makhariya <alok.makhariya@nxp.com>
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-29 20:22:33 +01:00
Akhil Goyal
37f96eb01b crypto/dpaa2_sec: support scatter gather
Signed-off-by: Alok Makhariya <alok.makhariya@nxp.com>
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-29 20:22:33 +01:00
Thomas Monjalon
2ab9a94831 crypto/dpaa2_sec: fix build with GCC 7
Seen with GCC 7.2.0, a switch fall through is detected and
cannot be fixed with a fall-through comment or attribute:

drivers/crypto/dpaa2_sec/hw/rta/operation_cmd.h:89:6: error:
this statement may fall through [-Werror=implicit-fallthrough=]
   if (rta_sec_era < RTA_SEC_ERA_2)
      ^

The check is disabled in dpaa2_sec Makefile but not in dpaa_sec Makefile
which uses source code shared by dpaa2_sec.

The workaround is to disable the check at the beginning of the file.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2018-01-29 23:38:24 +01:00
Thomas Monjalon
d961c37439 crypto/mrvl: fix export map file name
Fixes: 8a61c83af2 ("crypto/mrvl: add mrvl crypto driver")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2018-01-29 23:35:29 +01:00
Neil Horman
a6ec31597a mk: add experimental tag check
Add checks during build to ensure that all symbols in the EXPERIMENTAL
version map section have __experimental tags on their definitions, and
enable the warnings needed to announce their use.  Also add an
ALLOW_EXPERIMENTAL_APIS define to allow individual libraries and files
to declare the acceptability of experimental api usage

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2018-01-29 23:35:29 +01:00
Neil Horman
77b7b81e32 add experimental tag to appropriate functions
Append the __rte_experimental tag to api calls appearing in the
EXPERIMENTAL section of their libraries version map

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2018-01-29 23:35:29 +01:00
Hemant Agrawal
8824b74d8f bus/fslmc: register platform HW mempool on runtime
Detect if the DPAA2 mempool objects are present and register
it as platform default hw mempool

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-29 19:02:05 +01:00
Hemant Agrawal
2bd0d5b951 bus/dpaa: register platform HW mempool on runtime
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-29 19:02:05 +01:00
Yongseok Koh
1742c2d9fa net/mlx5: fix synchronization on polling Rx completions
Polling a new packet is basically sensing the generation bit in a
completion entry. For some processors not having strongly-ordered memory
model, there has to be a memory barrier between reading the generation bit
and other fields of the entry in order to guarantee data is not stale.

Fixes: 570acdb1da ("net/mlx5: add vectorized Rx/Tx burst for ARM")
Cc: stable@dpdk.org

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2018-01-28 08:30:36 +01:00
Yongseok Koh
4fe7f662ac net/mlx5: replace I/O memory barrier with coherent version
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
2018-01-28 08:30:35 +01:00
Yongseok Koh
8d27708212 net/mlx5: remove unnecessary memory barrier
As rte_write64() has an IO barrier, there's no need to have a barrier
before the call.

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
2018-01-28 08:30:33 +01:00
Zhiyong Yang
8b35ad02db event/opdl: fix icc build
ICC reports the issue at compile time as follows.
error #592: variable "i" is used before its value is set
        RTE_SET_USED(i);

The patch is to fix it. GCC and CLANG has been tested as well.

Fixes: d548ef513c ("event/opdl: add unit tests")

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Acked-by: Liang Ma <liang.j.ma@intel.com>
2018-01-25 17:11:24 +01:00
Ophir Munk
788203582c net/vdev_netvsc: fix build without C11 and pedantic
Remove CFLAGS -std=c11 and -pedantic in order to guarantee
a successful vdev_netvsc compilation on old Linux distributions.
Otherwise old GCC compilers may complain as follows:
cc1: error: unrecognized command line option -std=c11

Fixes: 6086ab3bb3 ("net/vdev_netvsc: introduce Hyper-V platform driver")

Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
2018-01-24 19:06:31 +01:00
Ophir Munk
e011bad02d net/tap: use local eBPF definitions
eBPF has a graceful approach: it must successfully compile on all Linux
distributions. If a specific kernel cannot support eBPF it will gracefully
refuse the eBPF netlink message sent to it.
The kernel header file linux/bpf.h (if present) on different Linux
distributions may not include all definitions required for TAP
compilation.
In order to guarantee a successful eBPF compilation everywhere all the
required definitions for TAP have been locally added instead of including
file <linux/bpf.h>

Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Tested-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-01-24 19:03:29 +01:00
Pavan Nikhilesh
e865cb4d1c drivers/event: fix resource leak in selftest
Free resources leak in eventdev selftests.

Coverity issue: 257044
Coverity issue: 257047
Coverity issue: 257009
Fixes: 9ef576176d ("test/eventdev: add octeontx multi queue and multi port")
Fixes: 3a17ff401f ("test/eventdev: add basic SW tests")
Fixes: 5e6eb5ccd7 ("event/sw: make test standalone")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-01-24 19:01:31 +01:00
Harry van Haaren
be455196d4 event/opdl: rework loops to comply with dpdk style
This commit reworks the loop counter variable declarations
to be in line with the DPDK source code.

Fixes: 3c7f3dcfb0 ("event/opdl: add PMD main body and helper function")
Fixes: 8ca8e3b48e ("event/opdl: add event queue config get/set")
Fixes: d548ef513c ("event/opdl: add unit tests")

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Liang Ma <liang.j.ma@intel.com>
2018-01-24 18:59:58 +01:00
Jerin Jacob
5b118e894d event/sw: fix debug logging config option
align the config option name with config/common_base

Fixes: aaa4a221da ("event/sw: add new software-only eventdev driver")
Cc: stable@dpdk.org

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-01-24 11:42:49 +01: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
Matan Azrad
ae80146c5a net/failsafe: fix removed device handling
There is time between the physical removal of the device until
sub-device PMDs get a RMV interrupt. At this time DPDK PMDs and
applications still don't know about the removal and may call sub-device
control operation which should return an error.

In previous code this error is reported to the application contrary to
fail-safe principle that the app should not be aware of device removal.

Add an removal check in each relevant control command error flow and
prevent an error report to application when the sub-device is removed.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
2018-01-21 21:09:43 +01:00
Matan Azrad
d3e0f39207 net/mlx5: support a device removal check operation
Add support to get removal status of mlx5 device.
It is not supported in secondary process.

Signed-off-by: Matan Azrad <matan@mellanox.com>
2018-01-21 21:09:41 +01:00
Matan Azrad
cdf4ec6eaa net/mlx4: support a device removal check operation
Add support to get removal status of mlx4 device.

Signed-off-by: Matan Azrad <matan@mellanox.com>
2018-01-21 21:09:41 +01:00
Ophir Munk
036d721a82 net/tap: implement RSS using eBPF
TAP PMD is required to support RSS queue mapping based on rte_flow API. An
example usage for this requirement is failsafe transparent switching from a
PCI device to TAP device while keep redirecting packets to the same RSS
queues on both devices.

TAP RSS implementation is based on eBPF programs sent to Linux kernel
through BPF system calls and using netlink messages to reference the
programs as part of traffic control commands.

TC uses eBPF programs as classifiers and actions.
eBPF classification: packets marked with an RSS queue will be directed
to this queue using TC with "skbedit" action.
BPF classifiers are downloaded to the kernel once on TAP creation for
each TAP Rx queue.

eBPF action: calculate the Toeplitz RSS hash based on L3 addresses and
L4 ports. Mark the packet with the RSS queue according the resulting
RSS hash, then reclassify the packet.
BPF actions are downloaded to the kernel for each new RSS rule.

TAP eBPF requires Linux version 4.9 configured with BPF. TAP PMD will
successfully compile on systems with old or non-BPF configured kernels but
RSS rules creation on TAP devices will not be successful

Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
2018-01-21 15:51:52 +01:00
Ophir Munk
b02d85e19c net/tap: add eBPF API
This commit include BPF API to be used by TAP.

tap_flow_bpf_cls_q() - download to kernel BPF program that classifies
packets to their matching queues
tap_flow_bpf_calc_l3_l4_hash() - download to kernel BPF program that
calculates per packet layer 3 and layer 4 RSS hash
tap_flow_bpf_rss_map_create() - create BPF RSS map for storing RSS
parameters per RSS rule
tap_flow_bpf_update_rss_elem() - update BPF map entry with RSS rule
parameters

Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
2018-01-21 15:51:52 +01:00
Ophir Munk
aabe70df73 net/tap: add eBPF bytes code
File tap_bpf_insns.h was added. It includes  eBPF bytes code
which corresponds to source file tap_bpf_program.c
(see "net/tap: add eBPF program file").
The bytes code is in the format of C arrays of struct bpf_insn and
was generated from the C file tap_bpf_program.c
1. The C file was compiled via LLVM into an object file in ELF
format as:
   clang -O2 -emit-llvm -c tap_bpf_program.c -o - | llc -march=bpf \
   -filetype=obj -o <tap_bpf_program.o>

clang version must be 3.7 and above
The C functions are under different ELF sections and are considered
different BPF programs to be downloaded to the kernel

2. Using an external tool the ELF sections are parsed and the C arrays
of struct bpf_insn are generated. Each C array (corresponding to a
different function under an ELF section) is downloaded to the kernel
using an BPF systm call. The external tool that generates the C arrays
will be added in separate commits.

Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
2018-01-21 15:51:52 +01:00
Ophir Munk
cdc07e83bb net/tap: add eBPF program file
File tap_bpf_program.c was added with two ELF sections
corresponding to two BPF programs and one BPF map.

Section cls_q - BPF classifier to classify packets to their
corresponding queue after an RSS hash was calculated on the packet
and saved in skb->cb[1]
Section l3_l4 - BPF action to calculate RSS hash on packet
layers 3 and 4
This file is not part of DPDK tree compilation.

Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
2018-01-21 15:51:52 +01:00
Ophir Munk
fb847dcf73 net/tap: support actions for different classifiers
Add a generic TC actions handling for TC actions: "mirred",
"gact", "skbedit". This will be useful when introducing
BPF actions, as it uses TCA_BPF_ACT instead of TCA_FLOWER_ACT

Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
2018-01-21 15:51:52 +01:00
Yongseok Koh
f81ec74843 net/mlx5: fix memory region lookup
This patch reverts:
	commit 3a6f2eb8c5 ("net/mlx5: fix Memory Region registration")

Although granularity of chunks in a mempool is a cacheline, addresses are
extended to align to page boundary for performance reason in device when
registering a MR (Memory Region). This could make some regions overlap,
then can cause Tx completion error due to incorrect LKEY search. If the
error occurs, the Tx queue will get stuck. It is because buffer address is
compared against aligned addresses for Memory Region. Saving original
addresses of mempool for comparison doesn't create any overlap.

Fixes: b0b0938457 ("net/mlx5: use buffer address for LKEY search")
Fixes: 3a6f2eb8c5 ("net/mlx5: fix Memory Region registration")
Cc: stable@dpdk.org

Reported-by: Xueming Li <xuemingl@mellanox.com>
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2018-01-21 15:51:52 +01:00
Beilei Xing
c95e859703 net/i40e: ignore case of packet type
Replace strncmp with strncasecmp in i40e_update_customized_ptype
function for compatibility.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-01-21 15:51:52 +01:00
Beilei Xing
645405eace net/i40e: add parser for IPv4/v6 frag
There're new metadata IPV4FRAG and IPV6FRAG in PPP
profile, this patch improves ptype parser to support
IPV4FRAG and IPV6FRAG.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-01-21 15:51:52 +01:00
Beilei Xing
a491e0ef4e net/i40e: fix fail to update packet type table
Fail to update SW ptype mapping table when loading
PPP profile, though profile can be loaded successfully.
It will cause fail to parse SW ptype during receiving
packets. This patch fixes this issue.

Fixes: 11556c915a ("net/i40e: improve packet type parser")
Cc: stable@dpdk.org

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-01-21 15:51:52 +01:00
Beilei Xing
f4c8ad4f97 net/i40e: fix flow director Rx resource defect
FDIR Rx ring isn't initialized and Rx queue HW tail isn't updated
when there's error detected during programming FDIR flow. There'll
be some potential risk.
This patch updates FDIR Rx resource.

Fixes: a778a1fa2e ("i40e: set up and initialize flow director")
Fixes: 05999aab4c ("i40e: add or delete flow director")
Cc: stable@dpdk.org

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2018-01-21 15:51:52 +01:00
Matan Azrad
56252de779 net/vdev_netvsc: add automatic probing
Using DPDK in Hyper-V VM systems requires vdev_netvsc driver to pair
the NetVSC netdev device with the same MAC address PCI device by
fail-safe PMD.

Add vdev_netvsc custom scan in vdev bus to allow automatic probing in
Hyper-V VM systems unless it was already specified by command line.

Add "ignore" parameter to disable this auto-detection.

Signed-off-by: Matan Azrad <matan@mellanox.com>
2018-01-21 15:51:52 +01:00
Matan Azrad
658dea3a5e net/vdev_netvsc: add force parameter
This parameter allows specifying any non-NetVSC interface or routed
NetVSC interfaces to use with tap sub-devices for development purposes.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Matan Azrad <matan@mellanox.com>
2018-01-21 15:51:52 +01:00
Matan Azrad
31182fadfb net/vdev_netvsc: skip routed netvsc probing
NetVSC netdevices which are already routed should not be probed because
they are used for management purposes by the HyperV.

prevent routed netvsc devices probing.

Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
Signed-off-by: Matan Azrad <matan@mellanox.com>
2018-01-21 15:51:52 +01:00
Matan Azrad
e7dc5d7bec net/vdev_netvsc: implement core functionality
As described in more details in the attached documentation (see patch
contents), this virtual device driver manages NetVSC interfaces in virtual
machines hosted by Hyper-V/Azure platforms.

This driver does not manage traffic nor Ethernet devices directly; it acts
as a thin configuration layer that automatically instantiates and controls
fail-safe PMD instances combining tap and PCI sub-devices, so that each
NetVSC interface is exposed as a single consolidated port to DPDK
applications.

PCI sub-devices being hot-pluggable (e.g. during VM migration),
applications automatically benefit from increased throughput when present
and automatic fallback on NetVSC otherwise without interruption thanks to
fail-safe's hot-plug handling.

Once initialized, the sole job of the vdev_netvsc driver is to regularly
scan for PCI devices to associate with NetVSC interfaces and feed their
addresses to corresponding fail-safe instances.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Matan Azrad <matan@mellanox.com>
2018-01-21 15:51:52 +01:00
Matan Azrad
6086ab3bb3 net/vdev_netvsc: introduce Hyper-V platform driver
This patch lays the groundwork for this driver (draft documentation,
copyright notices, code base skeleton and build system hooks). While it can
be successfully compiled and invoked, it's an empty shell at this stage.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Matan Azrad <matan@mellanox.com>
2018-01-21 15:51:52 +01:00
Matan Azrad
53a2d53f89 net/failsafe: add probed device capture
Previous fail-safe code didn't support probed sub-devices capture and
failed when it tried to probe them.

Skip fail-safe sub-device probing when it already was probed.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
2018-01-21 15:51:52 +01:00
Matan Azrad
d1b961dba6 net/failsafe: add fd parameter
This parameter enables applications to provide device definitions
through an arbitrary file descriptor number.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
2018-01-21 15:51:52 +01:00
Adrien Mazarguil
9720e325f0 net/failsafe: fix invalid free
rte_free() is not supposed to work with pointers returned by calloc().

Fixes: a0194d8281 ("net/failsafe: add flexible device definition")
Cc: stable@dpdk.org

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
2018-01-21 15:51:52 +01:00
Andy Moreton
218a16a6dc net/sfc/base: fix unused argument warning
The type_data argument to ef10_rx_qcreate is only used
in builds with EFSYS_OPT_RX_PACKED_STREAM. note this as
an unused argument to avoid warnings in builds without
packed stream support.

Fixes: b749646dad ("net/sfc/base: add function to create packed stream RxQ")

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-01-21 15:51:52 +01:00
Yong Wang
0ff76833f8 net/dpaa: fix potential memory leak
There are several func calls to rte_zmalloc() which don't do null
pointer check on the return value. And before return, the memory is not
freed. Fix it by adding null pointer check and rte_free().

Fixes: 37f9b54bd3 ("net/dpaa: support Tx and Rx queue setup")
Fixes: 62f53995ca ("net/dpaa: add frame count based tail drop with CGR")
Cc: stable@dpdk.org

Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
Reviewed-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2018-01-21 15:51:52 +01:00
Wenzhuo Lu
7f3ef71bfd net/avf: fix makefile typo
A typo in makefile that makes the RX/TX vector code
not to be compiled.

Fixes: 319c421f38 ("net/avf: enable SSE Rx Tx")

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2018-01-21 15:51:52 +01:00
Yongseok Koh
c7bf62255e net/mlx5: fix handling link status event
Even though link of a port gets down, device still can receive traffic.
That is the reason why mlx5_set_link_up/down() switches rx/tx_pkt_burst().
However, if link gets down by an external command (e.g. ifconfig), it isn't
effective. It is better to change burst functions when link status change
is detected.

Fixes: 62072098b5 ("mlx5: support setting link up or down")
Cc: stable@dpdk.org

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2018-01-21 15:51:52 +01:00
Xiao Wang
7365504f77 net/virtio: support guest announce
When live migration is done, for the backup VM, either the virtio
frontend or the vhost backend needs to send out gratuitous RARP packet
to announce its new network location.

This patch enables VIRTIO_NET_F_GUEST_ANNOUNCE feature to support live
migration scenario where the vhost backend doesn't have the ability to
generate RARP packet.

Brief introduction of the work flow:
1. QEMU finishes live migration, pokes the backup VM with an interrupt.
2. Virtio interrupt handler reads out the interrupt status value, and
   realizes it needs to send out RARP packet to announce its location.
3. Pause device to stop worker thread touching the queues.
4. Inject a RARP packet into a Tx Queue.
5. Ack the interrupt via control queue.
6. Resume device to continue packet processing.

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
2018-01-21 15:51:52 +01:00
Maciej Czekaj
c97da2cbc2 net/thunderx: convert to new offload API
This patch removes all references to old-style offload API
replacing them with new offload flags.

Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
2018-01-21 15:51:52 +01:00