Commit Graph

32313 Commits

Author SHA1 Message Date
Akhil Goyal
4f3c07b73b net/cnxk: reset offload flag if reassembly is disabled
The rx offload flag need to be reset if IP reassembly flag
is not set while calling reassembly_conf_set.

Signed-off-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-05-10 16:27:05 +02:00
Akhil Goyal
76e0dd1131 net/cnxk: update environment variable for debug IV
Changed environment variable name for specifying
debug IV for unit testing of inline IPsec offload
with known test vectors.

Signed-off-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-05-10 16:27:04 +02:00
Rakesh Kudurumalla
b106656542 net/cnxk: update inline device in ethdev telemetry
Inline PF_FUNC is updated in ethdev_tel_handle_info(),
when inline device is attached to any dpdk process

Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-05-10 16:27:03 +02:00
Nithin Dabilpuram
2e668c547f net/cnxk: fix roundup size with transport mode
For transport mode, roundup needs to be based on L4 data
and shouldn't include L3 length.

By including L3 length, rlen that is calculated and put in
send hdr would cross the final length of the packet in some
scenarios where padding is necessary.

Also when outer and inner checksum offload flags are enabled,
get the l2_len and l3_len from il3ptr and il4ptr.

Fixes: 55bfac717c ("net/cnxk: support Tx security offload on cn10k")
Cc: stable@dpdk.org

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-05-10 16:27:02 +02:00
Nithin Dabilpuram
1e1bfd078e net/cnxk: disable default inner checksum for outbound inline
Disable default inner L3/L4 checksum generation for outbound inline
path and enable based on SA options or RTE_MBUF flags as per
the spec. Though the checksum generation is not impacting much
performance, it is overwriting zero checksum for UDP packets
which is not always good.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-05-10 16:27:01 +02:00
Nithin Dabilpuram
39279dd904 net/cnxk: add barrier after meta batch free in scalar
Add barrier after meta batch free in scalar routine when
LMT lines are exactly full to make sure that next LMT line user
in Tx only starts writing the lines only when previous stoerl's
are complete.

Fixes: 4382a7ccf7 ("net/cnxk: support Rx security offload on cn10k")
Cc: stable@dpdk.org

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-05-10 16:27:00 +02:00
Nithin Dabilpuram
852cedbaf2 net/cnxk: update LBK ethdev link info
Update link info of LBK ethdev i.e AF's VF's as always up
and 100G. This is because there is no phy for the LBK interfaces
and driver won't get a link update notification for the same.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-05-10 16:26:59 +02:00
Nithin Dabilpuram
5875d2ca19 net/cnxk: support loopback mode on AF VF
Support internal loopback mode on AF VF's using ROC by setting
Tx channel same as Rx channel.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-05-10 16:26:58 +02:00
Nithin Dabilpuram
f0b9158c61 common/cnxk: use aggregate level RR priority from mbox
Use aggregate level Round Robin Priority from mbox response instead of
fixing it to single macro. This is useful when kernel AF driver
changes the constant.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-05-10 16:26:57 +02:00
Akhil Goyal
24d37e0761 common/cnxk: convert warning to debug print
Inbound SA SPI if not in min-max range specified in devargs,
was marked as a warning. But this is not converted to debug
print because if the entry is found to be duplicate in the mask,
it will give another error print. Hence, warning print is not needed
and is now converted to debug print.

Signed-off-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-05-10 16:26:57 +02:00
Nithin Dabilpuram
f5a4327049 common/cnxk: fix soft expiry disable path
Fix issues in mode where soft expiry is disabled in ROC.
When soft expiry support is not enabled in inline device,
memory is not allocated for the ring base array and should
not be accessed.

Fixes: bea5d990a9 ("net/cnxk: support outbound soft expiry notification")
Cc: stable@dpdk.org

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-05-10 16:26:56 +02:00
Rakesh Kudurumalla
b315581c66 common/cnxk: skip probing SoC environment for CN9K
SoC run platform file is not present in CN9k so probing
is done for CN10k devices

Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-05-10 16:26:54 +02:00
Satha Rao
e746aec161 common/cnxk: fix SQ flush sequence
Fix SQ flush sequence to issue NIX RX SW Sync after SMQ flush.
This sync ensures that all the packets that were in-flight are
flushed out of memory.

