Jun Yang [Fri, 4 Sep 2020 08:39:28 +0000 (14:09 +0530)]
net/dpaa: support virtual storage profile
This patch adds support for Virtual Storage profile (VSP) feature.
With VSP support when memory pool is created, the hw buffer pool id
i.e. bpid is not allocated; the bpid is identified by dpaa flow
create API.
The memory pool of RX queue is attached to specific BMan pool
according to the VSP ID when RX queue is setup.
For fmlib based hash queue, VSP base ID is assigned to each queue.
Signed-off-by: Jun Yang <jun.yang@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Hemant Agrawal [Fri, 4 Sep 2020 08:39:27 +0000 (14:09 +0530)]
bus/dpaa: add virtual storage profile port init
This patch add support to initialize the VSP ports
in the FMAN library.
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Radu Bulie [Fri, 4 Sep 2020 08:39:26 +0000 (14:09 +0530)]
bus/dpaa: support shared MAC
A shared MAC interface is an interface which can be used
by both kernel and userspace based on classification configuration
It is defined in dts with the compatible string
"fsl,dpa-ethernet-shared" which bpool will be seeded by the dpdk
partition and configured as a netdev by the dpaa Linux eth driver.
User space buffers from the bpool will be kmapped by the kernel.
Signed-off-by: Radu Bulie <radu-andrei.bulie@nxp.com>
Signed-off-by: Jun Yang <jun.yang@nxp.com>
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Sachin Saxena [Fri, 4 Sep 2020 08:39:25 +0000 (14:09 +0530)]
net/dpaa: support FMCless mode
This patch uses fmlib to configure the FMAN HW for flow
and distribution configuration, thus avoiding the need
for static FMC tool execution optionally.
Signed-off-by: Sachin Saxena <sachin.saxena@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Jun Yang [Fri, 4 Sep 2020 08:39:24 +0000 (14:09 +0530)]
net/dpaa: support VSP in fmlib
This patch adds support for VSP (Virtual Storage Profile)
in fmlib routines.
VSP allow a network interface to be divided into physical
and virtual instance(s).
The concept is very similar to SRIOV.
Signed-off-by: Jun Yang <jun.yang@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Hemant Agrawal [Fri, 4 Sep 2020 08:39:23 +0000 (14:09 +0530)]
net/dpaa: support fmlib
DPAA platorm MAC interface is known as FMAN i.e. Frame Manager.
There are two ways to control it.
1. Statically configure the queues and classification rules before the
start of the application using FMC tool.
2. Dynamically configure it within application by making API calls of
fmlib.
The fmlib or Frame Manager library provides an API on top of the
Frame Manager driver ioctl calls, that provides a user space application
with a simple way to configure driver parameters and PCD
(parse - classify - distribute) rules.
This patch integrates the base fmlib so that various queue config, RSS
and classification related features can be supported on DPAA platform.
Signed-off-by: Sachin Saxena <sachin.saxena@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Yunjian Wang [Mon, 7 Sep 2020 01:46:33 +0000 (09:46 +0800)]
net/hns3: fix out of bounds access
This patch fixes (out-of-bounds access) coverity issue.
Coverity issue: 349932
Fixes:
7d7f9f80bbfb ("net/hns3: support MAC address related operations")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Steve Yang [Fri, 4 Sep 2020 07:29:07 +0000 (07:29 +0000)]
net/iavf: downgrade error log
When receiving the unsupported AQ messages, it's taken as an
error. It's not appropriate and triggers too much unnecessary print.
Fixes:
22b123a36d07 ("net/avf: initialize PMD")
Cc: stable@dpdk.org
Signed-off-by: Steve Yang <stevex.yang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Steve Yang [Fri, 4 Sep 2020 07:29:05 +0000 (07:29 +0000)]
net/iavf: fix setting of MAC address
When setting the MAC address, the ethdev layer copies the new mac
address in dev->data->mac_addrs[0] before calling the dev_ops.
Therefore, is_same_ether_addr(mac_addr, dev->data->mac_addrs) was
always true, and the MAC was never set. Remove this test to fix the
issue.
Fixes:
538da7a1cad2 ("net: add rte prefix to ether functions")
Cc: stable@dpdk.org
Signed-off-by: Steve Yang <stevex.yang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Steve Yang [Fri, 4 Sep 2020 07:29:04 +0000 (07:29 +0000)]
net/iavf: fix port start during configuration restore
If configuring VF promiscuous mode is not supported,
return -ENOTSUP error code in .promiscuous_enable/disable dev_ops.
This is to fix the port start during configuration restore,
where if .promiscuous_enable/disable dev_ops exists
and return any value other than -ENOTSUP, start will fail.
Same is done for .allmulticast_enable/disable dev_ops.
Fixes:
ca041cd44fcc ("ethdev: change allmulticast callbacks to return status")
Fixes:
9039c8125730 ("ethdev: change promiscuous callbacks to return status")
Cc: stable@dpdk.org
Signed-off-by: Steve Yang <stevex.yang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Steve Yang [Fri, 4 Sep 2020 07:29:02 +0000 (07:29 +0000)]
net/iavf: fix scattered Rx enabling
No need to add additional vlan tag size for max packet size,
the queue's Rx Max Frame Size (rxq->max_pkt_len) already
includes the vlan header size in iavf.
Fixes:
69dd4c3d0898 ("net/avf: enable queue and device")
Cc: stable@dpdk.org
Signed-off-by: Steve Yang <stevex.yang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Guinan Sun [Fri, 4 Sep 2020 06:21:54 +0000 (06:21 +0000)]
net/i40e: fix link status
If the PF driver supports the new speed reporting capabilities
then use link_event_adv instead of link_event to get the speed.
Fixes:
2a73125b7041 ("i40evf: fix link info update")
Cc: stable@dpdk.org
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
Tested-by: Jiaqi Min <jiaqix.min@intel.com>
Ivan Dyukov [Tue, 11 Aug 2020 08:52:25 +0000 (11:52 +0300)]
net/ice: return unknown speed in status
rte_ethdev has declared new NUM_UNKNOWN speed which
could be used in case when no speed information is available and
link is up. NUM_NONE should be returned, if link is down.
Signed-off-by: Ivan Dyukov <i.dyukov@samsung.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Ivan Dyukov [Tue, 11 Aug 2020 08:52:24 +0000 (11:52 +0300)]
net/i40e: return unknown speed in status
rte_ethdev has declared new NUM_UNKNOWN speed which
could be used in case when no speed information is available and
link is up. NUM_NONE should be returned, if link is down.
Signed-off-by: Ivan Dyukov <i.dyukov@samsung.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
Ivan Dyukov [Tue, 11 Aug 2020 08:52:23 +0000 (11:52 +0300)]
net/ixgbe: return unknown speed in status
rte_ethdev has declared new NUM_UNKNOWN speed which
could be used in case when no speed information is available
Signed-off-by: Ivan Dyukov <i.dyukov@samsung.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>
Thomas Monjalon [Tue, 11 Aug 2020 08:52:20 +0000 (11:52 +0300)]
ethdev: allow unknown link speed
When querying the link information, the link status is
a mandatory major information.
Other boolean values are supposed to be accurate:
- duplex mode (half/full)
- negotiation (auto/fixed)
This API update is making explicit that the link speed information
is optional.
The value ETH_SPEED_NUM_NONE (0) was already part of the API.
The value ETH_SPEED_NUM_UNKNOWN (infinite) is added to cover
two different cases:
- speed is not known by the driver
- device is virtual
Suggested-by: Morten Brørup <mb@smartsharesystems.com>
Suggested-by: Benoit Ganne <bganne@cisco.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Huisong Li [Tue, 25 Aug 2020 11:53:05 +0000 (19:53 +0800)]
net/hns3: fix some incomplete command structures
The descriptor of the command between firmware and driver consists of
8-byte header and 24-byte data field. The contents sent to firmware are
packaged into a command structure as the data field of command
descriptor.
There are some command structures in hns3_dcb.h file that are less than
24 byte. So this patch fixes these incomplete command structures.
Fixes:
62e3ccc2b94c ("net/hns3: support flow control")
Cc: stable@dpdk.org
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Huisong Li [Tue, 25 Aug 2020 11:53:03 +0000 (19:53 +0800)]
net/hns3: fix default MAC address from firmware
Currently, default MAC address obtained from firmware in PF driver is
directly used by .mac_addr_set ops implementation function when the
rte_eth_dev_start API function is executed. At this moment, if the
default MAC addr isn't an unicast address, it will fail to set default
MAC addr to hardware.
So this patch adds the validity check of default MAC addr in PF driver.
We will use a random unicast address, if the default MAC address
obtained from firmware is not a valid unicast address.
In addition, this patch also adjusts the location of processing default
MAC addr in VF driver so as to increase relevance and readability of the
code.
Fixes:
eab21776717e ("net/hns3: support setting VF MAC address by PF driver")
Fixes:
d51867db65c1 ("net/hns3: add initialization")
Cc: stable@dpdk.org
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Huisong Li [Tue, 25 Aug 2020 11:53:01 +0000 (19:53 +0800)]
net/hns3: replace max private macro
This patch uses RTE_MAX function in DPDK lib to replace the private
macro named max_t in driver.
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Wei Hu (Xavier) [Tue, 25 Aug 2020 11:53:00 +0000 (19:53 +0800)]
net/hns3: support maximum 256 flow director counter
The FDIR counter was used to count the number of FDIR hit, the maximum
number of the counter is 128 based on kunpeng 920, and it was 256 based
on kunpeng 930.
The firmware is responsible to allocate counters for different PF
devices, so the available counter number of one PF may be bigger than
128.
Currently, there are two places using the counter in driver:
1. Configure the counter. Driver uses the command whose opcode is
HNS3_OPC_FD_AD_OP, now we extend one bit to hold the high bit of
counter-id in the command format.
2. Query the statistic information of the counter. Driver uses the
command whose opcode is HNS3_OPC_FD_COUNTER_OP, now the command
already support 16-bit counter-id.
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Wei Hu (Xavier) [Tue, 25 Aug 2020 11:52:59 +0000 (19:52 +0800)]
net/hns3: add more hardware error types
The new firmware adds the hardware error types reported by MSI-x mode.
These errors are defined as RAS errors in hardware and belong to a
different type from the MSI-x errors processed by the driver.
When hardware detects an error which must be handled by the driver for
device to run properly it reports the error information through the
MSI-x interrupt. After receiving the interrupt reported by the hardware,
the driver queries the error information and identifies the error level,
then rectifies the error. All errors will be logged.
In addition, the hardware may be reset at the function or global level
based on the error level. After the reset is complete, the hardware will
recover to the normal status.
Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Wei Hu (Xavier) [Tue, 25 Aug 2020 11:52:58 +0000 (19:52 +0800)]
net/hns3: add Tx short frame padding compatibility
There are difference about padding ultra-short frame in Tx procession
for different versions of hardware network engine.
If packet length is less than minimum packet length supported by
hardware in Tx direction, driver need to pad it to avoid error. The
minimum packet length in Tx direction is 33 based on kunpeng 920, and 9
based on kunpeng 930.
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Wei Hu (Xavier) [Tue, 25 Aug 2020 11:52:57 +0000 (19:52 +0800)]
net/hns3: add Rx interrupts compatibility
There are difference about queue's interrupt configurations for
different versions of hardware network engine, such as queue's interrupt
mapping mode, coalesce configuration, etc.
The following uses the configuration differences of the interrupt
mapping mode as an example.
1) For some versions of hardware network engine, such as kunpeng 920,
because of the hardware constraint, we need implement unmmapping
relationship configurations by binding all queues to the last
interrupt vector and reserving the last interrupt vector. This
results in a decrease of the maximum queues when upper applications
call the rte_eth_dev_configure API function to enable Rx interrupt.
2) And for another versions, such as kunpeng 930, hns3 PMD driver can
map/unmmap all interrupt vectors with queues when Rx interrupt is
enabled.
This patch resolves configuration differences about Rx interrupts based
on kunpeng 920 and kunpeng 930.
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Wei Hu (Xavier) [Tue, 25 Aug 2020 11:52:56 +0000 (19:52 +0800)]
net/hns3: get device specifications from firmware
This patch adds getting PF/VF device specifications from firmware.
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Wei Hu (Xavier) [Tue, 25 Aug 2020 11:52:55 +0000 (19:52 +0800)]
net/hns3: get device capability from firmware
This patch adds getting device capabilities from firmware, so driver can
supply different capabilities and specifications to upper level
applications base on different versions of hardware network engine.
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Yunjian Wang [Mon, 24 Aug 2020 13:02:39 +0000 (21:02 +0800)]
bus/dpaa: remove logically dead code
This patch removes logically dead code reported by coverity.
Coverity issue: 349930
Fixes:
b9c94167904f ("bus/dpaa: decouple FQ portal alloc and init")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Junyu Jiang [Tue, 1 Sep 2020 08:14:36 +0000 (08:14 +0000)]
net/iavf: fix mismatch command
The "command mismatch" warning shouldn't be triggered by
VIRTCHNL_OP_EVENT opcode, because the VIRTCHNL_OP_EVENT
opcode is used by PF notifies status change events to VF.
This patch fixed the issue.
Fixes:
837c2ed86e4c ("net/iavf: return error if opcode is mismatched")
Cc: stable@dpdk.org
Signed-off-by: Junyu Jiang <junyux.jiang@intel.com>
Reviewed-by: Qiming Yang <qiming.yang@intel.com>
Steve Yang [Thu, 3 Sep 2020 07:19:12 +0000 (07:19 +0000)]
net/i40e: support link status event in VF
When PF event VIRTCHNL_EVENT_LINK_CHANGE received, i40evf need update
the link status and issue RTE_ETH_EVENT_INTR_LSC via rte ether device
callback function.
Signed-off-by: Steve Yang <stevex.yang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Kalesh AP [Fri, 28 Aug 2020 05:01:12 +0000 (10:31 +0530)]
net/bnxt: fix speed setting on certain adapters
On BCM957508-N2100 adapters, FW will not allow any user other
than BMC to shutdown the port. As a result, bnxt_get_hwrm_link_config()
always returns link up.
Because of this, driver will not update the new port configurations
such as speed, autoneg during a port start.
Fixed the condition to invoke bnxt_set_hwrm_link_config() in
bnxt_init_chip().
Fixes:
7bc8e9a227cc ("net/bnxt: support async link notification")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kalesh AP [Fri, 28 Aug 2020 05:01:11 +0000 (10:31 +0530)]
net/bnxt: fix L2 filter allocation
DPDK does not support RoCE and XDP. The driver should set the
bit 5:4 of the flag to 1 and set bit 6 of the flag in the
HWRM_CFA_L2_FILTER_ALLOC command to disable RoCE and XDP features.
This change will greatly reduce the CFA resource consumption.
Fixes:
f92735db1e4c ("net/bnxt: add L2 filter alloc/init/free")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kalesh AP [Fri, 28 Aug 2020 05:01:10 +0000 (10:31 +0530)]
net/bnxt: fix crash in vector mode Tx
rte_pktmbuf_prefree_seg() can return NULL if the mbuf still
has remaining references on it.
Adding a NULL check to prevent segfault.
Fixes:
bc4a000f2f53 ("net/bnxt: implement SSE vector mode")
Fixes:
398358341419 ("net/bnxt: support NEON")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kalesh AP [Fri, 28 Aug 2020 05:01:09 +0000 (10:31 +0530)]
net/bnxt: fix structure variable initialization
During port start if bnxt_alloc_all_hwrm_stat_ctxs() fails,
in the cleanup path we do see errors like below:
bnxt_hwrm_ring_free(): hwrm_ring_free cp failed. rc:2
bnxt_hwrm_ring_free(): hwrm_ring_free rx failed. rc:2
The reason for this is in bnxt_free_all_hwrm_rings(), the check
is made against "ring->fw_ring_id != INVALID_HW_RING_ID" which
always return true as ring->fw_ring_id is not set to INVALID_HW_RING_ID
while initialising the ring structs.
Fixes:
6eb3cc2294fd ("net/bnxt: add initial Tx code")
Fixes:
2eb53b134aae ("net/bnxt: add initial Rx code")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Venkat Duvvuru [Fri, 28 Aug 2020 05:01:08 +0000 (10:31 +0530)]
net/bnxt: fix LRO configuration
The maximum number of TCP segments that can be aggregated & the
maximum number of aggregations the VNIC supports are configured
incorrectly during LRO configuration.
This patch fixes these values.
Fixes:
b150a7e7ee66 ("net/bnxt: support LRO on Thor adapters")
Cc: stable@dpdk.org
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kalesh AP [Fri, 28 Aug 2020 05:01:07 +0000 (10:31 +0530)]
net/bnxt: fix endianness while setting L4 destination port
Use "req.tunnel_dst_port_val" in bnxt_hwrm_tunnel_dst_port_alloc()
as big endian since hwrm spec mandates this field in network byte order.
Also, fixed the endianness while parsing the command output.
Fixes:
10d074b2022d ("net/bnxt: support tunneling")
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>
Venkat Duvvuru [Wed, 29 Jul 2020 14:04:59 +0000 (19:34 +0530)]
net/bnxt: fix VF representor port add
Fix VF representor port add when it's endpoint interface is down.
While adding vf representor port to a bridge, vnic & svif information of
vf representors endpoint(VF) would be needed to program default flow
rules.
However, if the endpoint interface is down when vf representor port is
added, firmware will return invalid vnic & svif information.
This patch fixes the problem by registering to DEFAULT_VNIC_CHANGE
async event and once the async event is received, use the endpoint
information(VF's fid) to fetch it's vnic & svif information and
program the default flow rules.
Fixes:
322bd6e70272 ("net/bnxt: add port representor infrastructure")
Cc: stable@dpdk.org
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Somnath Kotur [Wed, 29 Jul 2020 14:04:58 +0000 (19:34 +0530)]
net/bnxt: cleanup and check ULP context allocation
Set ulp_ctx explicitly to NULL in ulp_ctx_deinit() so that representor
init is aborted if parent ulp context is not initialized.
Also check for the same before creation of port default rules.
Additional checks added in VF rep dev ops for proper parent dev
initialization, to avoid null pointer dereference.
Fixes:
322bd6e70272 ("net/bnxt: add port representor infrastructure")
Fixes:
313ac35ac701 ("net/bnxt: support ULP session manager init")
Cc: stable@dpdk.org
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Wed, 29 Jul 2020 14:04:57 +0000 (19:34 +0530)]
net/bnxt: lookup default action record PARIF
The lookup default action record parif table is updated to catch
the miss path for the entries in the exact match table.
PARIF is handler to a partition of the physical port. The lookup
parif table contains entries for each incoming interface the default
action for the miss entries that do not match the configured rules in
the exact match table. This fix configures those entries in that table.
Fixes:
fe82f3e02701 ("net/bnxt: support exact match templates")
Cc: stable@dpdk.org
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Shahaji Bhosle <sbhosle@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Wed, 29 Jul 2020 14:04:56 +0000 (19:34 +0530)]
net/bnxt: configure loopback PARIF for egress flows
Configure loopback parif for full offload egress flows.
PARIF is handler to a partition of the physical port.
The full offload egress flows for the VF rep interface must
use loopback parif to offload missed flows. The miss
flow path for the VF rep interface has to be loopback interface
parif entry and for the non-VF rep interface it has to be the
interface's parif entry.
Fixes:
fe82f3e02701 ("net/bnxt: support exact match templates")
Cc: stable@dpdk.org
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Shahaji Bhosle <sbhosle@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Gaurav Singh [Thu, 6 Aug 2020 03:52:13 +0000 (23:52 -0400)]
net/bnxt: remove redundant null check
In bnxt_validate_and_parse_flow_type
vxlan_spec cannot be NULL since its already being accessed
before. Remove the redundant NULL check.
Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Yunjian Wang [Fri, 31 Jul 2020 12:09:06 +0000 (20:09 +0800)]
net/bnxt: add memory allocation check in VF info init
The function rte_malloc() could return NULL, the return
value need to be checked.
Fixes:
b7778e8a1c00 ("net/bnxt: refactor to properly allocate resources for PF/VF")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Yunjian Wang [Fri, 31 Jul 2020 12:08:55 +0000 (20:08 +0800)]
net/bnxt: fix memory leak when freeing VF info
When freeing a vf_info, we should free the 'vlan_as_table'
and 'vlan_table' for the vf_info.
Fixes:
b7778e8a1c00 ("net/bnxt: refactor to properly allocate resources for PF/VF")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Ciara Loftus [Fri, 7 Aug 2020 09:32:48 +0000 (09:32 +0000)]
net/af_xdp: change return value from Rx to unsigned
The af_xdp rx function was returning a negative value on error, when an
unsigned value is expected. Fix this.
Fixes:
d8a210774e1d ("net/af_xdp: support unaligned umem chunks")
Cc: stable@dpdk.org
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Yuying Zhang [Wed, 26 Aug 2020 07:45:21 +0000 (07:45 +0000)]
net/fm10k: use inclusive engineering terminology
Offensive terms should be replaced with more inclusive engineering
terms.
Deprecated terms include "master/slave" and "blacklist/whitelist".
Signed-off-by: Yuying Zhang <yuying.zhang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Wei Zhao [Mon, 31 Aug 2020 06:58:17 +0000 (14:58 +0800)]
net/ice: fix flow director GTPU rule creation
For GTPU rule without extend header the training packet
for FDIR is different. This patch enable these case.
Fixes:
934fd00c9389 ("net/ice/base: fix GTPU IP hash")
Cc: stable@dpdk.org
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Tested-by: Zhimin Huang <zhiminx.huang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Jeff Guo [Mon, 31 Aug 2020 05:50:45 +0000 (13:50 +0800)]
net/ice: fix hash parser
GTPU TEID hash should only be enabled when ETH_RSS_GTPU is required.
And the hash parser should not restrict the combined usage of protocol.
Fixes:
e7cc68c70736 ("net/ice: fix GTPU TEID hash")
Cc: stable@dpdk.org
Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Haiyue Wang [Wed, 26 Aug 2020 00:55:51 +0000 (08:55 +0800)]
doc: update ice production information
The E810 (ice) has been shipping to customers, not just for evaluation
any more.
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Junfeng Guo [Wed, 26 Aug 2020 03:21:41 +0000 (11:21 +0800)]
net/ice: support auxiliary IP offset Rx descriptor
Add RXDID #25 to support Auxiliary IP Offset Rx descriptor, including
FlexiMD.4: Outer/Single IPv4 Header offset
FlexiMD.5: Outer/Single IPv6 Header offset
And parse the valid IP Offset into mbuf by flexible descriptor
section via devargs "proto_xtr" with "proto_xtr=ip_offset".
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
Haiyue Wang [Fri, 14 Aug 2020 16:30:55 +0000 (00:30 +0800)]
common/iavf: mark internal symbols
According to ABI policy, the internal functions should have the new tag
__rte_internal and linked into INTERNAL sessions.
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Wei Zhao [Thu, 13 Aug 2020 02:14:41 +0000 (10:14 +0800)]
net/ice: fix VF index check for DCF
The vf index in rte_flow command need to check in order that not larger
than actual vf number. Also change some error log for wrong action.
Fixes:
829c3106812d ("net/ice: enable switch flow on DCF")
Cc: stable@dpdk.org
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Tested-by: Nannan Lu <nannan.lu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Guinan Sun [Mon, 27 Jul 2020 05:34:51 +0000 (05:34 +0000)]
net/i40e/base: update version
Update base code version in readme.
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
Guinan Sun [Mon, 27 Jul 2020 05:34:50 +0000 (05:34 +0000)]
net/i40e/base: replace AQ command for NVM update
Add AQ command "NVM update in process"
to replace the original AQ command "NVM progress".
Signed-off-by: Jaroslaw Ilgiewicz <jaroslaw.ilgiewicz@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
Guinan Sun [Mon, 27 Jul 2020 05:34:49 +0000 (05:34 +0000)]
net/i40e/base: support disabling unused ports
This patch adds support for disabling unused ports.
Signed-off-by: Damian Milosek <damian.milosek@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
Guinan Sun [Mon, 27 Jul 2020 05:34:48 +0000 (05:34 +0000)]
net/i40e/base: fix possible uninitialized variable
Fix possible uninitialized variable in i40e in the i40e_get_lpi_counters
function.
Fixes:
429bdc0cd967 ("net/i40e/base: add function to read LPI counters")
Cc: stable@dpdk.org
Signed-off-by: Adam Ludkiewicz <adam.ludkiewicz@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
Guinan Sun [Mon, 27 Jul 2020 05:34:47 +0000 (05:34 +0000)]
net/i40e/base: update FW API version to 1.11
Upcoming FW increment API version to 1.11 due to new bit and new
fields in the Replace Cloud Filters AQ command.
Signed-off-by: Jacek Naczyk <jacek.naczyk@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
Guinan Sun [Mon, 27 Jul 2020 05:34:46 +0000 (05:34 +0000)]
net/i40e/base: add custom cloud filter types
This patch adds the new filter types needed for custom cloud filters.
These custom cloud filters will route traffic to VFs based on the
dst IP for both tunneled and non-tunneled packets.
Signed-off-by: Harshitha Ramamurthy <harshitha.ramamurthy@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
Guinan Sun [Mon, 27 Jul 2020 05:34:45 +0000 (05:34 +0000)]
net/i40e/base: add aborted packet type definition
Add I40E_RX_PTYPE_PARSER_ABORTED definition, so i40e driver will know
opcode for parser aborted packets.
Without this definition driver would have to rely on magic numbers.
Signed-off-by: Przemyslaw Patynowski <przemyslawx.patynowski@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
Guinan Sun [Mon, 27 Jul 2020 05:34:44 +0000 (05:34 +0000)]
net/i40e/base: enable FEC on/off flag setting for X722
Starting with API version 1.10 firmware for X722 devices has ability
to change FEC settings in PHY. Code added in this patch
checks API version and sets appropriate capability flag.
Signed-off-by: Dawid Lukwinski <dawid.lukwinski@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
Haiyue Wang [Wed, 12 Aug 2020 00:57:53 +0000 (08:57 +0800)]
net/ice: optimize FlexiMD hardware check
The Flexible Metadata #4 and #5 in the Rx Flex Descriptor are defined to
extract the protocol specified fields or its offset. Its function relays
on the DDP package support in hardware.
Optimize to only check the hardware support when the user specifies the
'proto_xtr' devargs. And not require all the types need to be support in
hardware, otherwise if new protocol extraction type is introduced, it is
hard to maintain the compatibility. Just check the type support in need.
And the protocol IDs are 8 bits length, so the uint8_t is the right type
to be used. Also introduce the 'opcode' variable to specify the metadata
extraction type: it can be protocol fields or offset report.
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Steve Yang [Tue, 11 Aug 2020 07:27:52 +0000 (07:27 +0000)]
net/iavf: release port upon close
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: Steve Yang <stevex.yang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Wei Zhao [Mon, 13 Jul 2020 07:48:11 +0000 (15:48 +0800)]
net/iavf: support multicast configuration
This patch enable add multicast address for iavf.
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Ophir Munk [Tue, 25 Aug 2020 09:31:16 +0000 (09:31 +0000)]
net/mlx5/linux: refactor VLAN
File mlx5_vlan.c contains Netlink APIs (Linux dependent) as part of VM
workaround implementation. Move this implementation to file
linux/mlx5_vlan_os.c. To remove Netlink dependency in header files
change pointer of type 'struct mlx5_nl_vlan_vmwa_context *' to 'void *'.
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Ophir Munk [Tue, 25 Aug 2020 09:31:15 +0000 (09:31 +0000)]
net/mlx5: separate VLAN strip modification
When updating a queue vlan stripping offload - either the WQ is modified
in Verbs or the RQ is modified in DevX. Add a vlan stripping modify
callback to 'struct mlx5_obj_ops' and assign it with the specific Verbs
and DevX implementations: 'rxq_obj_modify_wq_vlan_strip' and
'rxq_obj_modify_rq_vlan_strip' respectively.
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Ophir Munk [Tue, 25 Aug 2020 09:31:14 +0000 (09:31 +0000)]
net/mlx5: remove Verbs dependency in Rx/Tx objects
Replace pointers to ibv structs with pointers to void (file
mlx5_rxtx.h). Specifically the following pointers were replaced:
'struct ibv_cq *', 'struct ibv_wq *', 'struct ibv_comp_channel *',
'struct ibv_rwq_ind_table *a', 'struct ibv_qp *'.
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Ophir Munk [Tue, 25 Aug 2020 09:31:13 +0000 (09:31 +0000)]
net/mlx5: remove more Direct Verbs dependencies
Several DV-based structs of type 'struct mlx5dv_devx_XXX' are replaced
with 'void *' to enable compilation under non-Linux operating systems.
New getter functions were added to retrieve the specific fields that
were previously accessed directly.
Replaced structs:
'struct mlx5dv_pp *'
'struct mlx5dv_devx_event_channel *'
'struct mlx5dv_devx_umem *'
'struct mlx5dv_devx_uar *'
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Ophir Munk [Tue, 25 Aug 2020 09:31:11 +0000 (09:31 +0000)]
net/mlx5: call meter detach only if DR is supported
Flow metering is supported only in direct rules (DR). Currently the APIs
of meter actions create and modify are under #ifdef
HAVE_MLX5_DR_CREATE_ACTION_FLOW_METER, while detaching the meter action
is executed unconditionally. This commit adds the same ifdef to API
mlx5_flow_meter_detach().
This commit avoids compilation failure of non-Linux operating systems
which do not support DR.
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Ophir Munk [Tue, 25 Aug 2020 09:31:10 +0000 (09:31 +0000)]
net/mlx5: remove unused log macros
Remove utility macros INFO, WARN, ERROR. They are not in use and
conflict with identical definitions when compiled under Windows.
Fixes:
80f2d0ed7ff9 ("net/mlx5: add hardware flow debug dump")
Cc: stable@dpdk.org
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Ophir Munk [Tue, 25 Aug 2020 09:31:09 +0000 (09:31 +0000)]
net/mlx5: remove netlink dependency in shared code
This commit adds Linux implementation of routine mlx5_os_mac_addr_flush
as wrapper to Netlink API to avoid direct calls under non-Linux
operating systems.
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Ophir Munk [Tue, 25 Aug 2020 09:31:08 +0000 (09:31 +0000)]
net/mlx5: remove unused includes
Remove unused Linux included files:
<sys/ioctl.h>, <arpa/inet.h> from file net/mlx5/mlx5_mac.c
<sys/mman.h> from file net/mlx5/mlx5.c
Fixes:
771fa900b73a ("mlx5: introduce new driver for Mellanox ConnectX-4 adapters")
Cc: stable@dpdk.org
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Ophir Munk [Tue, 25 Aug 2020 09:31:07 +0000 (09:31 +0000)]
net/mlx5: move Linux ifname function
mlx5_get_ifname() prototype includes 'IF_NAMESIZE' definition from Linux
file net/if.h. Since this API is only used under Linux and to enable
compilation under non-Linux OS - move this prototype from shared file
mlx5.h to file linux/mlx5_os.h.
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Ophir Munk [Tue, 25 Aug 2020 09:31:06 +0000 (09:31 +0000)]
net/mlx5: rename constant conflicting with Windows
Enumerated variable REG_NONE (defined in mlx5_prm.h) is in conflict with
Windows definition (winnt.h): #define REG_NONE ( 0ul ) // No value type
To enable mlx5 PMD Windows compilation - rename REG_NONE as REG_NON.
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Ophir Munk [Tue, 25 Aug 2020 09:31:05 +0000 (09:31 +0000)]
common/mlx5: use common endian types
Replace Linux specific int types with their corresponding DPDK typedefs.
__be16 ==> rte_be16_t
__be32 ==> rte_be32_t
__be64 ==> rte_be64_t
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Ophir Munk [Tue, 25 Aug 2020 09:31:04 +0000 (09:31 +0000)]
common/mlx5: replace strsep with strtok_r
strsep() is a non-standardized API (by C or POSIX) and thus it is
non-portable between different operating systems. Replace it with
strtok_r() which is standardized by the C standard, and hence also by
POSIX.
The replacement occurs in the code that extracts individual PCI class
names (e.g. class=net:vdpa:foo:bar).
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Stephen Hemminger [Tue, 14 Jul 2020 23:58:10 +0000 (16:58 -0700)]
net/tap: avoid using SIGIO
SIGIO maybe used by application, instead choose another rt-signal.
Linux allows any signal to be used for signal based IO.
Search for an unused signal in the available rt-signal range.
Add more error checking for fcntl and signal handling.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Morten Brørup [Fri, 26 Jun 2020 16:51:35 +0000 (18:51 +0200)]
net: optimize ethernet address functions
* rte_is_broadcast_ether_addr():
Use binary logic instead of comparisons and boolean logic, thus reducing
the number of branches.
It now resembles rte_is_zero_ether_addr().
* rte_ether_addr_copy():
The source code modifications were discussed on the mailing list:
http://mails.dpdk.org/archives/dev/2020-June/171584.html
Remove obsolete ICC-specific code and related comment.
Restrict pointer aliasing (suggested by Jerin Jacob).
Remove superfluous "Fast" from function description headline; all DPDK
data plane functions are supposed to be fast.
Signed-off-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Yunjian Wang [Mon, 24 Aug 2020 12:43:46 +0000 (20:43 +0800)]
net/hinic: fix negative array index read
Negative array index read using variable 'i' as an index to array
'filter_info->pkt_filters'. Fixed by add return value check.
Coverity issue: 350364
Fixes:
f4ca3fd54c4d ("net/hinic: create and destroy flow director filter")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Wei Hu (Xavier) [Mon, 24 Aug 2020 11:01:30 +0000 (19:01 +0800)]
ethdev: check if queue setup when getting queue info
This patch adds checking whether the related Tx or Rx queue has been
setup in the rte_eth_rx_queue_info_get and rte_eth_tx_queue_info_get
API function to avoid illegal address access.
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Huisong Li [Mon, 24 Aug 2020 11:01:29 +0000 (19:01 +0800)]
net/hns3: support getting queue information
This patch adds support for querying Rx/Tx queue information.
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Wei Hu (Xavier) [Mon, 24 Aug 2020 11:01:28 +0000 (19:01 +0800)]
net/hns3: report Rx drop packets enable configuration
Currently, if there are not available Rx buffer descriptors in receiving
direction based on hns3 network engine, incoming packets will always be
dropped by hardware. This patch reports the '.rx_drop_en' information to
DPDK framework in the '.dev_infos_get', '.rxq_info_get' and
'.rx_queue_setup' ops implementation function.
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Suanming Mou [Fri, 31 Jul 2020 03:34:18 +0000 (11:34 +0800)]
net/mlx5: manage modify actions with hashed list
To manage header modify actions mlx5 PMD used the single linked list and
lookup and insertion operations took too long times if there were
millions of objects and this impacted the flow insertion/deletion rate.
In order to optimize the performance the hashed list is engaged. The
list implementation is updated to support non-unique keys with few
collisions.
Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Suanming Mou [Fri, 31 Jul 2020 03:34:17 +0000 (11:34 +0800)]
net/mlx5: add hash list extended lookup and insert
The mlx5 PMD hashed list was designed in approach to contain the items
with unique keys only. Now there is the need to store the objects with
possible key collisions. It is not expected to have many collisions
(very likely to have a few ones), but keys become not unique.
This commit adds the hash list extended functions in order to support
insertion and lookup for the lists with non-unique keys.
Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Stephen Hemminger [Tue, 11 Aug 2020 02:33:14 +0000 (19:33 -0700)]
net/netvsc: check for overflow on packet info from host
The data from the host is trusted but checked by the driver.
One check that is missing is that the packet offset and length
might cause wraparound.
Cc: stable@dpdk.org
Reported-by: Nan Chen <whutchennan@gmail.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Long Li <longli@microsoft.com>
Long Li [Tue, 11 Aug 2020 02:33:13 +0000 (19:33 -0700)]
net/netvsc: fix stale value after free
chim_index could potentially be used in other hn_txdesc when re-allocated.
Mark it as invalid to prevent stale value being used.
Fixes:
cc0251813277 ("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>
Long Li [Tue, 11 Aug 2020 02:33:12 +0000 (19:33 -0700)]
bus/vmbus: remove sending interrupts via INT bit
netvsc is a high speed VMBus device that uses monitor bit to signal the
host. It's not necessary to send interrupts via INT bit.
Signed-off-by: Long Li <longli@microsoft.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Long Li [Tue, 11 Aug 2020 02:33:11 +0000 (19:33 -0700)]
net/netvsc: fix multiple channel Rx
netvsc uses rxbuf_info buffer to track received packets attached via
rte_pktmbuf_attach_extbuf() and ack the host based on usage count. It
uses the transaction_id in the VMBus packet to locate where to use
memory in the rxbuf_info.
This is not correct in multiple channel setup, as different channels may
return identical transaction_ids at a time, and may corrupt the
rxbuf_info buffer.
Fix this by defining rxbuf_info for each queue.
Fixes:
4e9c73e96e83 ("net/netvsc: add Hyper-V network device")
Cc: stable@dpdk.org
Signed-off-by: Long Li <longli@microsoft.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Stephen Hemminger [Fri, 14 Aug 2020 17:39:33 +0000 (10:39 -0700)]
net/failsafe: fix double space in warning log
Already get a newline from WARN() macro call.
Fixes:
9dda3e3393c2 ("net/failsafe: add timestamp to stats snapshot")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Gaetan Rivet <grive@u256.net>
Michal Krawczyk [Wed, 12 Aug 2020 16:37:29 +0000 (18:37 +0200)]
net/ena/base: fix doorbell evaluation for LLQ
This patch adds a missing LLQ-related check in the
ena_com_is_doorbell_needed() routine, which is relevant for the feature
supported by the next generation HW of the ENA.
Fixes:
b2b02edeb0d6 ("net/ena/base: upgrade HAL for new HW features")
CC: stable@dpdk.org
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Signed-off-by: Artur Rojek <ar@semihalf.com>
Harry van Haaren [Mon, 14 Sep 2020 14:31:18 +0000 (15:31 +0100)]
test/service: fix race condition on stopping lcore
This commit fixes a potential race condition in the tests
where the lcore running a service would increment a counter
that was already reset by the test-suite thread. The resulting
race-condition incremented value could cause CI failures, as
indicated by DPDK's CI.
This patch fixes the race-condition by making use of the
added rte_service_lcore_active() API, which indicates when
a service-core is no longer in the service-core polling loop.
The unit test makes use of the above function to detect when
all statistics increments are done in the service-core thread,
and then the unit test continues finalizing and checking state.
Fixes:
f28f3594ded2 ("service: add attribute API")
Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Harry van Haaren [Mon, 14 Sep 2020 14:31:17 +0000 (15:31 +0100)]
service: retrieve lcore active state
This commit adds a new experimental API which allows the user
to retrieve the active state of an lcore. Knowing when the service
lcore is completed its polling loop can be useful to applications
to avoid race conditions when e.g. finalizing statistics.
The service thread itself now has a variable to indicate if its
thread is active. When zero the service thread has completed its
service, and has returned from the service_runner_func() function.
Suggested-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
David Marchand [Thu, 17 Sep 2020 11:28:23 +0000 (13:28 +0200)]
bus/pci: remove duplicate declaration
This declaration is the same as the one a few lines before.
Fixes:
6844d146ff39 ("eal: add bus pointer in device structure")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
David Marchand [Thu, 17 Sep 2020 11:28:22 +0000 (13:28 +0200)]
eal: hide internal device event structure
This structure is not used in the public API.
Fixes:
a753e53d517b ("eal: add device event monitor framework")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
David Marchand [Thu, 17 Sep 2020 11:28:21 +0000 (13:28 +0200)]
mem: drop mapping API workaround
Now that the pci_map_resource API is private to the PCI bus, we can drop
the compatibility workaround we had implemented in 20.08.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
David Marchand [Thu, 17 Sep 2020 11:28:20 +0000 (13:28 +0200)]
pci: move resource mapping to the PCI bus
As reported during 20.08 work for Windows, the pci_map_resource API was
built with the assumption that its flags would be passed to mmap().
This introduced a regression when adding the rte_mem_map API as reported
in the workaround commit
9d2b24593724 ("pci: keep API compatibility with
mmap values").
This API was only used in the PCI bus code, so move it there.
There is no code change happening during the move.
The only change is in the pci_map_resource description where the
additional flags are now documented as rte_mem_map API flags:
- * The additional flags for the mapping range.
+ * The additional rte_mem_map() flags for the mapping range.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
David Marchand [Thu, 17 Sep 2020 11:28:19 +0000 (13:28 +0200)]
bus/pci: switch to private kernel driver enum
The rte_kernel_driver enum actually only pointed at PCI drivers and is
only used in the PCI subsystem.
Remove it from the generic device API and use a private enum in the PCI
code.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
David Marchand [Thu, 17 Sep 2020 11:28:18 +0000 (13:28 +0200)]
ethdev: remove unused kernel driver field
This field was not generic as it was filled with PCI kernel drivers only.
It has no known in-tree user (and I could not find opensource projects
using it).
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Thomas Monjalon [Mon, 14 Sep 2020 09:43:25 +0000 (11:43 +0200)]
mbuf: remove physical address alias
Remove the deprecated buf_physaddr union field from rte_mbuf.
It is replaced with buf_iova which is at the same offset.
The single field buf_physaddr in rte_kni_mbuf is also renamed.
This concludes a 3-year process of semantic change.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
Thomas Monjalon [Mon, 14 Sep 2020 14:33:24 +0000 (16:33 +0200)]
mbuf: remove deprecated function and macro aliases
Remove the deprecated functions
- rte_mbuf_data_dma_addr
- rte_mbuf_data_dma_addr_default
which aliased the more recent functions
- rte_mbuf_data_iova
- rte_mbuf_data_iova_default
Remove the deprecated macros
- rte_pktmbuf_mtophys
- rte_pktmbuf_mtophys_offset
which aliased the more recent macros
- rte_pktmbuf_iova
- rte_pktmbuf_iova_offset
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
Thomas Monjalon [Mon, 14 Sep 2020 14:34:36 +0000 (16:34 +0200)]
mempool: remove physical address aliases
Remove the deprecated unioned fields physaddr and phys_addr
from the structures rte_mempool_objhdr and rte_mempool_memhdr.
They are replaced with the fields iova which are at the same offsets.
Remove the deprecated macro MEMPOOL_F_NO_PHYS_CONTIG
which is an alias of the more recent MEMPOOL_F_NO_IOVA_CONTIG.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
Thomas Monjalon [Mon, 14 Sep 2020 14:36:31 +0000 (16:36 +0200)]
mem: remove physical address aliases
Remove the deprecated unioned fields phys_addr
from the structures rte_memseg and rte_memzone.
They are replaced with the fields iova which are at the same offsets.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
Pawel Wodkowski [Wed, 12 Aug 2020 09:51:50 +0000 (15:21 +0530)]
trace: fix C++ compilation
trace_mem is declared as 'void *' which triggers following error:
'...invalid conversion from ‘void*’ to ‘__rte_trace_header*’
[-fpermissive]...'
Fix this by adding proper typecast to 'struct __rte_trace_header *'.
Fixes:
ebaee6409702 ("trace: simplify trace point headers")
Cc: stable@dpdk.org
Signed-off-by: Pawel Wodkowski <pawelwod@gmail.com>
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Nicolas Chautru <nicolas.chautru@intel.com>
Conor Walsh [Mon, 14 Sep 2020 14:11:42 +0000 (14:11 +0000)]
bpf: promote library as stable
The BPF lib was introduced in 18.05.
There were no changes in its public API since 19.11.
It should be mature enough to remove its 'experimental' tag.
RTE_BPF_XTYPE_NUM is also being dropped from rte_bpf_xtype to
avoid possible ABI problems in the future.
Signed-off-by: Conor Walsh <conor.walsh@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>