When setting up the VEB, default TC bitmap is used.
But after setting the default TC bitmap, it's not stored. So when we're
trying to get the enabled TCs on the VEB, it's always wrong.
Fixes: 5135f3ca49 ("i40e: enable DCB in VMDQ VSIs")
Cc: stable@dpdk.org
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Add KNI PMD which wraps librte_kni for ease of use.
KNI PMD can be used as any regular PMD to send / receive packets to the
Linux networking stack.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Yong Wang <yongwang@vmware.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Yong Wang <yongwang@vmware.com>
This commit adds RX out of buffer counter to xstats report.
The counter counts the number of dropped occurred due to lack of buffers
on device RX queues.
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Calling strncpy with a maximum size argument of 16 bytes on destination
array "ifr.ifr_ifrn.ifrn_name" of size 16 bytes might leave the
destination string unterminated.
Coverity issue: 1407499
Fixes: 6b38b2725c ("net/tap: fix multi-queue support")
Cc: stable@dpdk.org
Signed-off-by: Keith Wiles <keith.wiles@intel.com>
Moved from lib/librte_mempool, stack mempool handler is an independent
driver.
Shared builds would now require to link in librte_mempool_stack for
"stack" mempool handler.
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Moved from lib/librte_mempool, ring mempool is now an independent
driver.
Shared builds would now need to add librte_mempool_ring for:
* ring_mp_mc
* ring_sp_sc
* ring_sp_mc
* ring_mp_sc
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Since there is no "descriptor done" flag like on Intel drivers, the
approach is different on mlx5 driver.
- for Tx, we call txq_complete() to free descriptors processed by
the hw, then we check if the descriptor is between tail and head
- for Rx, we need to browse the cqes, managing compressed ones,
to get the number of used descriptors.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Add an extra parameter to the ring dequeue burst/bulk functions so that
those functions can optionally return the amount of remaining objs in the
ring. This information can be used by applications in a number of ways,
for instance, with single-consumer queues, it provides a max
dequeue size which is guaranteed to work.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Add an extra parameter to the ring enqueue burst/bulk functions so that
those functions can optionally return the amount of free space in the
ring. This information can be used by applications in a number of ways,
for instance, with single-producer queues, it provides a max
enqueue size which is guaranteed to work. It can also be used to
implement watermark functionality in apps, replacing the older
functionality with a more flexible version, which enables apps to
implement multiple watermark thresholds, rather than just one.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
When a C file for a library/driver is including the public header files for
that library, those need to be included as local includes using quotes
rather than angle-brackets. Without doing so, parallel builds can fail, as
the compiler will only look for those headers in the global include folder
rather than locally, and the build system does not enforce that the headers
for a lib are installed before the rest of the lib is compiled.
Fixes: 097ab0bac0 ("crypto/scheduler: add API")
Fixes: 503e9c5afb ("crypto/scheduler: register as vdev driver")
Fixes: 31439ee72b ("crypto/scheduler: add API implementations")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Xenvirt driver uses the cmdline lib for parsing ether addresses so add it
as a dependency to fix builds.
Fixes: feb9f680cd ("mk: optimize directory dependencies")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Rather than reading the size directly from the ring structure, use the
dedicated ring function for that purpose.
Previous commits to do this only did so for the null crypto driver which
was the only one compiled in by default, but all other drivers need to be
similarly updated.
Fixes: b11c78a2e0 ("crypto/null: use ring size function")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Before this patch, the management of dependencies between directories
had several issues:
- the generation of .depdirs, done at configuration is slow: it can take
more than one minute on some slow targets (usually ~10s on a standard
PC without -j).
- for instance, it is possible to express a dependency like:
- app/foo depends on lib/librte_foo
- and lib/librte_foo depends on app/bar
But this won't work because the directories are traversed with a
depth-first algorithm, so we have to choose between doing 'app' before
or after 'lib'.
- the script depdirs-rule.sh is too complex.
- we cannot use "make -d" for debug, because the output of make is used for
the generation of .depdirs.
This patch moves the DEPDIRS-* variables in the upper Makefile, making
the dependencies much easier to calculate. A DEPDIRS variable is still
used to process library dependencies in LDLIBS.
After this commit, "make config" is almost immediate.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Tested-by: Robin Jarry <robin.jarry@6wind.com>
Tested-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Add support to the vHostdriver for the new API to force free consumed
buffers on Tx ring. vHost does not cache the mbufs so there is no work
to do.
Signed-off-by: Billy McFall <bmcfall@redhat.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
Add support to the e1000 igb driver for the new API to force free
consumed buffers on Tx ring. This API is independent of the tx_rs_thresh
setting. With this API, buffers should be free even if tx_rs_thresh is
not met.
e1000 igb driver does not implement a tx_rs_thresh to free mbufs, it
frees a slot in the ring as needed. However, it could be implemented at
some future date.
Signed-off-by: Billy McFall <bmcfall@redhat.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
When possible, replace the uses of rte_mempool_create() with
the helper provided in librte_mbuf: rte_pktmbuf_pool_create().
This is the preferred way to create a mbuf pool.
This also updates the documentation.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
The check of queue_id is done in all drivers implementing
rte_eth_rx_queue_count(). Factorize this check in the generic function.
Note that the nfp driver was doing the check differently, which could
induce crashes if the queue index was too big.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Rather than reading the size directly from the ring structure,
use the dedicated function for that purpose.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Re-enable CONFIG_RTE_LIBRTE_SCHED, since it is needed to build
correctly.
Fix a few warnings when compiling mpipe_tilegx.c.
Remove an empty rte_cpu_feature_table[] array using a bogus type.
Properly set RTE_OBJCOPY_{TARGET,ARCH} in mk/arch/tile/rte.vars.mk.
Signed-off-by: Chris Metcalf <cmetcalf@mellanox.com>
These headers are not part of the set that are upstreamed as part
of glibc or the kernel, and we only need a few defines from each.
The hardware is frozen so these values are not going to change
in any case.
Signed-off-by: Chris Metcalf <cmetcalf@mellanox.com>
Fixes the missed session backup during enqueue.
Fixes: 100e4f7e44 ("crypto/scheduler: add round-robin mode")
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Fixes the wrong slave initialization issue on start-up
Fixes: 100e4f7e44 ("crypto/scheduler: add round-robin mode")
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
When ciphering and authenticating in the same operation
(cipher-then-auth or auth-then-cipher),
the cipher key and authentication key were set with the same
key, in SNOW3G, KASUMI and ZUC PMDs.
They were using the key of the first transform structure,
instead of using the keys of the two different transform
structures.
This is not a big issue, since usually, the same key is
used for ciphering and authentication, but keys may be different.
Fixes: 3aafc423cf ("snow3g: add driver for SNOW 3G library")
Fixes: 2773c86d06 ("crypto/kasumi: add driver for KASUMI library")
Fixes: cf7685d68f ("crypto/zuc: add driver for ZUC library")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
AESNI MB now supports authentication only operations,
but the array containing all the possible digest lengths
was not updated to reflect the new algorithm NULL_HASH,
causing an "Out-of-bounds access".
Coverity issue: 140977
Fixes: 8772c3f713 ("crypto/aesni_mb: add single operation functionality")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
The range of TC bandwidth is 0 ~ 800, it's 16bits not 8bits.
Fixes: c8b9a3e3fe ("i40e: support DCB mode")
Cc: stable@dpdk.org
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Use vlan_mask->tci as big endian since this is how rte flow defines it.
Fixes: 11777435c7 ("net/ixgbe: parse flow director filter")
Fixes: 37ed39b4e6 ("net/ixgbe: add TCI mask check for flow director")
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Trying to query the link status through the new ETHTOOL_GLINKSETTINGS
ioctl available since Linux 4.5 was always failing due to a kernel bug
fixed since version 4.9.
This commit also addresses a common issue where the headers version used
at compile time differs from that of the kernel on the target system, by
always defining missing symbols and moving the kernel version check at run
time.
Fixes: 1884087198 ("net/mlx5: fix support for newer link speeds")
CC: stable@dpdk.org
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Vector PMD will check 4 descs in one time, but the statuses are not
consistent because the memory allocated for RX descriptors is cacheable
huagepage.
This patch is to calculate the number of received packets by scann DD bit
sequentially, and stops when meeting the first packet with DD bit unset.
Fixes: b20971b6cc ("net/ixgbe: implement vector driver for ARM")
Cc: stable@dpdk.org
Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org>
To get better performance, Rx bulk alloc recv function will scan 8 descs
in one time, but the statuses are not consistent on ARM platform because
the memory allocated for Rx descriptors is cacheable hugepages.
This patch is to calculate the number of received packets by scan DD bit
sequentially, and stops when meeting the first packet with DD bit unset.
Fixes: 7431041062 ("ixgbe: allow rx bulk alloc")
Cc: stable@dpdk.org
Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Hard coded mask values were being used for several of the IPv4 and IPv6
fields. Use the values in the rte_eth_fdir_masks structure provided by the
caller.
Fixes: dfbd6a9cb5 ("net/enic: extend flow director support for 1300 series")
Cc: stable@dpdk.org
Signed-off-by: John Daley <johndale@cisco.com>
PKT_TX_TUNNEL_MASK and PKT_TX_IEEE1588_TMST are missed in bitmask
of all supported packet Tx flags by i40e. It will cause packet preparing
fail when sending tunnel packets with Tx offload.
This patch fixes it.
Fixes: 3f33e643e5 ("net/i40e: add Tx preparation")
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Fix the redundant delay in function link update. There is no need to
call rte_delay_ms and hold CPU for 100ms when link status is up.
Fixes: 263333bbb7 ("i40e: fix link status timeout")
Cc: stable@dpdk.org
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
The total length field in descriptor of inlined multi-packet send must be
updated before closing a session. There's possibility of updating it
afterward. This bug might cause one packet out of MLX5_MPW_DSEG_MAX gets
silently dropped by HW and impact performance, especially lossless test.
Fixes: 230189d9ff ("net/mlx5: support multi-packet send")
Cc: stable@dpdk.org
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Missed packets on RX were erroneously being assigned to the ierrors
struct member. Change it to be assigned to imissed.
Fixes: 4861cde461 ("i40e: new poll mode driver")
Cc: stable@dpdk.org
Signed-off-by: Tom Crugnale <tcrugnale@sandvine.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
The GL_SWR_PRI_JOIN_MAP registers are effective on filters, changing
the register's default value will fail the ethertype filter.
The GL_SWR_PRI_JOIN_MAP values are different for each NIC, and current
X722 register values are wrong.
Fix X722 ethertype filter by setting registers to X722 default NVM
values.
Fixes: 92fbf2cbdf ("i40e: support X722 and its A0 hardware")
Cc: stable@dpdk.org
Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
dev_flags is wrongly overwritten with RTE_ETH_DEV_DETACHABLE value
in drivers after rte_eth_copy_pci_info().
Previous values of the dev_flags set in rte_eth_copy_pci_info(),
like RTE_ETH_DEV_INTR_LSC, are get lost. That will fail the device
configuration.
Fix by preventing dev_flags overwritten.
Fixes: 22dda618c0 ("pci: separate detaching ethernet ports from PCI devices")
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Signed-off-by: Jeff Guo <jia.guo@intel.com>
Creating IPv4 flow and IPv6 flow will cause conflict error.
Root cause is there's no IP info included in tunnel filter
input.
Fixes: 425c3325f0 ("net/i40e: store tunnel filter")
Fixes: d416530e63 ("net/i40e: parse tunnel filter")
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
VNI of VXLAN is parsed wrongly. The root cause is that
array VNI in item VXLAN uses network byte ordering.
Fixes: d416530e63 ("net/i40e: parse tunnel filter")
Signed-off-by: Beilei Xing <beilei.xing@intel.com>