This patch also fixes NULL return issues reported by
static analysis tool in Traffic Manager and sync's mailbox
to that of the kernel version.

Fixes: 05d727e8b1 ("common/cnxk: support NIX traffic management")
Fixes: 0b7e667ee3 ("common/cnxk: enable packet marking")
Cc: stable@dpdk.org

Signed-off-by: Satha Rao <skoteshwar@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-05-10 16:26:49 +02:00
Vidya Sagar Velumuri
064e790375 common/cnxk: support timestamp PKIND in CPT
Add new API to configure the SA table entries with new CPT PKIND
when timestamp is enabled.

Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-05-10 16:26:48 +02:00
Vidya Sagar Velumuri
76aa8098ff common/cnxk: add new PKIND for CPT when ts is enabled
With timestamp enabled, time stamp will be added to second pass packets
from CPT. NPC needs different configuration to parse second pass packets
with and without timestamp.
New PKIND is defined for CPT when time stamp is enabled on NIX.
CPT should use this PKIND for second pass packets when TS is enabled for
corresponding ethdev port.

Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-05-10 16:26:47 +02:00
Radha Mohan Chintakuntla
ff1400aa9d net/cnxk: add receive channel backpressure for SDP
The SDP interfaces also need to be configured for NIX receive channel
backpressure for packet receive.

Signed-off-by: Radha Mohan Chintakuntla <radhac@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-05-10 16:26:46 +02:00
Subrahmanyam Nilla
28b283fa7f common/cnxk: support multi channel for SDP send queues
Currently only base channel number is configured as default
channel for all the SDP send queues. Due to this, packets
sent on different SQ's are landing on the same output queue
on the host. Channel number in the send queue should be
configured according to the number of queues assigned to the
SDP PF or VF device.

Signed-off-by: Subrahmanyam Nilla <snilla@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-05-10 16:26:45 +02:00
Satheesh Paul
a800675b06 net/cnxk: support IPv6 fragment flow pattern item
Support matching IPv6 fragment extension header
with RTE_FLOW_ITEM_TYPE_IPV6_FRAG_EXT flow pattern item.

Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-05-09 14:36:43 +02:00
Vamsi Attunuru
b934e65b01 net/cnxk: enable 3DES-CBC capability
Enable 3DES-CBC capability of inline crypto device.

Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-05-07 13:07:51 +02:00
Kiran Kumar K
8efa348e81 net/cnxk: support custom SA index
Adding cnxk device driver support to configure custom SA index.
Custom SA index can be configured as part of the session create
as SPI, and later original SPI can be updated using session update.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-05-07 11:45:01 +02:00
Kiran Kumar K
7df4ead354 net/cnxk: support parsing custom SA action
Adding devargs support to parse custom SA action.
Devargs can be specified in the following way.
-a 0002:02:00.0,custom_sa_act=1

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-05-07 11:45:01 +02:00
Kiran Kumar K
bbe8d1f198 common/cnxk: support parsing custom SA action
Adding ROC Flow changes to parse custom SA action for cnxk device.
When custom sa action is enabled, VTAG actions are not allowed.
And custom SA index will be calculated based on SA_HI and SA_LO
values. This allows the potential for a MCAM entry to match
many SAs, rather than only match a single SA.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-05-07 11:44:56 +02:00
Gowrishankar Muthukrishnan
332cae00ad net/cnxk: fix out of bounds accesses
Fix out of bounds access in cmd array which was reported in coverity
scan.

Coverity issue: 375245, 375246, 375260, 375263, 375264, 375271
Coverity issue: 375278, 375279, 375273, 375274, 375275, 375276
Coverity issue: 375280, 375281, 375283, 375286
Fixes: c5b97e9883 ("net/cnxk: add cn10k template Tx functions to build")
Fixes: dd8c20eee4 ("net/cnxk: add cn9k template Tx functions to build")
Cc: stable@dpdk.org

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-05-05 10:10:17 +02:00
Gowrishankar Muthukrishnan
938ba5f9b9 net/cnxk: fix uninitialized variables
Fix uninitialized scalar variable reported in coverity scan.

