Commit graph

12243 commits

Author SHA1 Message Date
DataHoarder af52427f21 changed meson build for fm10k 2020-10-15 00:29:50 +02:00
DataHoarder 9355527571 fix uninitialized tcam_slice / sram_slice on fm10l_ffu.c 2020-10-14 22:55:24 +02:00
DataHoarder 4231542cca Fixed abs usage on unsigned value difference on fm10k_serdes.c 2020-10-14 22:28:11 +02:00
DataHoarder 2d8529f179 Fixed uninitialized ts.tv_sec / ts.tv_usec on fm10k_stats.c 2020-10-14 22:27:22 +02:00
DataHoarder 1241bd3cc2 Added meson build for fm10k inline switch manager 2020-10-14 22:20:36 +02:00
Xiaojun Liu fad4f08558 net/fm10k: add switch management support
Split dev init to 2 parts.
First only register the port in switch
management; second init hook will be
called after all the pf are registered
and switch initialization. It will finish
dev init. Also add switch interrupt support.
Add fm10k_mirror_rule_set/fm10k_mirror_rule_reset
to support mirror operation. Add fm10k_dev_filter_ctrl
to support flow operation.
Add dpdk port and pf mapping, so
the dpdk port can map to a specific pf
and 1 dpdk port can map to 2 pf to get
total 100G throughput. Update fm10k.rst.
Update release_20_05.rst.

Signed-off-by: Xiaojun Liu <xiaojun.liu@silicom.co.il>
2020-10-13 00:22:05 +02:00
Xiaojun Liu 19cd3be04e net/fm10k: add flow interface and switch management
Add flow interface to support offload flow into HW.
It supports parse vlan and parse mpls, all these
data will be transferred to ffu data.
Add switch management, includes initialization,
port mapping, epl port link, LED controller, interrupt handler.
It create 3 threads. One for interrupt handler, one for
LED controller, one for statistics.

Signed-off-by: Xiaojun Liu <xiaojun.liu@silicom.co.il>
2020-10-13 00:21:14 +02:00
Xiaojun Liu 5550889d65 net/fm10k: add ffu and statistics and config file functions
Add ffu to support offload flow into HW.
It supports forward, mirror, push VLAN, pop VLAN.
It also supports flowset for a group flow definition.
The config file can configure debug log, port speed,
epl port mapping dpdk port, flowset. All these configuration
will be used by switch management.
Statistics includes epl port, ffu rule, dpdk port, and error.
All these statistics data are read from HW.
Modify switch header file to support getting logical port
and glort and device info.

Signed-off-by: Xiaojun Liu <xiaojun.liu@silicom.co.il>
2020-10-13 00:21:14 +02:00
Xiaojun Liu db188ec61e net/fm10k: add epl serdes and port control functions
Add epl serdes include loading spico,
controlling pcsl, dma, dfe, ical. Add spico code.
Add state machine for epl lane and port, it creates
a pthread to handle the state changing event.
Add external port management, which will use
state machine to handle the event from lane and port.
The lane state will change between DOWN, WAIT_PLL_LOCK,
WAIT_SIGNAL_OK, WAIT_DFE_ICAL, WAIT_DFE_PCAL, UP.
The port state will change between DOWN, WAIT_LANE_UP, UP.

Signed-off-by: Xiaojun Liu <xiaojun.liu@silicom.co.il>
2020-10-13 00:21:14 +02:00
Xiaojun Liu 475c6a430a net/fm10k: add basic functions for switch management
Add I2C to control the inside LED and PHY.
All the operations of I2C are using fm10k I2C register.
Add SBUS to communicate with spico(micro code in serdes)
by using fm10k SBUS register. This is like I2C operations.
Add registers defination, which include all the registers
will be used in the driver. Add switch management log API.
Add switch management structures. Modify Makefile to add
new files building. Add CONFIG_RTE_FM10K_MANAGEMENT=n
in config/common_linux.

