When the VLAN is stripped from the packet on receive the
driver must set the PKT_RX_VLAN_STRIPPED flag in the mbuf.
This is done correctly for normal receive in the bnxt driver
but was not being handled correctly in the new SSE code.
Fixes: bc4a000f2f ("net/bnxt: implement SSE vector mode")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
1. Fix ice FDIR and hash flow memory leak.
2. Fix the ice definition of LIST_FOR_EACH_ENTRY_SAFE not
save tmp which cause list deletion incompletely.
Fixes: 5f0978e962 ("net/ice/base: add OS specific implementation")
Fixes: f5cafa961f ("net/ice: add flow director create and destroy")
Fixes: 5ad3db8d4b ("net/ice: enable advanced RSS")
Cc: stable@dpdk.org
Signed-off-by: Tao Zhu <taox.zhu@intel.com>
Reviewed-by: Simei Su <simei.su@intel.com>
Reviewed-by: Yahui Cao <yahui.cao@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
Since VF has no need of firmware, we can skip further adminq init which
involves firmware operation, this patch fixes the testpmd segfault issue
when starting with i40e VF.
Fixes: d5e1a14936 ("net/i40e/base: check MAC type")
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
If there's no mark action when creating a FDIR rule,
there shouldn't be FDIR flags in mbuf.
Fixes: f5cafa961f ("net/ice: add flow director create and destroy")
Fixes: bd984f155f ("net/ice/base: support FDIR")
Cc: stable@dpdk.org
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Max Tx rings count could be lesser than max Rx rings in some
cases, so take this into account as well.
Account for stat contexts available(one for each ring) along with
no: of completion rings(one for each ring) to cap the max no: of
Tx /Rx rings that can be possibly created.
Fixes: f03e66cb64 ("net/bnxt: limit queue count for NS3/Stingray devices")
Cc: stable@dpdk.org
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Set RTE_ETH_DEV_CLOSE_REMOVE upon probe so all the private resources
for the port can be freed by rte_eth_dev_close().
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
The memory for mark table is allocated during port start.
But the allocated memory is freed only during port close
or driver unload which in turn causes a memory leakage
on each port start/stop.
Fixed it by moving the memory free to port stop.
Fixes: 94eb699bc8 ("net/bnxt: support flow mark action")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Driver destroy the VNIC when the port is brought down.
Port HW filter setting such as promiscuos, allmulti and
VLAN filtering will be applied when port is started.
Fixed to return success silently for these callbacks
when port is stopped. Also fixed to clear "bp->dev_stopped"
before invoking bnxt_vlan_offload_set_op() in bnxt_dev_start_op().
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
HWRM_VNIC_CFG command to configure VNIC dynamically with
traffic running is not working. Driver has to free and
recreate the VNIC and then reconfigure the VNIC filters.
Fixes: 7fe5668d2e ("net/bnxt: support VLAN filter and strip")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
There is no condition check for the user requested operation
for VLAN filtering. As a result, VLAN filtering is getting disabled
when the user enables/disables VLAN stripping on same port.
The function bnxt_hwrm_clear_l2_filter() didn't actually free
L2 filter in HW if the reference count of filter is zero.
Fixed it by incrementing the reference count of filter in
bnxt_alloc_filter() routine.
Because of the recent changes in bnxt_hwrm_clear_l2_filter(),
change was needed in the routine bnxt_set_default_mac_addr_op()
to destroy and re-create the default filter when the user
changes the default MAC of the port.
Fixes: 5c1171c972 ("net/bnxt: refactor filter/flow")
Fixes: 6118503d80 ("net/bnxt: fix VLAN filtering")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Use rte_malloc_virt2iova() to obtain the IO address of a
virtual address obtained through rte_malloc().
Fixed to use the iova address returned by rte_memzone_reserve_aligned()
as the call always returns with populating "mz->iova" with
rte_malloc_virt2iova(mz->addr).
Removed redundant rte_mem_lock_page() call to lock the pages.
Fixes: f55e12f334 ("net/bnxt: support extended port counters")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
In FreeBSD environment, nic_uio driver does not support interrupts
and rte_intr_callback_register() will fail to register interrupts
which in turn causes bnxt driver probe failure.
Fixed driver to ignore interrupt callback failures in FreeBSD.
Also fixed to not use a dedicated completion ring for async events
from FW and process these events on RXQ0 in FreeBSD.
Fixes: 6de4c538b3 ("net/bnxt: fix error handling in port start")
Fixes: 43f78b380f ("net/bnxt: retry IRQ callback deregistration")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
If flow create fails due to not enough filter resources,
driver does not populate the rte_flow_error using
rte_flow_error_set().
Since "rte_errno" could have garbage value and is not reliable,
it could cause a segfault in the stack in port_flow_complain().
Fix it to set rte_flow_error using rte_flow_error_set()
when flow create fails due to not enough filter resources.
Fixes: 5c1171c972 ("net/bnxt: refactor filter/flow")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
API makes think that rte_cryptodev_info_get() cannot return
a value >= 3 (RTE_CRYPTO_AEAD_LIST_END in 19.11).
20.02-rc1 was returning 3 (RTE_CRYPTO_AEAD_CHACHA20_POLY1305).
So the ABI compatibility contract was broken.
It could be solved with some function versioning,
but because a lack of time, the feature is reverted for now.
This reverts following commits:
- 6c9f3b347e ("cryptodev: add Chacha20-Poly1305 AEAD algorithm")
- 2c512e64d6 ("crypto/qat: support Chacha Poly")
- d55e01f579 ("test/crypto: add Chacha Poly cases")
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Replace DSW's use of regular DPDK rings (and code for
packing/unpacking control messages into void pointers) with custom
size rings.
In addition to cleaner code, this change allows DSW to support up to
the eventdev API's maximum of 255 ports by tweaking DSW_MAX_PORTS.
Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
The compiler warning is:
from .../drivers/net/ionic/ionic_dev.c:7:
.../drivers/net/ionic/ionic_if.h:202:5: note: ‘rsvd’ declared here
u8 rsvd[62];
^
This has been observed with gcc 4.8.5, newer 9+ compiler are not giving
this warning.
Warning is a reminder to the user that there are some fields in the
struct not initialized with the default value.
But the C standard clarifies that in that case the field value will be
zero and code is aware of this behavior, so no initializing to a default
value is intentional and it is safe to ignore this compiler warning.
Adding '-Wno-missing-field-initializers' compiler flag to disable the
warning.
Reported-by: Anoob Joseph <anoobj@marvell.com>
Reported-by: Raslan Darawsheh <rasland@mellanox.com>
Reported-by: Xueming Zhang <xuemingx.zhang@intel.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Contrary to the -c/-l options, where a logical core runs on the same
physical core in a 1:1 fashion (example: lcore 0 runs on core 0, lcore
16 runs on core 16), the --lcores option makes it possible to select the
physical cores on which runs a logical core.
However the current parsing code still limits the cpuset to the
[0, RTE_MAX_LCORE] range.
Example, before the patch, on a 24 cores system with RTE_MAX_LCORE == 16:
$ ./master/app/testpmd --no-huge --no-pci -m 512 --log-level *:debug \
--lcores 0@16,1@17 -- -i --total-num-mbufs 2048
EAL: Detected lcore 0 as core 0 on socket 0
EAL: Detected lcore 1 as core 1 on socket 0
EAL: Detected lcore 2 as core 2 on socket 0
EAL: Detected lcore 3 as core 3 on socket 0
EAL: Detected lcore 4 as core 4 on socket 0
EAL: Detected lcore 5 as core 5 on socket 0
EAL: Detected lcore 6 as core 6 on socket 0
EAL: Detected lcore 7 as core 8 on socket 0
EAL: Detected lcore 8 as core 9 on socket 0
EAL: Detected lcore 9 as core 10 on socket 0
EAL: Detected lcore 10 as core 11 on socket 0
EAL: Detected lcore 11 as core 12 on socket 0
EAL: Detected lcore 12 as core 13 on socket 0
EAL: Detected lcore 13 as core 14 on socket 0
EAL: Detected lcore 14 as core 0 on socket 0
EAL: Detected lcore 15 as core 1 on socket 0
EAL: Skipped lcore 16 as core 2 on socket 0
EAL: Skipped lcore 17 as core 3 on socket 0
EAL: Skipped lcore 18 as core 4 on socket 0
EAL: Skipped lcore 19 as core 5 on socket 0
EAL: Skipped lcore 20 as core 6 on socket 0
EAL: Skipped lcore 21 as core 8 on socket 0
EAL: Skipped lcore 22 as core 9 on socket 0
EAL: Skipped lcore 23 as core 10 on socket 0
EAL: Skipped lcore 24 as core 11 on socket 0
EAL: Skipped lcore 25 as core 12 on socket 0
EAL: Skipped lcore 26 as core 13 on socket 0
EAL: Skipped lcore 27 as core 14 on socket 0
EAL: Support maximum 16 logical core(s) by configuration.
EAL: Detected 16 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: invalid parameter for --lcores
We can remove this limitation by using a cpuset_t (which is a more
natural type since this is what gets passed to pthread_setaffinity*
in the end).
After the patch:
$ ./master/app/testpmd --no-huge --no-pci -m 512 --log-level *:debug \
--lcores 0@16,1@17 -- -i --total-num-mbufs 2048
[...]
EAL: Master lcore 0 is ready (tid=7f94217bbc00;cpuset=[16])
EAL: lcore 1 is ready (tid=7f941f491700;cpuset=[17])
Signed-off-by: David Marchand <david.marchand@redhat.com>
In the root table, there is some limitation of total number of header
modify actions, 16 or 8 for each. But in other tables, there is no
such strict limitation. In an IPv6 case, the IP fields modifying
will occupy more actions than that in IPv4, so the total support
number should be increased in order to support as many actions as
possible for an IPv6 + TCP packet.
And in the meanwhile, the memory consumption should also be taken
into consideration because sometimes only several actions are needed.
The root table checking could also be done in low layer driver and
the error code will be returned if the actions number is over the
maximal supported value.
Fixes: 0e9d000276 ("net/mlx5: check maximum modify actions number")
Cc: stable@dpdk.org
Signed-off-by: Bing Zhao <bingz@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
The meter suffix flow item pointer restore is not correct to decrease
a fixed value. The incorrect operation will cause incorrect match to
the meter suffix flow, the flow create will fail once the magic number
in the wrong offset memory start with RTE_FLOW_ITEM_TYPE_END.
The pointer should decrease the real offset it increases.
Set the decrease value to the real offset the pointer increases to fix
the issue.
Fixes: 9ea9b049a9 ("net/mlx5: split meter flow")
Cc: stable@dpdk.org
Reported-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
This patch adds to MLX5 PMD support of matching on GTP item,
fields msg_type and teid, according to RFC [1].
GTP item validation and translation functions are added and called.
GTP tunnel type is added to supported tunnels.
[1] http://mails.dpdk.org/archives/dev/2019-December/152799.html
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
Previous fix added translation of Rx hash fields to PRM format.
This patch optimizes the fix, to perform value translation only
if value is not zero.
In case value is zero, there is no need to translate it.
Fixes: c3e33304a7 ("net/mlx5: fix setting of Rx hash fields")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
The free on completion queue keeps the indices of elts array,
all mbuf stored below this index should be freed on arrival
of normal send completion. In debug version it also contains
an index of completed transmitting descriptor (WQE) to check
queues synchronization.
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
The new software manged entity is introduced in Tx datapath
- free on completion queue. This queue keeps the information
how many buffers stored in elts array must freed on send
completion. Each element of the queue contains transmitting
descriptor index to be in synch with completion entries (in
debug build only) and the index in elts array to free buffers.
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
This is preparation step, we are going to store the index
of elts to free on completion in the dedicated free on
completion queue, this patch updates the elts freeing routine
and updates Tx error handling routine to be synced with
coming new queue.
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
The complete request flag is set once per Tx burst call,
the code of appropriate routine moved to the end of sending
loop. This is preparation step to remove WQE reserved field
usage to store index of elts to free.
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Add support for reading the firmware version.
Signed-off-by: Alfredo Cardigliano <cardigliano@ntop.org>
Reviewed-by: Shannon Nelson <snelson@pensando.io>
Add basic, per queue and extended statistics for
RX and TX, both from the adapter and the driver.
Signed-off-by: Alfredo Cardigliano <cardigliano@ntop.org>
Reviewed-by: Shannon Nelson <snelson@pensando.io>
Add code to manipulate the RSS configuration
used by the adapter.
Signed-off-by: Alfredo Cardigliano <cardigliano@ntop.org>
Reviewed-by: Shannon Nelson <snelson@pensando.io>
Add support for managing RX filters based on MAC and VLAN.
Hardware cannot provide the list of filters, thus we keep
a local list.
Add support for promisc and allmulticast modes.
Signed-off-by: Alfredo Cardigliano <cardigliano@ntop.org>
Reviewed-by: Shannon Nelson <snelson@pensando.io>
Add support for port start/stop and handle basic features
including MTU and link up/down.
Signed-off-by: Alfredo Cardigliano <cardigliano@ntop.org>
Reviewed-by: Shannon Nelson <snelson@pensando.io>
Add support for the notify queue, which is used for events
published by the NIC.
Signed-off-by: Alfredo Cardigliano <cardigliano@ntop.org>
Reviewed-by: Shannon Nelson <snelson@pensando.io>
Add support for the admin queue, which is used for most
of the NIC configurations.
Signed-off-by: Alfredo Cardigliano <cardigliano@ntop.org>
Reviewed-by: Shannon Nelson <snelson@pensando.io>
Doorbell registers are used by the driver to signal to the NIC
that requests are waiting on the message queues.
Signed-off-by: Alfredo Cardigliano <cardigliano@ntop.org>
Reviewed-by: Shannon Nelson <snelson@pensando.io>
Initialize LIFs (Logical Interfaces) which represents
external connections. The NIC can multiplex many LIFs
to a single port, but in most setups, LIF0 is the
primary control for the port.
Create a device for each LIF.
Signed-off-by: Alfredo Cardigliano <cardigliano@ntop.org>
Reviewed-by: Shannon Nelson <snelson@pensando.io>
Add port management commands that apply to the physical
ports associated with the PCI device, which might be
shared among several logical interfaces.
Signed-off-by: Alfredo Cardigliano <cardigliano@ntop.org>
Reviewed-by: Shannon Nelson <snelson@pensando.io>
Register the Pensando ionic PMD (net_ionic) and define initial probe
and remove callbacks with adapter initialization.
Signed-off-by: Alfredo Cardigliano <cardigliano@ntop.org>
Reviewed-by: Shannon Nelson <snelson@pensando.io>
Add debug options to the config file.
Define macros used for logs and make use of config file options
to enable them.
Signed-off-by: Alfredo Cardigliano <cardigliano@ntop.org>
Reviewed-by: Shannon Nelson <snelson@pensando.io>
Add makefile and config file options to compile the Pensando ionic PMD.
Add feature and version map file.
Update maintainers file.
Signed-off-by: Alfredo Cardigliano <cardigliano@ntop.org>
Reviewed-by: Shannon Nelson <snelson@pensando.io>
V1000/R1000 processors are using the same PCI ids for the network
device as SNOWYOWL processor but has altered register definitions
for determining the window settings for the indirect PCS access.
Add support to check for this hardware and if found use the new
register values.
Signed-off-by: Selwin Sebastian <selwin.sebastian@amd.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
In the Rx datapath the flags in the newly allocated mbufs
are all explicitly cleared but the EXT_ATTACHED_MBUF must be
preserved. It would allow to use mbuf pools with pre-attached
external data buffers.
The vectorized rx_burst routines are updated in order to
inherit the EXT_ATTACHED_MBUF from mbuf pool private
RTE_PKTMBUF_POOL_F_PINNED_EXT_BUF flag.
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Use new marker typedef available in EAL.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Matan Azrad <matan@mellanox.com>
The version of the PMD should not be overwritten with LIBABIVER.
All internal libs must have the same version.
Moreover, specifying LIBABIVER in the driver causes a symbolic link loop:
librte_rawdev_octeontx2_ep.so.1 -> librte_rawdev_octeontx2_ep.so.1
Fixes: 56d46d13f7 ("raw/octeontx2_ep: add build infra and device probe")
Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
All buffers and ring info should be written before tail register update.
This patch relocates the write memory barrier before updating tail register
to avoid potential issues.
Fixes: 11b5c7daf0 ("raw/ntb: add enqueue and dequeue functions")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Add rawdev's selftest feature in SDP VF driver, which
verifies the EP mode functionality test.
Signed-off-by: Mahipal Challa <mchalla@marvell.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>