Coverity issue: 371876, 371877
Coverity issue: 371872, 371880
Fixes: 39dc567c19 ("net/cnxk: add Tx burst for CN9K")
Fixes: 19f3af2371 ("net/cnxk: add Tx burst for CN10K")
Cc: stable@dpdk.org

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-05-05 10:10:17 +02:00
Gowrishankar Muthukrishnan
e4a96623a4 common/cnxk: fix sizeof not portable
Fix sizeof not portable issue reported in coverity scan.

Coverity issue: 376538
Fixes: 7e9a94909e ("common/cnxk: realloc inline device XAQ AURA")
Cc: stable@dpdk.org

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-05-05 10:10:17 +02:00
Gowrishankar Muthukrishnan
ea0d681efa common/cnxk: fix null pointer dereference
Fix null pointer dereference reported in coverity scan.

Coverity issue: 372065
Fixes: 665b6a7400 ("common/cnxk: add NPC helper API")
Cc: stable@dpdk.org

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-05-05 10:10:17 +02:00
Satheesh Paul
6a65e22a4d common/cnxk: fix unaligned access to device memory
Use mbox_memcpy() instead of memcpy() to prevent unaligned access.

Fixes: 1f66919817 ("common/cnxk: improve MCAM entries management")
Cc: stable@dpdk.org

Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-05-03 10:02:00 +02:00
Satheesh Paul
c8647cd7f3 net/cnxk: add message on flow parsing failure
Set the error message with rte_flow_error_set() API
when flow parsing fails.

Fixes: 8c009b4505 ("net/cnxk: support flow API")
Cc: stable@dpdk.org

Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Reviewed-by: Kiran Kumar K <kirankumark@marvell.com>
2022-05-03 08:08:35 +02:00
Rahul Bhansali
5a75f63818 net/cnxk: use ROC errata API
Used errata APIs roc_errata_nix_has_no_drop_re() and
roc_errata_nix_has_cq_min_size_4k() instead of direct
ROC model check.

Signed-off-by: Rahul Bhansali <rbhansali@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-05-02 20:31:30 +02:00
Rahul Bhansali
1f997c06c3 common/cnxk: add ROC errata list
Created roc_errata.h to list the errata handled in userspace drivers.
Added no_drop_re, cq_min_size_4k, no_fc_stype_ststp, no_drop_aging,
no_vwqe_flush_op etc erratas.

Signed-off-by: Rahul Bhansali <rbhansali@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-05-02 20:31:15 +02:00
Sunil Kumar Kori
d49bdfcf0d net/cnxk: fix crash during hotplug detach operation
hot_plug application does not perform any port setup
configuration via rte_eth_dev_configure() API. All the probed
Ethernet ports do not contain any Rx and Tx queues.

While detaching a device via rte_eal_hotplug_remove(), CNXK
driver expects Rx and Tx queues structures populated during
reset of PFC. So application gets crashed as data->rx_queues
and data->tx_queues are NULL.

Fixes: 9544713564 ("net/cnxk: support priority flow control")
Cc: stable@dpdk.org

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-05-02 19:42:38 +02:00
Volodymyr Fialko
7ae43d883d common/cnxk: add null check for inline device
Inline device could be null in cases when it was not bound or missing.
Added check to prevent null pointer access.

Fixes: fe5846bcc0 ("net/cnxk: add devargs for min-max SPI")
Cc: stable@dpdk.org

Signed-off-by: Volodymyr Fialko <vfialko@marvell.com>
2022-05-02 19:42:38 +02:00
Satheesh Paul
c6353c5754 common/cnxk: fix QinQ ROC item mismatch
ROC code is assuming presence of vlan extension headers in
case of QinQ, because of this, there is incompatibility
between the driver and ROC. Fixed this in ROC by treating
QINQ as multiple VLAN pattern items for DPDK (as opposed to
treating QINQ as separate pattern item).