Signed-off-by: Xiaojun Liu <xiaojun.liu@silicom.co.il>
2020-10-13 00:21:14 +02:00
Somnath Kotur 48d1c589dd net/bnxt: fix flow counter query
OVS-DPDK seems to set the reset bit for every flow query. Honor
the bit by resetting the SW counter values after assigning them.
Also set the 'hit' bit only if the counter value retrieved by HW
is non-zero.
While querying flow stats, use max possible entries in the fc table scan
for valid entries instead of active entries as the active entry can be in
any slot in the table.

This is a critical fix for OVS-DPDK flow aging.

Fixes: 306c2d28e2 ("net/bnxt: support count action in flow query")

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
2020-08-05 21:25:47 +02:00
Shahaji Bhosle 25b47db788 net/bnxt: update resource allocation settings
Adjusted resource allocations for the hardware resources
like TCAM entries, action records, stat counters, exact match records to
scale up offload flows.
Also increased IPv4 nat entries to 1023.
This patch is a critical fix to enable driver load on current and all
FW versions going forward.

Fixes: cef3749d50 ("net/bnxt: update TruFlow resource allocation numbers")

Signed-off-by: Shahaji Bhosle <sbhosle@broadcom.com>
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2020-08-05 21:21:04 +02:00
Jeff Guo 6777e5aaf2 net/iavf: fix default RSS hash configuration
Different device has different hash capability, it should not be
expected that all hash set would be successful to set into all
devices by default. So remove the return checking when hash default
set. And remove gtpu hash default set, iavf only enable hash for
general protocols.

Fixes: c94366cfc6 ("net/iavf: add GTPU in default hash")

Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Tested-by: Wei Xie <weix.xie@intel.com>
2020-08-05 19:36:41 +02:00
Haiyue Wang 4339ea2979 net/ice: revert fake TSO fixes
The two fixes are not the real root cause for MDD event, it mitigates
the failure rate when different test mode, so revert them.

Fixes: 2a0c9ae4f6 ("net/ice: fix TCP checksum offload")
Fixes: 7365a3cee5 ("net/ice: calculate TCP header size for offload")
Cc: stable@dpdk.org

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2020-08-05 19:23:33 +02:00
Haiyue Wang 8a72edd9cb net/ice: fix Tx hang with TSO
The variables 'td_offset' and 'td_tag' should be reset to 0 for every
burst packet, otherwise the fields of Tx Descriptor will be set wrong,
this will cause the MDD event error, and Tx will hang.

Fixes: 17c7d0f9d6 ("net/ice: support basic Rx/Tx")
Cc: stable@dpdk.org

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2020-08-05 19:23:31 +02:00
Gaurav Singh 8716f9942a net/i40e: remove duplicate tunnel type check
remove duplicate check

Fixes: 62e94f7f66 ("net/i40e: configure packet type mapping")
Cc: stable@dpdk.org

Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2020-08-05 18:52:15 +02:00
Thomas Monjalon 50458c9dc3 regex/mlx5: fix registered driver name
The driver name was registered as "net_mlx5_regex".
It is renamed as "regex_mlx5".
The same name is used in mlx5_regex_driver.pci_driver.driver.name,
instead of "mlx5_regex", for consistency.

The string used for log registration (pmd.regex.mlx5) could be derived
from the driver name. A macro is created so name definitions are close.

Fixes: cfc672a90b ("regex/mlx5: support probing")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Ori Kam <orika@mellanox.com>
2020-08-05 18:36:44 +02:00
Matan Azrad 118494d3ad vdpa/mlx5: fix virtio queue unset
When a virtq is destroyed, the SW should be able to continue the virtq
processing from where the HW stopped.

The current destroy behavior in the driver saves the virtq state (used
and available indexes) only when LM is requested.
So, when LM is not requested the queue state is not saved and the SW
indexes stay invalid.

Save the virtq state in the virtq destroy process.

Fixes: bff7350110 ("vdpa/mlx5: prepare virtio queues")
Cc: stable@dpdk.org

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Xueming Li <xuemingl@mellanox.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2020-08-05 18:33:35 +02:00
Xueming Li 99abbd62c2 vdpa/mlx5: fix queue update synchronization
The driver CQ event management is done by non vhost library thread,
either the dpdk host thread or the internal vDPA driver thread.

