This commit adds support for modifying the VID of the outermost VLAN
header already present in the packet.
Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
This commit adds support for modifying the VLAN ID (VID) field
in an about-to-be-pushed VLAN header.
This feature can only modify the VID field of a new VLAN header yet
to be pushed. It does not support modifying an existing or already
pushed VLAN headers.
Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
This commit adds support for modifying the VLAN priority (PCP) field
in about-to-be-pushed VLAN header.
This feature can only modify the PCP field of a new VLAN header yet
to be pushed. It does not support modifying an existing or already
pushed VLAN headers.
Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
This commit adds support for RTE_FLOW_ACTION_TYPE_OF_PUSH_VLAN using
direct verbs flow rules.
If present in the flow, The VLAN default values are taken from the
VLAN item configuration.
In this commit only the VLAN TPID value can be set since VLAN
modification actions are not supported yet.
Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
This commit adds support for RTE_FLOW_ACTION_TYPE_OF_POP_VLAN via
direct verbs flow rules.
Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
This commit adds the mlx5dv VLAN push and pop commands to mlx5_glue
interface.
Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
This commit adds a helper routine that supports searching for a
specific action in a list of actions.
Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
If VLAN tag insertion transmit offload is engaged
(DEV_TX_OFFLOAD_VLAN_INSERT in tx queue configuration is set)
the transmit descriptor may be built with wrong format, due to
packet length is not adjusted. Also, the ring buffer wrap up
is not handled correctly.
Fixes: 18a1c20044 ("net/mlx5: implement Tx burst template")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Restrict this header inclusion to its real users.
Fixes: 028669bc9f ("eal: hide shared memory config")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
With VERBOSE=1, this error was seen in debug mode with gcc 9.1:
In file included from /tmp/dpdk.auto-config-h.sh.c.w0VWMi:1:
In file included from rdma-core/build/include/infiniband/mlx5dv.h:47:
In file included from rdma-core/build/include/infiniband/verbs.h:46:
In file included from rdma-core/build/include/infiniband/verbs_api.h:66:
In file included from rdma-core/build/include/infiniband/ib_user_ioctl_verbs.h:38:
include/rdma/ib_user_verbs.h:161:28: fatal error:
zero size arrays are an extension [-Wzero-length-array]
__aligned_u64 driver_data0;
^
1 error generated.
As a result, buildtools/auto-config-h.sh was not generating
a correct autoconf file, so the compilation was generating such error:
fatal error: redefinition of 'mlx5_ib_uapi_flow_action_packet_reformat_type'
It is fixed by disabling -pedantic option when calling auto-config-h.sh
from the makefile-based system.
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Luca Boccassi <bluca@debian.org>
Acked-by: Matan Azrad <matan@mellanox.com>
If rdma-core is not installed in a standard directory of the system,
it is possible to specify the location of the pkgconfig file via
an environment variable:
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:~/rdma-core/build/lib/pkgconfig
In this case, the dependency may become mandatory to specify
for the configuration tests (checking dependency symbols or fields).
Some spacing is also fixed around.
Fixes: 8e49376400 ("net/mlx4: add external allocator for Verbs object")
Fixes: 1dd7c7e38c ("net/mlx4: support meson build")
Fixes: 96d7c62a70 ("net/mlx5: support meson build")
Cc: stable@dpdk.org
Suggested-by: Luca Boccassi <bluca@debian.org>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Luca Boccassi <bluca@debian.org>
Acked-by: Matan Azrad <matan@mellanox.com>
Some drivers were missing reasons text for their disabling in meson.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Luca Boccassi <bluca@debian.org>
As explained in drivers/meson.build,
"
For the find_library() case (but not with dependency()) we also
need to specify the "-l" flags in pkgconfig_extra_libs variable
too, so that it can be reflected in the pkgconfig output for
static builds.
"
The commit e30b4e566f ("build: improve dependency handling")
must be followed up with this one in order to remove more
occurences of pkgconfig_extra_libs redundant with use of dependency().
Fixes: f1debd77ef ("net/af_xdp: introduce AF_XDP PMD")
Fixes: 3c32e89f68 ("compress/isal: add skeleton ISA-L compression PMD")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Luca Boccassi <bluca@debian.org>
The simple Tx path in virtio has been removed in below commit.
This patch removes an undefined function declaration of simple
Tx and all related descriptions in the doc.
Fixes: 57f818963d ("net/virtio: remove simple Tx path")
Cc: stable@dpdk.org
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Constant MLX5_GROUP_FACTOR is defined with value 1, and used to
multiply group value in two places.
This patch removes the unneeded constant definition and use.
Fixes: 4f84a19779 ("net/mlx5: add Direct Rules API")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
This adds support for adding a new UDP tunnel port
on a specific VXLAN types.
Currently we only support VXLAN, VXLAN-GPE on ports
4789, 4790 respectively. Without having to configure
anything in the NIC.
Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
This patch updates the validation function of jump action.
It adds check of conflicting fate actions in flow rule.
It also removes check of action->type which is not needed.
Fixes: 684b9a1b1f ("net/mlx5: support jump action")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Function mlx5_flow_validate_action_drop() checks if another fate
action is already present in this flow rule, using defined value
MLX5_FLOW_FATE_ACTIONS.
This patch enhances the check using value
(MLX5_FLOW_FATE_ACTIONS | MLX5_FLOW_FATE_ESWITCH_ACTIONS)
to make sure all relevant fate actions are checked.
Fixes: 23c1d42c71 ("net/mlx5: split flow validation to dedicated function")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
In struct mlx5_ibv_shared, member esw_drop_action was added between
existing member tx_tbl and the comment line describing it.
This patch moves the comment line to its original location, and fixes
a typo in the comment.
Fixes: 34fa7c0268 ("net/mlx5: add drop action to Direct Verbs E-Switch")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
The hw ptype information is missed for IP-in-IP tunnel.
It should be RTE_PTYPE_TUNNEL_IP ptype.
Fixes: 5e33bebdd8 ("net/mlx5: support IP-in-IP tunnel")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
x550 NIC VF port has the capacity to set RSS hash,
so device info get function should report that.
Fixes: 2144f6630f ("ixgbe: add redirection table size in device info")
Cc: stable@dpdk.org
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
A new mail box version of ixgbe_mbox_api_13 need to be enabled for PF
host, in order that it can communicate with VF for queue number.
Fixes: 46b14c2311 ("ixgbe: get VF queue number")
Cc: stable@dpdk.org
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
Interrupt mode is not working on X552/557 device because
this device doesn't enable the queue interrupt mapping,
this patch fixed the issue.
Fixes: d2e72774e5 ("ixgbe/base: support X550")
Cc: stable@dpdk.org
Signed-off-by: Junyu Jiang <junyux.jiang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
The vmxnet3_prep_pkts function set rte_errno to ENOTSUP for any packets
having PKT_TX_IP_CHECKSUM set in ol_flags. But the vmxnet3 has
DEV_TX_OFFLOAD_IPV4_CKSUM set in this tx offload capa.
This issue has been introduced with the new Rx offload
API. DEV_TX_OFFLOAD_IPV4_CKSUM and DEV_RX_OFFLOAD_IPV4_CKSUM has been
added to the tx/rx offloads capa, but the vmxnet3 driver doesn't support
it.
To fix the issue, DEV_TX/RX_OFFLOAD_IPV4_CKSUM needs to be removed from
tx/rx offload capa.
Fixes: 95e4a96ccb ("net/vmxnet3: convert to new Rx offload API")
Cc: stable@dpdk.org
Signed-off-by: Maxime Leroy <maxime.leroy@6wind.com>
Acked-by: Yong Wang <yongwang@vmware.com>
Since "link.link_duplex" has been assigned to ETH_LINK_FULL_DUPLEX just
before switch statement, the assignment in switch-case statement is
redundant. Remove it.
Fixes: 82113036e4 ("ethdev: redesign link speed config")
Cc: stable@dpdk.org
Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
vPMD for aarch64 calculates the number of received packets using a loop.
Change to use NEON intrinsics for calculation. This saves CPU cycles
and has slightly better performance.
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
The memory barrier was intended for descriptor data integrity (see
comments in [1]). As later NEON loads were implemented and a whole
entry is loaded in one-run and atomic, that makes the ordering of
partial loading unnecessary. Remove it accordingly.
Corrected couple of code comments.
In terms of performance, observed slightly higher average throughput
in tests with 82599ES NIC.
[1] http://patches.dpdk.org/patch/18153/
Fixes: 989a840505 ("net/ixgbe: fix received packets number for ARM NEON")
Cc: stable@dpdk.org
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
As packet length extraction code was simplified,the ordering
was not necessary any more.[1]
2% performance gain was measured on Marvell ThunderX2.
4.3% performance gain was measured on Ampere eMAG80
[1] http://mails.dpdk.org/archives/dev/2016-April/037529.html
Fixes: ae0eb310f2 ("net/i40e: implement vector PMD for ARM")
Cc: stable@dpdk.org
Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Steve Capper <steve.capper@arm.com>
For x86, the descriptors needs to be loaded in order, so in between two
descriptors loading, there is a compiler barrier in place.[1]
For aarch64, a patch [2] is in place to survive with discontinuous DD
bits, the barriers can be removed to take full advantage of out-of-order
execution.
50% performance gain in the RFC2544 NDR test was measured on ThunderX2.
12.50% performance gain in the RFC2544 NDR test was measured on Ampere
eMAG80 platform.
[1] http://inbox.dpdk.org/users/039ED4275CED7440929022BC67E7061153D71548@
SHSMSX105.ccr.corp.intel.com/
[2] https://mails.dpdk.org/archives/stable/2017-October/003324.html
Fixes: ae0eb310f2 ("net/i40e: implement vector PMD for ARM")
Cc: stable@dpdk.org
Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Steve Capper <steve.capper@arm.com>
The AltiVec header file breaks boolean type:
error: incompatible types when initializing type
'__vector _bool int' {aka '_vector(4) __bool int'} using type 'int'
If __APPLE_ALTIVEC__ is defined, then bool type is redefined
and conflicts with stdbool.h.
There is no good solution to fix it for the whole project without
breaking something else, so a workaround is inserted in mlx5 PMD.
This workaround is not compatible with C++ but there is no C++ in DPDK.
Related to: 725f5dd0bf ("net/mlx5: fix build on PPC64")
Cc: stable@dpdk.org
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Tested-by: David Christensen <drc@linux.vnet.ibm.com>
Acked-by: Matan Azrad <matan@mellanox.com>
atl_dev_info_get() is declared twice in atl_ethdev.c.
Delete one of these declarations.
Fixes: bb42aa9ffe ("net/atlantic: configure device start/stop")
Cc: stable@dpdk.org
Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Igor Russkikh <igor.russkikh@aquantia.com>
Add multiple processes support for ice, secondary processes will share
memory and configuration with primary process, do not need further
initialization for secondary processes.
Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
The rte_eth_dev_close() function now handles freeing resources for
devices (e.g., mac_addrs). To conform with the new close() behaviour we
are asserting the RTE_ETH_DEV_CLOSE_REMOVE flag so that
rte_eth_dev_close() releases all device level dynamic memory.
Signed-off-by: Rastislav Cernay <cernay@netcope.com>
Acked-by: Jan Remes <remes@netcope.com>
The rte_eth_dev_close() function now handles freeing resources for
devices (e.g., mac_addrs). To conform with the new close() behaviour we
are asserting the RTE_ETH_DEV_CLOSE_REMOVE flag so that
rte_eth_dev_close() releases all device level dynamic memory.
Signed-off-by: Rastislav Cernay <cernay@netcope.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Jan Remes <remes@netcope.com>
af_packet driver is leaving stale socket after device is removed.
Ring buffers are memory mapped when device is added using rte_dev_probe.
There is no corresponding munmap call when device is removed/closed.
This commit fixes the issue by calling munmap
from rte_pmd_af_packet_remove().
Bugzilla ID: 339
Fixes: e6ee4db01b ("af_packet: make the device detachable")
Cc: stable@dpdk.org
Signed-off-by: Abhishek Sachan <abhishek.sachan@altran.com>
Reviewed-by: John W. Linville <linville@tuxdriver.com>
Timestamp is always set in PCAP header, whether it reads a file or
listen on an interface. This information can be important for some
applications and it cannot be obtained otherwise (especially when
reading a PCAP file, where the timestamp is not the current time).
Timestamp here is the number of microseconds since epoch.
Signed-off-by: Sylvain Rodon <srn@nexatech.fr>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
The generic RTE_LOGTYPE_PMD is a historical relic and should
be deprecated. Every driver must register its own logtype.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
The generic RTE_LOGTYPE_PMD is a historical relic and should
be deprecated. Every driver must register its own logtype.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Replace the boilerplate BSD license text with the equivalent
SPDX license id.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Tetsuya Mukawa <mtetsuyah@gmail.com>
Acked-by: Takanari Hayama <taki@igel.co.jp>
Fix some mistakes in Tx bursts in regard to TSO flag check.
Fixes: 18a1c20044 ("net/mlx5: implement Tx burst template")
Cc: stable@dpdk.org
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
For the rte_flow_action_raw_encap, the header definition for
encapsulation must be available, otherwise it will lead to crash on some
OFED versions and logically it should be rejected.
Fixes: 8ba9eee4ce ("net/mlx5: add raw data encap/decap to Direct Verbs")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Dekel Peled <dekelp@mellanox.com>
The ops pointers in fm10k_stats_get() are set up from primary
process, when secondary process calls these ops pointers,
a segment fault will happen.
Fixes: 7223d200c2 ("fm10k: add base driver")
Cc: stable@dpdk.org
Signed-off-by: Lu Qiuwen <luqiuwen@iie.ac.cn>
Acked-by: Xiao Wang <xiao.w.wang@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
I40evf queue can not work properly with kernel pf driver for X722 vf.
Eg. when configure 8 queues pair, only 4 queues can receive packets,
and half packets will be lost if using 2 queues pair.
This issue is caused by misconfiguration of look up table, the original
code of LUT configuration did not work for X722 vf, use aq command to
setup the LUT to make it work properly.
Fixes: cea7a51c17 ("i40evf: support RSS")
Cc: stable@dpdk.org
Acked-by: Beilei Xing <beilei.xing@intel.com>
Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
Rather than the global promiscuous mode on all slaves, let's try to use
allmulti.
To do this, we apply the same mechanism than for promiscuous and drop in
rx_burst.
When adding a slave, we first try to use allmulti, else we try
promiscuous.
Because of this, we must be able to handle allmulti on the bonding
interface, so the associated dev_ops is added with checks on which mode
has been applied on each slave.
Rather than add a new flag in the bond private structure, we can remove
promiscuous_en since ethdev already maintains this information.
When starting the bond device, there is no promisc/allmulti re-apply
as, again, ethdev does this itself.
On reception, we must inspect if the packets are multicast or unicast
and take a decision to drop based on which mode has been enabled on the
bonding interface.
Note: in the future, if we define an API so that we can add/remove mc
addresses to a port (rather than the current global set_mc_addr_list
API), we can refine this to only register the LACP multicast mac
address.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Chas Williams <chas3@att.com>
By default, the 802.3ad code enables promisc mode on all slaves.
To avoid all packets going to the application (unless the application
asked for promiscuous mode), all frames are supposed to be filtered in
the rx burst handler.
However the incriminated commit broke this because non pure ethernet
frames (basically any unicast Ether()/IP() packet) are not filtered
anymore.
Fixes: 71b7b37ec9 ("net/bonding: use ptype flags for LACP Rx filtering")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Chas Williams <chas3@att.com>
Fast queue Rx burst function is missing checks on promisc and the
slave collecting state.
Define an inline wrapper to have a common base.
Fixes: 112891cd27 ("net/bonding: add dedicated HW queues for LACP control")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Chas Williams <chas3@att.com>
We'd better consolidate the fast queue and the normal tx burst functions
under a common inline wrapper for maintenance.
But looking closer at the bufs_slave_port_idxs[] mapping array in those
tx burst functions, its size is invalid since up to nb_bufs are handled
here.
A previous patch [1] fixed this issue for balance tx burst function
without mentioning it.
802.3ad and balance modes are functionally equivalent on transmit.
The only difference is on the slave id distribution.
Add an additional inline wrapper to consolidate even more and fix this
issue.
[1]: https://git.dpdk.org/dpdk/commit/?id=c5224f623431
Fixes: 09150784a7 ("net/bonding: burst mode hash calculation")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Chas Williams <chas3@att.com>
This reverts commit aa2c00702b, which
introduced the possibility of an invalid address exception when running
an application with a stopped receive queue. The issues with rxq stop/start
will be revisited in the 19.11 release timeframe.
Fixes: aa2c00702b ("net/bnxt: fix traffic stall on Rx queue stop/start")
Cc: stable@dpdk.org
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>