Fixes: b8ac8b089c ("common/cnxk: support matching VLAN existence")
Cc: stable@dpdk.org

Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-04-25 07:08:21 +02:00
Satheesh Paul
fe8e6571d5 common/cnxk: correct ROC naming conventions
Corrected some names to follow ROC naming convention in ROC NPC code.

Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-04-25 07:07:25 +02:00
Satheesh Paul
75902770ae net/cnxk: support mark pattern item type
Added support for RTE_FLOW_ITEM_TYPE_MARK. This item type
can be used to create ingress flow rules to match packets
from CPT's second pass packets.

Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-04-24 05:52:58 +02:00
Satheesh Paul
4968b362b6 common/cnxk: support CPT second pass flow rules
Added support to create flow rules to match packets
from CPT's second pass packets. With this change, ingress
rules will be created with bits 10 and 11 of channel field
in the MCAM ignored by default. For rules specific to
second pass packets, the CPT channel bits will be set
in the MCAM.

Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-04-24 05:51:40 +02:00
Huisong Li
f0b3966a50 app/testpmd: fix MTU verification
The macro RTE_ETHER_MIN_LEN isn't the minimum value of MTU. But testpmd
used it when execute 'port config mtu 0 xx' cmd. This patch fixes it.

Fixes: 1bb4a528c4 ("ethdev: fix max Rx packet length")
Cc: stable@dpdk.org

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
2022-05-12 18:29:04 +02:00
Min Hu (Connor)
baef6bbfad app/testpmd: check statistics query before printing
In function 'fwd_stats_display', if function 'rte_eth_stats_get' fails,
'stats' is uncertainty value. The display result will be abnormal.

This patch check the return value of 'rte_eth_stats_get' to avoid
display abnormal stats.

Fixes: 53324971a1 ("app/testpmd: display/clear forwarding stats on demand")
Cc: stable@dpdk.org

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>
2022-05-12 18:29:04 +02:00
Huisong Li
ec16914942 net/hns3: remove unnecessary RSS switch
Whether the RSS is enabled depends on RTE_ETH_MQ_RX_RSS_FLAG and packet
tuple are enabled. So the RSS switch is unnecessary.

Fixes: 5e782bc257 ("net/hns3: fix configuring RSS hash when rules are flushed")
Fixes: fd81968387 ("net/hns3: fix configuring device with RSS enabled")
Cc: stable@dpdk.org

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
2022-05-12 15:56:59 +02:00
Huisong Li
93e1ea6dfa ethdev: fix RSS update when RSS is disabled
The RTE_ETH_MQ_RX_RSS_FLAG flag is a switch to enable RSS. If the flag
is not set in dev_configure, RSS will be not configured and enabled.
However, RSS hash and reta can still be configured by ethdev ops to
enable RSS if the flag isn't set. The behavior is inconsistent.

Fixes: 99a2dd955f ("lib: remove librte_ prefix from directory names")
Cc: stable@dpdk.org

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
2022-05-12 15:49:57 +02:00
Huisong Li
bfd0b54dc8 net/hns3: remove redundant RSS tuple field
The 'rss_tuple_fields' in struct struct hns3_rss_conf::rss_tuple_sets is
redundant. Because the enabled RSS tuple in PMD is already managed by
the 'types' in struct hns3_rss_conf::conf. This patch removes this
redundant variable.

Fixes: c37ca66f2b ("net/hns3: support RSS")
Cc: stable@dpdk.org

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
2022-05-12 10:28:54 +02:00
Huisong Li
07f64b5f57 net/hns3: fix rollback on RSS hash update
The RSS tuple isn't restored when RSS key length is invalid or setting
algo key failed. This patch fixes it.

Fixes: c37ca66f2b ("net/hns3: support RSS")
Cc: stable@dpdk.org

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
2022-05-12 10:28:54 +02:00
Huisong Li
75ccc3f3d7 net/hns3: fix RSS disable
Currently, hns3 PMD disable RSS by resetting redirection table when user
set rss_hf to 0 so as to all packets go to queue 0. The implementation
may cause following problems:
1) the same type packet may go to different queue on the case of
   disabling all tuples and partial tuples. The problem is determined by
   hardware design.
2) affect the configuration of redirection table and user experience.

For hns3 hardware, the packets with RSS disabled are always go to the
queue corresponding to first entry of the redirection table. Generally,
disable RSS should be implemented by disabling all tuples, This patch
fix the implementation.