When a queue is updated the CQ may be destroyed and created by the vhost
library thread via the queue state operation.

When the queue update feature was added, it didn't synchronize the CQ
management to the queue update what may cause invalid memory access.

Add the aforementioned synchronization by a new per device configuration
mutex.

Fixes: c47d6e8333 ("vdpa/mlx5: support queue update")

Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2020-08-05 18:12:10 +02:00
Long Li 3eee636809 net/netvsc: fix chimney index
The code should look into "slab" to figure out the index returned from
rte_bitmap_scan().

Fixes: cc02518132 ("net/netvsc: split send buffers from Tx descriptors")
Cc: stable@dpdk.org

Signed-off-by: Long Li <longli@microsoft.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2020-08-05 17:57:13 +02:00
Zhiguang He eb8939538f net/bonding: fix dead loop on RSS RETA update
When parameter reta_size < RTE_RETA_GROUP_SIZE, reta_count will be 0.
Then this function will be deadloop.

Fixes: 734ce47f71 ("bonding: support RSS dynamic configuration")
Cc: stable@dpdk.org

Signed-off-by: Zhiguang He <hezhiguang3@huawei.com>
Acked-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
2020-08-05 17:51:49 +02:00
Dekel Peled 38a5704629 net/mlx5: fix number of retries for UAR allocation
Previous fix added definition of number of retries for UAR allocation.
This value is adequate for x86 systems with 4K pages.
On Power9 system with 64K pages the required value is 32.
This patch updates the defined value from 2 to 32.

Fixes: a0bfe9d56f ("net/mlx5: fix UAR memory mapping type")

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2020-08-05 16:10:50 +02:00
Chas Williams aee76bb79b net/netvsc: fix crash during Tx
Commit cc02518132 ("net/netvsc: split send buffers from Tx
descriptors") changed the way that transmit descriptors are
allocated. They come from a single pool instead of being
individually attached to each mbuf. To find the IOVA, you need
to calculate the offset from the base of the pool.

Fixes: cc02518132 ("net/netvsc: split send buffers from Tx descriptors")
Cc: stable@dpdk.org

Signed-off-by: Chas Williams <3chas3@gmail.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2020-07-30 19:29:37 +02:00
Jecky Pei cb4a65de31 net/kni: set packet input port in Rx
Store port_id in pmd_internals when eth kni device is created.
Then set packet port of rte_mbuf in function eth_kni_rx.

Cc: stable@dpdk.org

Signed-off-by: Jecky Pei <jpei@sonicwall.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2020-07-30 00:41:24 +02:00
Yuval Avnery c044dfbde3 common/mlx5: fix regex register layout
Reserved field should be 0x60 instead of 0x40.
Will fail FW check otherwise.

Fixes: 9428310ae1 ("regex/mlx5: add engine status check")

Signed-off-by: Yuval Avnery <yuvalav@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
2020-07-30 00:41:24 +02:00
Shiri Kuzin 4a01fa047b common/mlx5: fix MAC addresses flush
mlx5_nl_mac_addr_flush should flush all allocated MAC
addresses.

The MAC addresses array size should be of size
MLX5_MAX_MAC_ADDRESSES, but currently we return without
flushing the addresses if size is MLX5_MAX_MAC_ADDRESSES.

This was fixed by not allowing an array larger than
MLX5_MAX_MAC_ADDRESSES.

Fixes: e9a8ac59b6 ("common/mlx5: fix MAC addresses assert")
Cc: stable@dpdk.org

Signed-off-by: Shiri Kuzin <shirik@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2020-07-30 00:41:24 +02:00
Viacheslav Ovsiienko 972a1bf812 common/mlx5: fix user mode register access command
To detect the timestamp mode configured on the NIC the mlx5
PMD uses the firmware command ACCESS_REGISTER_USER. This
command is relatively new and might be not supported by
older firmware versions and was rejected, causing annoying
messages in kernel log.

This patch adds the attribute flag check whether firmware
supports the command and avoid the call if it does not.

Fixes: bb7ef9a962 ("common/mlx5: add register access DevX routine")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2020-07-30 00:41:24 +02:00
Chenbo Xia 570ee25677 net/virtio-user: check tap system call setting
Setting the flags of tapfd may fail and the return value
should be checked.

Coverity issue: 140739
Fixes: e3b434818b ("net/virtio-user: support kernel vhost")
Cc: stable@dpdk.org

Signed-off-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2020-07-30 00:41:24 +02:00
Maxime Coquelin 3d4cd4be57 net/vhost: fix interrupt mode
At .new_device() time, only the first vring pair is
now ready, other vrings are configured later.

Problem is that when application will setup and enable
interrupts, only the first queue pair Rx interrupt will
be enabled.

This patches fixes the issue by setting the number of
max interrupts to the number of Rx queues that will be
later initialized. Then, as soon as a Rx vring is ready
and interrupt enabled by the application, it removes the
corresponding uninitialized epoll event, and installs a
new one with the valid FD.

Fixes: 604052ae53 ("net/vhost: support queue update")

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
2020-07-30 00:41:24 +02:00
Maxime Coquelin e97958398b net/vhost: fix queue update
Now that the vhost library saves the guest notifications
enablement value in its virtqueues metadata, it is not
necessary to do it in the vring_state_changed callback.

One effect of the patch is also to prevent possible
deadlock happening in vhost library.

Fixes: 604052ae53 ("net/vhost: support queue update")

Reported-by: Yinan Wang <yinan.wang@intel.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Tested-by: Yinan Wang <yinan.wang@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
2020-07-30 00:41:24 +02:00
Randy Schacher cf4f055a65 net/bnxt: remove EEM system memory support
Remove the memory management scheme for Extended Exact Match
using system memory. Using host memory scheme instead which
was the default anyway.

Fixes: b2da02480c ("net/bnxt: support EEM system memory")

Signed-off-by: Randy Schacher <stuart.schacher@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Peter Spreadborough <peter.spreadborough@broadcom.com>
Reviewed-by: Farah Smith <farah.smith@broadcom.com>
2020-07-30 00:41:24 +02:00
Haiyue Wang 7365a3cee5 net/ice: calculate TCP header size for offload
The ice needs the exact TCP header size including options for TCP
checksum offload, but according to PKT_TX_TCP_CKSUM note, l4_len
is not required to be set, so it needs to calculate the TCP header
size if not set.

Fixes: 17c7d0f9d6 ("net/ice: support basic Rx/Tx")
Cc: stable@dpdk.org

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
2020-07-30 00:41:24 +02:00
Simei Su 185fe122f4 net/ice: fix GTPU down/uplink and extension conflict
When adding a RSS rule with GTPU_DWN/UP, it will write from top to
bottom for profile due to firmware limitation. If a RSS rule with
GTPU_EH already exists, then GTPU_DWN/UP packet will match GTPU_EH
profile. This patch solves this issue by remembering a gtpu_eh RSS
configure and removing it before the corresponding RSS configure
for downlink/uplink rule is issued.

Fixes: 2e2810fc18 ("net/ice: fix GTPU RSS")

Signed-off-by: Simei Su <simei.su@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2020-07-30 00:41:23 +02:00
Yunjian Wang e40a84ebed net/ice: add memory allocation check in RSS init
The function rte_zmalloc() could return NULL, the return
value need to be checked.

Fixes: 50370662b7 ("net/ice: support device and queue ops")
Cc: stable@dpdk.org

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2020-07-30 00:41:23 +02:00
Yunjian Wang 5d4a54fd16 net/ice: fix memory leak when releasing VSI
At the end of the vsi release, we should free the 'rss_lut'
and 'rss_key' for the vsi.

Fixes: 50370662b7 ("net/ice: support device and queue ops")
Cc: stable@dpdk.org

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2020-07-30 00:41:23 +02:00
Jeff Guo e7cc68c707 net/ice: fix GTPU TEID hash
Refine gtpu teid hash rule mapping for GTPU_IP/GTPU_EH/GTPU_DWN/GTPU_UP.

Fixes: 37e444b778 ("net/ice: support hash for GTPU protocols")

Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2020-07-30 00:41:23 +02:00
Chenmin Sun 8bccf4774c net/i40e: fix bitmap free
This patch fixes the coverity warning #361024.
rte_bitmap_free() is not a right way to free a bitmap, replacing
it with rte_free().

Coverity issue: 361024
Fixes: febc61d350 ("net/i40e: optimize flow director update rate")

Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2020-07-30 00:41:23 +02:00
Haiyue Wang 2a0c9ae4f6 net/ice: fix TCP checksum offload
The L4LEN field of the Descriptor Header Offset for TCP should be the
real length including the TCP options.

Fixes: 17c7d0f9d6 ("net/ice: support basic Rx/Tx")
Cc: stable@dpdk.org

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2020-07-30 00:41:23 +02:00
Chenbo Xia e2a1a08a76 vdpa/ifc: support vring update after device config
The device ready state in vhost lib is now defined as the state
that first queue pair is ready. And kick/callfd may be updated
by QEMU when ifc device is configured.

Although now ifc driver only supports one queue pair, it still
has to update callfd when working with QEMU. This patch fixes
this vring update problem by implementing the set_vring_state
callback.

Suggested-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Signed-off-by: Chenbo Xia <chenbo.xia@intel.com>
Acked-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2020-07-30 00:41:23 +02:00
Xueming Li c47463272f vdpa/mlx5: fix event queue number query
Vdpa example failed on vq setup, the api to get event queue of specified
core failed.

Internal api devx_query_eqn expects index of event queue vectors, no
need to use cpu id. As the doorbell handling thread is per device, it's
sufficient to use default event queue.

This patch uses the default id(0) as event queue index.

Fixes: 8395927cdf ("vdpa/mlx5: prepare HW queues")
Cc: stable@dpdk.org

Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2020-07-30 00:41:23 +02:00
Xiao Wang d0131e49c7 net/virtio-user: fix status management
Apart from the virtio status, there should be also a network related
status for link status management, current implementation mixes up these
two statuses.

One issue caused by this mixup is when virtio-user running in server mode
and vhost as a client connects to it, a RARP packet will be generated by
virtio-user due to VIRTIO_NET_S_ANNOUNCE bit is detected in the "status"
in interrupt handler.

VIRTIO_NET_S_LINK_UP and VIRTIO_NET_S_ANNOUNCE should be managed by a
separated field. This patch adds a "net_status" field for this purpose.

Fixes: e9efa4d938 ("net/virtio-user: add new virtual PCI driver")
Cc: stable@dpdk.org

Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2020-07-30 00:41:23 +02:00
Xueming Li b887250ba8 vdpa/mlx5: fix completion queue initialization
Vdpa device failed to initialize 2nd VQ during setup. From FW syndrome,
unsupported CQE size was specified in CQ initialization attributes.

The unsupported CQE size comes from uninitialized stack struct data, and
the struct has new fields defined recently which are not initialized in
vdpa code.

This patch initializes cq creation attributes with zero to avoid such
random data.

Fixes: 79a7e409a2 ("common/mlx5: prepare support of packet pacing")

Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2020-07-30 00:41:23 +02:00
Matan Azrad ca4cc612d7 vdpa/mlx5: fix notification timing
The issue is relevant only for the timer event modes: 0 and 1.

When the HW finishes to consume a burst of the guest Rx descriptors,
it creates a CQE in the CQ.
When traffic stops, the mlx5 driver arms the CQ to get a notification
when a specific CQE index is created - the index to be armed is the
next CQE index which should be polled by the driver.

The mlx5 driver configured the kernel driver to send notification to
the guest callfd in the same time of the armed CQE event.
It means that the guest was notified only for each first CQE in a
poll cycle, so if the driver polled CQEs of all the virtio queue
available descriptors, the guest was not notified again for the rest
because there was no any new CQE to trigger the guest notification.

Hence, the Rx queues might be stuck when the guest didn't work with
poll mode.

Remove prior kernel notification, and do manual notification after CQ
polling.

Fixes: a9dd7275a1 ("vdpa/mlx5: optimize notification events")

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Xueming Li <xuemingl@mellanox.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2020-07-30 00:41:23 +02:00
Matan Azrad d2a58c2402 vdpa/mlx5: fix steering update in virtq unset
When a virtq is destroyed by the driver, it must be removed from the
steering RQT which holds its reference.

The driver didn't remove the virtq from RQT before destroying it what
caused HW syndrome in virtq unset.

Remove the virtq from RQT before destroying it.

Fixes: 9f09b1ca15 ("vdpa/mlx5: recreate a virtq becoming enabled")
Cc: stable@dpdk.org

Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Signed-off-by: Matan Azrad <matan@mellanox.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2020-07-30 00:41:23 +02:00
Matan Azrad 581e312d69 vdpa/mlx5: fix live migration termination
There are a lot of per virtq operations in the live migration
handling.

Before the driver support for queue update, when a virtq was not valid,
all the LM handling was terminated.

But now, when the driver supports queue update, the virtq can be invalid
as legal stage.

Skip invalid virtq in LM handling.

Fixes: c47d6e8333 ("vdpa/mlx5: support queue update")

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Xueming Li <xuemingl@mellanox.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2020-07-30 00:41:23 +02:00
Bing Zhao 8c8c3b01c3 vdpa/mlx5: fix compatibility with MISC4
When dynamic flex parser feature is introduced, the support for misc
parameters 4 of flow table entry (FTE) match set is needed. The
structure of "mlx5_ifc_fte_match_param_bits" is extended with
"mlx5_ifc_fte_match_set_misc4_bits" at the end of it. The total size
of the FTE match set will be changed into 384 bytes from 320 bytes.
Low level user space driver (rdma-core) will have the validation of
the length of FTE match set. In the old release that no MISC4
supported in the rdma-core, and this will break the backward
compatibility, even if the MISC4 is not used in most cases, like
in vDPA driver.
In order not to break the compatibility old rdma-core, the length
adjustment needs to be done. In mlx5 vDPA driver, the lengths of
the matcher and value are both set to 320 without MISC4. There is
no need to change the structure definition, all bytes of the MISC4
will be discarded if it is not needed. Since the MISC4 parameter
is aligned with a 64B boundary and so does the whole FTE match set
parameter, there is no need to take any padding and alignment into
consideration when calculating the size.

Fixes: daa38a8924 ("net/mlx5: add flow translation of eCPRI header")

Signed-off-by: Bing Zhao <bingz@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2020-07-30 00:41:23 +02:00
Ajit Khaparde 451bf30e3e net/bnxt: fix build with extra cflags
When we compile PMD with CFLAGS set to -O -g, build fails because of
uninitialized error. This patch fixes it.

Bugzilla ID: 509
Fixes: 1e46b39626 ("net/bnxt: fill cfa action in Tx descriptor")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
2020-07-30 00:41:23 +02:00
Ajit Khaparde c557378fec net/bnxt: fix logical AND in if condition
The if condition in bnxt_restore_mac_filters needs to check for
the result of logical AND. But it was not doing it resulting in
an incorrect check.

Fixes: b02f1573cd ("net/bnxt: restore MAC filters during reset recovery")
Cc: stable@dpdk.org

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2020-07-30 00:41:23 +02:00
Somnath Kotur 82c4fb852e net/bnxt: cleanup VF representor device operations
No need to access rx_cfa_code, cfa_code_map from the VF-Rep functions
anymore.

Fixes: 322bd6e702 ("net/bnxt: add port representor infrastructure")

Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2020-07-30 00:41:23 +02:00
Mike Baucom 488130f73f net/bnxt: enable shadow tables during session open
Turn on shadow memory in the core to allow search before allocate.
This allows reuse of constrained resources.

Signed-off-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2020-07-30 00:41:23 +02:00