Fixes: c37ca66f2b ("net/hns3: support RSS")
Cc: stable@dpdk.org

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
2022-05-12 10:28:54 +02:00
Chengwen Feng
2d287ea3c2 net/hns3: fix mbuf free on Tx done cleanup
Currently, the hns3 PMD may free more mbufs than free_cnt parameter,
this is an incorrect implementation. This patch fixes it.

Fixes: 0b77e8f3d3 ("net/hns3: optimize Tx performance")
Cc: stable@dpdk.org

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
2022-05-12 10:28:54 +02:00
Huisong Li
ec0147b569 net/hns3: fix pseudo-sharing between threads
Some fields in the end of 'struct hns3_rx_queue' and
'struct hns3_tx_queue' are not accessed in the I/O path.
But these fields may be accessed in other threads, which may lead to the
problem of cache pseudo-sharing of IO threads. This patch add a
cacheline alignment to avoid it.

Fixes: 9261fd3caf ("net/hns3: improve IO path data cache usage")
Cc: stable@dpdk.org

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
2022-05-12 10:28:54 +02:00
Huisong Li
a65342d9d5 net/hns3: fix MAC and queues HW statistics overflow
The MAC and queues statistics are 32-bit registers in hardware. If
hardware statistics are not obtained for a long time, these statistics
will be overflow.
So PF and VF driver have to periodically obtain and save these
statistics. Since the periodical task and the stats API are in different
threads, we introduce a statistics lock to protect the statistics.

Fixes: 8839c5e202 ("net/hns3: support device stats")
Cc: stable@dpdk.org

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
2022-05-12 10:28:54 +02:00
Huisong Li
1a1de9879f net/hns3: fix order of clearing imissed register in PF
Clearing imissed registers in PF hardware depends on the
'drop_stats_mode' in struct hns3_hw. The variable is initialized after
the "hns3_get_configuration". But, in current code, the clearing
operation runs before the function.
So this patch fixes this order. In addition, this patch extracts a
public function to initialize and uninitialize statistics to improve the
maintainability of these codes.

Fixes: 3e9f3042d7 ("net/hns3: add imissed packet stats")
Cc: stable@dpdk.org

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
2022-05-12 10:28:54 +02:00
Aman Singh
8c9e97ddbe ethdev: fix build with vtune option
When VTune profile option is enabled, compilation error is seen.

Bugzilla ID: 1004
Fixes: f9bdee267a ("ethdev: hide internal structures")
Cc: stable@dpdk.org

Signed-off-by: Aman Singh <aman.deep.singh@intel.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2022-05-12 10:23:52 +02:00
Quentin Armitage
0809d870fc net/tap: fix interrupt handler freeing
rte_pmd_tun/tap_probe() allocates pmd->intr_handle in eth_dev_tap_create()
and it should not be freed until rte_pmd_tap_remove() is called.

Inspection of tap_rx_intr_vec_set() shows that the call to
tap_tx_intr_vec_uninstall() was calling rte_intr_instance_free() but
tap_tx_intr_vec_install() can then be immediately called, and this then
uses pmd->intr_handle without it being reallocated.

Move rte_intr_instance_free() call from tap_tx_intr_vec_uninstall()
to rte_pmd_tap_remove().

Fixes: d61138d4f0 ("drivers: remove direct access to interrupt handle")
Cc: stable@dpdk.org

Signed-off-by: Quentin Armitage <quentin@armitage.org.uk>
Reviewed-by: David Marchand <david.marchand@redhat.com>
2022-05-12 10:11:16 +02:00
Huisong Li
1c5c6cd85f net/bonding: fix slave stop and remove on port close
All slaves will be stopped and removed when closing a bonded port.
But the while loop can not end if both rte_eth_dev_stop and
rte_eth_bond_slave_remove fails, runs infinitely.
This is because the skipped slave port counted in both function failures
but it should be counted only one.

Fixing by not continue to process in the loop after first failure.

Fixes: fb0379bc5d ("net/bonding: check stop call status")
Cc: stable@dpdk.org

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
2022-05-11 14:48:16 +02:00