dpdk.git
3 years agonet/iavf: fix jumbo frame flag condition
Steve Yang [Mon, 18 Jan 2021 07:04:14 +0000 (07:04 +0000)]
net/iavf: fix jumbo frame flag condition

The jumbo frame uses the 'RTE_ETHER_MAX_LEN' as boundary condition,
but the Ether overhead is larger than 18 when it supports dual VLAN tags.
That will cause the jumbo flag rx offload is wrong when MTU size is
'RTE_ETHER_MTU'.

This fix will change the boundary condition with 'RTE_ETHER_MTU' and
overhead, that perhaps impacts the cases of the jumbo frame related.

Fixes: 3fd7a3719c66 ("net/avf: enable ops for MTU setting")
Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")
Cc: stable@dpdk.org
Signed-off-by: Steve Yang <stevex.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/i40e: fix jumbo frame flag condition
Steve Yang [Mon, 18 Jan 2021 07:04:13 +0000 (07:04 +0000)]
net/i40e: fix jumbo frame flag condition

The jumbo frame uses the 'RTE_ETHER_MAX_LEN' as boundary condition,
but the Ether overhead is larger than 18 when it supports dual VLAN tags.
That will cause the jumbo flag rx offload is wrong when MTU size is
'RTE_ETHER_MTU'.

This fix will change the boundary condition with 'RTE_ETHER_MTU' and
overhead, that perhaps impacts the cases of the jumbo frame related.

Fixes: c1715402df8f ("i40evf: fix jumbo frame support")
Fixes: 43e5488c0ac6 ("net/i40e: support MTU configuration")
Fixes: a778a1fa2e4e ("i40e: set up and initialize flow director")
Fixes: c3ac7c5b0b8a ("net/i40e: convert to new Rx offloads API")
Cc: stable@dpdk.org
Signed-off-by: Steve Yang <stevex.yang@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
3 years agonet/hns3: fix jumbo frame flag condition for MTU set
Steve Yang [Mon, 18 Jan 2021 07:04:12 +0000 (07:04 +0000)]
net/hns3: fix jumbo frame flag condition for MTU set

The jumbo frame uses the 'RTE_ETHER_MAX_LEN' as boundary condition,
but the Ether overhead is larger than 18 when it supports dual VLAN tags.
That will cause the jumbo flag rx offload is wrong when MTU size is
'RTE_ETHER_MTU'.

This fix will change the boundary condition with 'HSN3_DEFAULT_FRAME_LEN',
that perhaps impacts the cases of the jumbo frame related.

Fixes: 1f5ca0b460cd ("net/hns3: support some device operations")
Fixes: a5475d61fa34 ("net/hns3: support VF")
Cc: stable@dpdk.org
Signed-off-by: Steve Yang <stevex.yang@intel.com>
Acked-by: Lijun Ou <oulijun@huawei.com>
3 years agonet/e1000: fix jumbo frame flag condition for MTU set
Steve Yang [Mon, 18 Jan 2021 07:04:11 +0000 (07:04 +0000)]
net/e1000: fix jumbo frame flag condition for MTU set

The jumbo frame uses the 'RTE_ETHER_MAX_LEN' as boundary condition,
but the Ether overhead is larger than 18 when it supports VLAN tag.
That will cause the jumbo flag rx offload is wrong when MTU size is
'RTE_ETHER_MTU'.

This fix will change the boundary condition with 'RTE_ETHER_MTU' and
overhead, that perhaps impacts the cases of the jumbo frame related.

Fixes: ef990fb56e55 ("net/e1000: convert to new Rx offloads API")
Cc: stable@dpdk.org
Signed-off-by: Steve Yang <stevex.yang@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
3 years agonet/dpaa2: fix jumbo frame flag condition for MTU set
Steve Yang [Mon, 18 Jan 2021 07:04:10 +0000 (07:04 +0000)]
net/dpaa2: fix jumbo frame flag condition for MTU set

The jumbo frame uses the 'RTE_ETHER_MAX_LEN' as boundary condition,
but the Ether overhead is larger than 18 when it supports VLAN tag.
That will cause the jumbo flag rx offload is wrong when MTU size is
'RTE_ETHER_MTU'.

This fix will change the boundary condition with 'RTE_ETHER_MTU' and
overhead, that perhaps impacts the cases of the jumbo frame related.

Fixes: e16408499412 ("net/dpaa2: configure jumbo frames")
Cc: stable@dpdk.org
Signed-off-by: Steve Yang <stevex.yang@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agonet/dpaa: fix jumbo frame flag condition for MTU set
Steve Yang [Mon, 18 Jan 2021 07:04:09 +0000 (07:04 +0000)]
net/dpaa: fix jumbo frame flag condition for MTU set

The jumbo frame uses the 'RTE_ETHER_MAX_LEN' as boundary condition,
but the Ether overhead is larger than 18 when it supports VLAN tag.
That will cause the jumbo flag rx offload is wrong when MTU size is
'RTE_ETHER_MTU'.

This fix will change the boundary condition with 'RTE_ETHER_MTU' and
overhead, that perhaps impacts the cases of the jumbo frame related.

Fixes: 25f854197abc ("net/dpaa: support jumbo frames")
Cc: stable@dpdk.org
Signed-off-by: Steve Yang <stevex.yang@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agoapp/testpmd: fix max Rx packet length for VLAN packets
Steve Yang [Mon, 18 Jan 2021 07:04:08 +0000 (07:04 +0000)]
app/testpmd: fix max Rx packet length for VLAN packets

When the max rx packet length is smaller than the sum of mtu size and
ether overhead size, it should be enlarged, otherwise the VLAN packets
will be dropped.

Removed the rx_offloads assignment for jumbo frame during command line
parsing, and set the correct jumbo frame flag if MTU size is larger than
the default value 'RTE_ETHER_MTU' within 'init_config()'.

Fixes: 384161e00627 ("app/testpmd: adjust on the fly VLAN configuration")
Fixes: 35b2d13fd6fd ("net: add rte prefix to ether defines")
Fixes: ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
Fixes: 150c9ac2df13 ("app/testpmd: update Rx offload after setting MTU")
Cc: stable@dpdk.org
Signed-off-by: Steve Yang <stevex.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agoethdev: fix max Rx packet length check
Steve Yang [Mon, 18 Jan 2021 07:04:07 +0000 (07:04 +0000)]
ethdev: fix max Rx packet length check

Ethdev is using default Ethernet overhead to decide if provided
'max_rx_pkt_len' value is bigger than max (non jumbo) MTU value,
and limits it to MAX if it is.

Since the application/driver used Ethernet overhead is different than
the ethdev one, check result is wrong.

If the driver is using Ethernet overhead bigger than the default one,
the provided 'max_rx_pkt_len' is trimmed down, and in the driver when
correct Ethernet overhead is used to convert back, the resulting MTU is
less than the intended one, causing some packets to be dropped.

Like,
app     -> max_rx_pkt_len = 1500/*mtu*/ + 22/*overhead*/ = 1522
ethdev  -> 1522 > 1518/*MAX*/; max_rx_pkt_len = 1518
driver  -> MTU = 1518 - 22 = 1496
Packets with size 1497-1500 are dropped although intention is to be able
to send/receive them.

The fix is to make ethdev use the correct Ethernet overhead for port,
instead of default one.

Fixes: 59d0ecdbf0e1 ("ethdev: MTU accessors")
Cc: stable@dpdk.org
Signed-off-by: Steve Yang <stevex.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agodoc: update for txgbe
Jiawen Wu [Fri, 15 Jan 2021 11:03:10 +0000 (19:03 +0800)]
doc: update for txgbe

Add txgbe PMD new features in release notes,
update user guide in txgbe.rst for flow API and traffic manager.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/iavf: adjust CRC statistics calculation
Haiyue Wang [Fri, 15 Jan 2021 06:57:08 +0000 (14:57 +0800)]
net/iavf: adjust CRC statistics calculation

The AVF can support to enable / disable CRC strip, so it needs to adjust
the statistics calculation for ibytes according to offload setting.

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
3 years agonet/iavf: add PTYPE mapping for eCPRI
Jeff Guo [Wed, 13 Jan 2021 14:05:17 +0000 (22:05 +0800)]
net/iavf: add PTYPE mapping for eCPRI

Until the new eCPRI PTYPE be added into the RTE lib, just mapping eCPRI
to the PTYPE of RTE_PTYPE_L4_UDP in iavf pmd.

Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
3 years agonet/ice: add PTYPE mapping for eCPRI
Jeff Guo [Wed, 13 Jan 2021 14:05:16 +0000 (22:05 +0800)]
net/ice: add PTYPE mapping for eCPRI

Until the new eCPRI PTYPE be added into the RTE lib, just mapping eCPRI
to the PTYPE of RTE_PTYPE_L4_UDP in ice pmd.

Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
3 years agocommon/sfc_efx/base: enhance field ID check in field set API
Ivan Malov [Wed, 6 Jan 2021 10:06:01 +0000 (13:06 +0300)]
common/sfc_efx/base: enhance field ID check in field set API

A field ID passed to the API may point to a gap in the array
of field descriptors. Turn down such invocations as improper.

Fixes: 370ed675a952 ("common/sfc_efx/base: support setting PPORT in match spec")
Cc: stable@dpdk.org
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
3 years agocommon/sfc_efx/base: fix MAE match spec class comparison API
Ivan Malov [Wed, 6 Jan 2021 10:06:00 +0000 (13:06 +0300)]
common/sfc_efx/base: fix MAE match spec class comparison API

The helper exits once it encounters a field which hasn't its
capability status reported by the FW. Handle the corner case
when the two mask-value pairs match for the field, which, in
the absence of capability information, is sufficient to deem
the class unaffected by the field. Explain this in a comment.

Fixes: bb71f7e0a35a ("common/sfc_efx/base: add match specs class comparison API")
Cc: stable@dpdk.org
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
3 years agocommon/sfc_efx/base: fix MAE match spec validation helper
Ivan Malov [Wed, 6 Jan 2021 10:05:59 +0000 (13:05 +0300)]
common/sfc_efx/base: fix MAE match spec validation helper

A particular FW version is aware of some set of match fields.
Depending on FW configuration and match specification type, a
known field may not necessarily be allowed to have a non-zero
mask. FW communicates such restrictions via field capabilities
MCDI. Newer FW may be aware of more fields. For such fields,
older FW simply does not report any capabilities.

A situation may occur when libefx is aware of a match field
which the FW is unaware of (eg., older FW), that is, FW does
not report capability status for this field. In this case,
libefx must consider such field as unsupported and demand
all-zeros mask for it when validating match specifications.

Currently, the helper in question simply exits and reports
that the specification is valid when it encounters a field
with no capability status available. This is clearly wrong.

Introduce the missing check to fix the problem.

Fixes: 34285fd0891d ("common/sfc_efx/base: add match spec validate API")
Cc: stable@dpdk.org
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
3 years agocommon/sfc_efx/base: fix MPORT related byte order handling
Ivan Malov [Mon, 28 Dec 2020 03:00:23 +0000 (06:00 +0300)]
common/sfc_efx/base: fix MPORT related byte order handling

MPORT values derived by helper functions are little-endian.
At the same time, MCDIs which consume these values perform
one more host-order to little-endian conversion internally.

Fix the helper functions to return host-order MPORT values.

Fixes: 370ed675a952 ("common/sfc_efx/base: support setting PPORT in match spec")
Fixes: bb024542fffd ("common/sfc_efx/base: add API for adding action drop")
Fixes: 097058033f03 ("common/sfc_efx/base: add API to get mport of PF/VF")
Cc: stable@dpdk.org
Reported-by: Andy Moreton <amoreton@xilinx.com>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
3 years agoapp/testpmd: allocate FEC capability array dynamically
Karra Satwik [Thu, 24 Dec 2020 11:18:49 +0000 (16:48 +0530)]
app/testpmd: allocate FEC capability array dynamically

Request the driver for number of entries in the FEC caps
array and then dynamically allocate the array.

Signed-off-by: Karra Satwik <kaara.satwik@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/cxgbe: support configuring link FEC
Karra Satwik [Sun, 20 Dec 2020 22:47:42 +0000 (04:17 +0530)]
net/cxgbe: support configuring link FEC

Add ethdev ops to query and configure link FEC.

Signed-off-by: Karra Satwik <kaara.satwik@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
3 years agonet/cxgbe: rework and simplify link handling
Karra Satwik [Sun, 20 Dec 2020 22:47:41 +0000 (04:17 +0530)]
net/cxgbe: rework and simplify link handling

Rework and simplify link handling code. Remove redundant
variables in link configuration structure and directly
extract information from the 32-bit link capabilities.

Signed-off-by: Karra Satwik <kaara.satwik@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
3 years agonet/cxgbe: remove legacy 16-bit link capabilities
Karra Satwik [Sun, 20 Dec 2020 22:47:40 +0000 (04:17 +0530)]
net/cxgbe: remove legacy 16-bit link capabilities

Remove legacy 16-bit link capabilities and always request for the
32-bit link capabilities from firmware.

Signed-off-by: Karra Satwik <kaara.satwik@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
3 years agoapp/testpmd: fix start index for showing FEC array
Karra Satwik [Sun, 20 Dec 2020 22:47:01 +0000 (04:17 +0530)]
app/testpmd: fix start index for showing FEC array

Start from index 0 when going through the FEC array. This will allow
"off" to get printed for RTE_ETH_FEC_NOFEC mode.

Fixes: b19da32e3151 ("app/testpmd: add FEC command")
Cc: stable@dpdk.org
Signed-off-by: Karra Satwik <kaara.satwik@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/qede: fix promiscuous enable
Balazs Nemeth [Wed, 23 Dec 2020 14:15:49 +0000 (15:15 +0100)]
net/qede: fix promiscuous enable

When calling rte_eth_promiscuous_enable(port_id) followed by
rte_eth_allmulticast_enable(port_id), the port is not in promisc mode
anymore. This patch ensures that promisc mode takes precedence over
allmulticast mode fixing the regression introduced by b10231aed1ed.

Fixes: b10231aed1ed ("net/qede: fix multicast drop in promiscuous mode")
Cc: stable@dpdk.org
Signed-off-by: Balazs Nemeth <bnemeth@redhat.com>
Acked-by: Rasesh Mody <rmody@marvell.com>
3 years agonet/ice: fix GTPU header parsing
Xuan Ding [Thu, 14 Jan 2021 08:00:53 +0000 (08:00 +0000)]
net/ice: fix GTPU header parsing

Refine the GTPU template to avoid incorrect header type be parsed.
Some indentation is adjusted.

Fixes: 38d632cbdc88 ("net/ice: refactor PF RSS")

Signed-off-by: Xuan Ding <xuan.ding@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
3 years agoapp/testpmd: add UDP tunnel port for eCPRI
Jeff Guo [Fri, 15 Jan 2021 05:15:42 +0000 (13:15 +0800)]
app/testpmd: add UDP tunnel port for eCPRI

Add new UDP tunnel port params for eCPRI configuration, the command
as below:

testpmd> port config 0 udp_tunnel_port add ecpri 6789
testpmd> port config 0 udp_tunnel_port rm ecpri 6789

Signed-off-by: Jeff Guo <jia.guo@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agoethdev: add eCPRI tunnel type
Jeff Guo [Fri, 15 Jan 2021 05:15:41 +0000 (13:15 +0800)]
ethdev: add eCPRI tunnel type

Add type of RTE_TUNNEL_TYPE_ECPRI into the enum of ethdev tunnel type.

Signed-off-by: Jeff Guo <jia.guo@intel.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/mlx5: add GTP PSC item translation
Shiri Kuzin [Mon, 11 Jan 2021 18:21:52 +0000 (20:21 +0200)]
net/mlx5: add GTP PSC item translation

This patch adds the translation function which
sets the qfi, PDU type.

The next extension header which indicates the following
extension header type is set to 0x85 - a PDU session
container.

Signed-off-by: Shiri Kuzin <shirik@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
3 years agonet/mlx5: add GTP PSC flow validation
Shiri Kuzin [Mon, 11 Jan 2021 18:21:51 +0000 (20:21 +0200)]
net/mlx5: add GTP PSC flow validation

In this patch we add validation routine for
GTP PSC extension header.

The GTP PSC extension header must follow the
GTP item.

Signed-off-by: Shiri Kuzin <shirik@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
3 years agocommon/mlx5: add matcher fields for GTP extensions
Shiri Kuzin [Mon, 11 Jan 2021 18:21:50 +0000 (20:21 +0200)]
common/mlx5: add matcher fields for GTP extensions

This is a preparation step to support GTP extension header.

In this patch we add the matcher fields that will be
used to match on the GTP extension header.

Signed-off-by: Shiri Kuzin <shirik@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
3 years agoapp/testpmd: support GTP PSC option in raw sets
Viacheslav Ovsiienko [Mon, 11 Jan 2021 18:21:49 +0000 (20:21 +0200)]
app/testpmd: support GTP PSC option in raw sets

This patch add support for generating GTP PDU container
session option for the raw encap and raw decap sets.
The generated options is single 32-bit word with
minimal length specified as 4, no extra fields in the
option are supported. The option item must be preceded
with the GTP item itself, and GTP item flags must be
set accordingly:

  - E flag must be set, we are going to provide extension
  - S flag must be reset, because GTP item does not
    provide the value for SQN field, we can't fill this one
  - PN flag must be reset, no N-PDU value provided by
    GTP item either

The raw set example:

  set raw_encap 2 eth / ipv4 / udp /
                  gtp v_pt_rsv_flags is 0x34 / gtp_psc / end_set

Please, note - value 0x34 provides the required flag combination.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
3 years agoethdev: update GTP headers
Viacheslav Ovsiienko [Mon, 11 Jan 2021 18:21:48 +0000 (20:21 +0200)]
ethdev: update GTP headers

This patch introduces the GTP header individual flag bit fields
and the header optional word with N-PDU number, Sequence Number
and Next Extension Header type.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/hns3: remove unnecessary memset
Lijun Ou [Wed, 6 Jan 2021 03:46:32 +0000 (11:46 +0800)]
net/hns3: remove unnecessary memset

The hns3_cmd_desc has memset when setup and the memset
for req is unnecessary.

Signed-off-by: Lijun Ou <oulijun@huawei.com>
3 years agonet/hns3: fix crash with multi-process
Min Hu (Connor) [Wed, 6 Jan 2021 03:46:31 +0000 (11:46 +0800)]
net/hns3: fix crash with multi-process

In current version, procedure of saving eth_dev in
hns3 PMD init will be called more than twice, one
for primary, the other for secondary. That will cause
segmentation fault in Multi-process as eth_dev will
be changed in secondary process, which is different
from one in primary process.

The initial problem was access to 'rte_eth_devices'
global variable, which is wrong. But current approach
can cause problem for the secondaries, moving 'eth_dev'
to process private can work but before making things
more complex.

This patch deserted the procedure of saving eth_dev in
hns3 PMD init. Instead, it creates an internal function
that gets "struct hns3_hw" as parameter and it can be
called internally without knowing 'eth_dev'and the
.dev_ops can be wrapper to this.

Fixes: 2390bf217f4d ("net/hns3: fix FEC state query")
Cc: stable@dpdk.org
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
3 years agonet/hns3: fix Rx/Tx errors stats
Huisong Li [Wed, 6 Jan 2021 03:46:30 +0000 (11:46 +0800)]
net/hns3: fix Rx/Tx errors stats

Abnormal errors stats in Rx/Tx datapath are statistics
items in driver, and displayed in xstats. They should
be cleared by the rte_eth_xstats_reset api, instead of
the rte_eth_stats_reset.

Fixes: c4b7d6761d01 ("net/hns3: get Tx abnormal errors in xstats")
Fixes: 521ab3e93361 ("net/hns3: add simple Rx path")
Fixes: bba636698316 ("net/hns3: support Rx/Tx and related operations")
Cc: stable@dpdk.org
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
3 years agonet/hns3: fix error code in xstats
Huisong Li [Wed, 6 Jan 2021 03:46:29 +0000 (11:46 +0800)]
net/hns3: fix error code in xstats

The ethdev API has processed the failure to obtain
xstats statistics. Therefore, driver should return
an error code instead of 0 in 'hns3_dev_xstats_get'
API.

Fixes: 8839c5e202f3 ("net/hns3: support device stats")
Cc: stable@dpdk.org
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
3 years agonet/hns3: fix xstats with id and names
Huisong Li [Wed, 6 Jan 2021 03:46:28 +0000 (11:46 +0800)]
net/hns3: fix xstats with id and names

Currently, validity check for ids and values in the
hns3_dev_xstats_get_by_id API is incorrect, which will
cause a problem. Namely, if the ID range of the xstats
stats item does not include the basic stats item, the
app can not obtain the corresponding xstats statistics
in hns3_dev_xstats_get_by_id.

Similarly, the hns3_dev_xstats_get_names_by_id interface
also has a problem.

Although the input parameter verification code cannot be
executed due to the implementation of the ethdev framework
interface, the driver needs to ensure the correctness of
the input parameters.

Fixes: 8839c5e202f3 ("net/hns3: support device stats")
Cc: stable@dpdk.org
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
3 years agonet/hns3: fix interception with flow director
Lijun Ou [Wed, 6 Jan 2021 03:46:27 +0000 (11:46 +0800)]
net/hns3: fix interception with flow director

The rte_fdir_conf structure has deprecated and users need
to use the specified rule parameters of rte_flow structure
when configure a flow rule. As a result, it is incorrectly
used in the rte_flow API.

Fixes: fcba820d9b9e ("net/hns3: support flow director")
Cc: stable@dpdk.org
Signed-off-by: Lijun Ou <oulijun@huawei.com>
3 years agonet/iavf: fix null pointer dereference in eCPRI rule
Simei Su [Thu, 14 Jan 2021 05:23:24 +0000 (13:23 +0800)]
net/iavf: fix null pointer dereference in eCPRI rule

A pointer has already been dereferenced before checking if it is NULL.
It doesn't make any sense, so correct to avoid it.

Coverity issue: 365290
Fixes: f57ebdae3cd0 ("net/iavf: support eCPRI message type 0 for RSS")

Signed-off-by: Simei Su <simei.su@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
3 years agonet/i40e: optimize Tx by using AVX512
Leyi Rong [Thu, 14 Jan 2021 06:39:51 +0000 (14:39 +0800)]
net/i40e: optimize Tx by using AVX512

Optimize Tx path by using AVX512 instructions and vectorize the
tx free bufs process.

Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
3 years agonet/i40e: add AVX512 vector path
Leyi Rong [Thu, 14 Jan 2021 06:39:50 +0000 (14:39 +0800)]
net/i40e: add AVX512 vector path

Add AVX512 support for i40e PMD. This patch adds i40e_rxtx_vec_avx512.c
to support i40e AVX512 vPMD.

This patch aims to enable AVX512 on i40e vPMD. Main changes are focus
on Rx path compared with AVX2 vPMD.

Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
3 years agonet/i40e: remove devarg use-latest-supported-vec
Leyi Rong [Thu, 14 Jan 2021 06:39:49 +0000 (14:39 +0800)]
net/i40e: remove devarg use-latest-supported-vec

As eal parameter --force-max-simd-bitwidth is already introduced,
to make it more clear when setting rx/tx function, remove
devarg use-latest-supported-vec support.

Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
3 years agonet/i40e: fix X722 for 802.1ad frames ability
Weifeng Li [Sun, 10 Jan 2021 08:34:17 +0000 (16:34 +0800)]
net/i40e: fix X722 for 802.1ad frames ability

I40E_DEV_ID_SFP_I_X722 does not support 802.1ad frames ability,
so I40E_HW_FLAG_802_1AD_CAPABLE should not be set.
The patch also correct the comment for I40E_HW_FLAG_802_1AD_CAPABLE
configure.

Fixes: 9efa8d28b4da ("net/i40e: fix SFP X722 with FW4.16")
Cc: stable@dpdk.org
Signed-off-by: Weifeng Li <liweifeng96@126.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
3 years agoapp/crypto-perf: fix spelling in output
Ciara Power [Mon, 18 Jan 2021 11:34:10 +0000 (11:34 +0000)]
app/crypto-perf: fix spelling in output

Fixes some spelling errors in app logs and help text.

Fixes: 7da018731c56 ("app/crypto-perf: add help option")
Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application")
Cc: stable@dpdk.org
Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
3 years agocrypto/dpaa2_sec: support AES-CMAC integrity check
Hemant Agrawal [Thu, 14 Jan 2021 07:05:02 +0000 (12:35 +0530)]
crypto/dpaa2_sec: support AES-CMAC integrity check

This patch adds support for AES_CMAC integrity in non-security mode.
This patch modifies the camm flib to handles the AES CMAC
without conflicting the proto ALG operations. i.e. by creating
another ALG operation routine.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
3 years agocrypto/dpaa_sec: reduce log on queue closure
Hemant Agrawal [Thu, 14 Jan 2021 07:05:01 +0000 (12:35 +0530)]
crypto/dpaa_sec: reduce log on queue closure

If for some reason the queue is not close properly,
specially in test cases.
The QUEUE retire prints are flooding the screen.
They are not really required as WARNING.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
3 years agocommon/dpaax/caamflib: update ZUC-ZUC descriptor sharing
Akhil Goyal [Thu, 14 Jan 2021 07:05:00 +0000 (12:35 +0530)]
common/dpaax/caamflib: update ZUC-ZUC descriptor sharing

The descriptor sharing needed to be changed for ZUC+ZUC as we
were getting invalid CHA combination error due to sharing
being done on DECOs simultaneously.

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
3 years agotest/crypto: add AES-XCBC hash only test case
Hemant Agrawal [Thu, 14 Jan 2021 07:04:59 +0000 (12:34 +0530)]
test/crypto: add AES-XCBC hash only test case

This patch adds test case for AES-XCBC hash only for
Digest and Digest-verify

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
3 years agocrypto/dpaa2_sec: support AES-XCBC-MAC
Akhil Goyal [Thu, 14 Jan 2021 07:04:58 +0000 (12:34 +0530)]
crypto/dpaa2_sec: support AES-XCBC-MAC

This patch add support for AES-XCBC-MAC for following cases
- AES-XCBC-MAC auth only
- AES-CBC/CTR + AES-XCBC-MAC (non-proto)
- AES-CBC/CTR + AES-XCBC-MAC (protocol offload)
- DES-CBC + AES-XCBC-MAC (non-proto)
- 3DES-CBC + AES-XCBC-MAC (non-proto)

Signed-off-by: Barry Cao <barry.cao@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
3 years agocrypto/ccp: enable IOMMU
Amaranath Somalapuram [Fri, 25 Dec 2020 08:03:58 +0000 (13:33 +0530)]
crypto/ccp: enable IOMMU

CCP use vdev framework, and vdev framework don’t support IOMMU.
Adding custom IOMMU support for AMD CCP driver.

Signed-off-by: Amaranath Somalapuram <asomalap@amd.com>
3 years agotest/crypto: add case for enqueue/dequeue callbacks
Abhinandan Gujjar [Tue, 22 Dec 2020 14:42:43 +0000 (20:12 +0530)]
test/crypto: add case for enqueue/dequeue callbacks

This patch adds test cases for testing functionality of
enqueue and dequeue callback mechanism.

Signed-off-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
3 years agocryptodev: add enqueue and dequeue callbacks
Abhinandan Gujjar [Tue, 22 Dec 2020 14:42:42 +0000 (20:12 +0530)]
cryptodev: add enqueue and dequeue callbacks

This patch adds APIs to add/remove callback functions on crypto
enqueue/dequeue burst. The callback function will be called for
each burst of crypto ops received/sent on a given crypto device
queue pair.

Signed-off-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
3 years agocrypto/octeontx2: support AES-CBC SHA256-128-HMAC
Ankur Dwivedi [Sat, 19 Dec 2020 06:54:56 +0000 (12:24 +0530)]
crypto/octeontx2: support AES-CBC SHA256-128-HMAC

Support for aes-cbc sha256-128-hmac is added in lookaside protocol
mode. The functionality is verified using ipsec-secgw application.

Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
3 years agocrypto/octeontx2: support AES-CBC SHA1-HMAC
Ankur Dwivedi [Sat, 19 Dec 2020 06:54:55 +0000 (12:24 +0530)]
crypto/octeontx2: support AES-CBC SHA1-HMAC

Support for aes-cbc sha1-hmac is added in lookaside protocol
mode. The functionality is verified using ipsec-secgw application.

Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
3 years agocrypto/octeontx2: support CN98xx
Tejasree Kondoj [Thu, 31 Dec 2020 17:52:57 +0000 (23:22 +0530)]
crypto/octeontx2: support CN98xx

CN98xx SoC comes up with two CPT blocks wrt
CN96xx, CN93xx, to achieve higher performance.

Adding support to allocate all LFs of VF with even BDF from CPT0
and all LFs of VF with odd BDF from CPT1.
If LFs are not available in one block then they will be allocated
from alternate block.

Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
3 years agocrypto/octeontx2: support IPsec ESN and anti-replay
Tejasree Kondoj [Fri, 18 Dec 2020 14:14:10 +0000 (19:44 +0530)]
crypto/octeontx2: support IPsec ESN and anti-replay

Adding ESN and anti-replay support for lookaside IPsec.

Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
3 years agocrypto/octeontx2: make anti-replay routine generic
Tejasree Kondoj [Fri, 18 Dec 2020 14:14:09 +0000 (19:44 +0530)]
crypto/octeontx2: make anti-replay routine generic

Adding changes to make anti-replay routine common to both inline and
lookaside IPsec.

Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
3 years agocrypto/qat: fix access to uninitialized variable
Vladimir Medvedkin [Tue, 15 Dec 2020 18:23:51 +0000 (18:23 +0000)]
crypto/qat: fix access to uninitialized variable

QAT_LOG() has access to the uninitialized variable "name"

Fixes: 21792c443205 ("crypto/qat: add multi-process handling of driver ID")
Cc: stable@dpdk.org
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
3 years agoregex/mlx5: fix number of supported queues
Ori Kam [Thu, 7 Jan 2021 16:57:11 +0000 (18:57 +0200)]
regex/mlx5: fix number of supported queues

The RegEx engine has no limitation on number of queues.
This commits modifies the max supported queues reported to the application.

Fixes: fbc8c7003b93 ("regex/mlx5: add completion queue creation")
Cc: stable@dpdk.org
Signed-off-by: Ori Kam <orika@nvidia.com>
3 years agoregex/mlx5: support priority match
Ori Kam [Thu, 7 Jan 2021 16:57:10 +0000 (18:57 +0200)]
regex/mlx5: support priority match

The high priority match request flags means that the
RegEx engine should stop on the first match.

This commit add this flag check to the RegEx engine.

Signed-off-by: Ori Kam <orika@nvidia.com>
3 years agoregex/mlx5: fix support for group id
Ori Kam [Thu, 7 Jan 2021 16:57:09 +0000 (18:57 +0200)]
regex/mlx5: fix support for group id

In order to know which groups in the RegEx engine
should be used there is a need to check the req_flags.

This commit adds the missing check.

Fixes: 4d4e245ad637 ("regex/mlx5: support enqueue")
Cc: stable@dpdk.org
Signed-off-by: Ori Kam <orika@nvidia.com>
3 years agoregex/mlx5: support combined rule file
Ori Kam [Thu, 7 Jan 2021 16:57:08 +0000 (18:57 +0200)]
regex/mlx5: support combined rule file

The rof file holds programming instructions for
a given HW version.
In order to support future generation of HW it
was decided that the rof file will hold number
of rule configurations, and the driver will use
the one that matches the HW version.

In current code we force sync after each write block.
This has impact on performance.

The solution is to move the sync to the end of the
entire programming sequence.

Signed-off-by: Ori Kam <orika@nvidia.com>
3 years agoregex/mlx5: fix memory rule alignment
Ori Kam [Thu, 7 Jan 2021 16:57:07 +0000 (18:57 +0200)]
regex/mlx5: fix memory rule alignment

Due to Kernel requirement the memory allocated must be aligned to 2M.

Fixes: b34d816363b5 ("regex/mlx5: support rules import")
Cc: stable@dpdk.org
Signed-off-by: Ori Kam <orika@nvidia.com>
3 years agomaintainers: update for testpmd
Beilei Xing [Wed, 2 Dec 2020 06:33:22 +0000 (14:33 +0800)]
maintainers: update for testpmd

Replace Beilei Xing with Xiaoyun Li.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
3 years agopdump: cleanup logs and variables
Stephen Hemminger [Tue, 29 Dec 2020 20:09:01 +0000 (12:09 -0800)]
pdump: cleanup logs and variables

Checkpatch prefers 'unsigned int' over bare 'unsigned'.
Reword the error messages for brevity and clarity
so they don't have to be split across multiple lines.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agopdump: replace constant for device name size
Stephen Hemminger [Tue, 29 Dec 2020 20:09:00 +0000 (12:09 -0800)]
pdump: replace constant for device name size

The device string has an existing size in rte_dev.h
use that instead of defining our own.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agopdump: free mbuf in bulk
Stephen Hemminger [Tue, 29 Dec 2020 20:08:59 +0000 (12:08 -0800)]
pdump: free mbuf in bulk

Use rte_pktmbuf_free_bulk instead of loop when freeing
packets.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
3 years agodoc: recommend GitHub Actions for CI
David Marchand [Wed, 13 Jan 2021 09:03:12 +0000 (10:03 +0100)]
doc: recommend GitHub Actions for CI

Update the contributing guidelines to describe GitHub Actions first and
add a warning about Travis usage.

Fixes: 87009585e293 ("ci: hook to GitHub Actions")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
3 years agoexamples/l3fwd: remove limitation on Tx queue count
Harman Kalra [Tue, 12 Jan 2021 18:24:46 +0000 (23:54 +0530)]
examples/l3fwd: remove limitation on Tx queue count

In l3fwd no of transmit queues is calculated based on no of
lcores with which it is launched. Hence maximum no of tx
queues possible per port should depend on RTE_MAX_LCORE value.

Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Harman Kalra <hkalra@marvell.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
3 years agofbarray: fix overlap check
Anatoly Burakov [Thu, 14 Jan 2021 15:02:45 +0000 (15:02 +0000)]
fbarray: fix overlap check

When we're attaching fbarrays in secondary processes, we check for
whether the intended memory address for the fbarray is already in use by
some other, local fbarray. However, the check for end-overlap (i.e. to
see if our memory area's end overlaps with some other fbarray) is
incorrectly counting end offset as part of the overlap. Fix the check.

Fixes: 5b61c62cfd76 ("fbarray: add internal tailq for mapped areas")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Tested-by: Zhihong Peng <zhihongx.peng@intel.com>
3 years agoeal/linux: improve no hugepages logging
Anatoly Burakov [Tue, 10 Nov 2020 15:41:36 +0000 (15:41 +0000)]
eal/linux: improve no hugepages logging

When no hugepages are found, we log a message about it, but we never
specify on which node. We also implicitly declare the page size based
on the directory name, but that's not very user friendly.

Fix both by changing the text of the message to note the NUMA node (if
applicable) and explicitly mention page size in kilobytes.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
3 years agotest: add ticketlock to fast tests
Stephen Hemminger [Thu, 14 Jan 2021 16:58:55 +0000 (08:58 -0800)]
test: add ticketlock to fast tests

The ticketlock test is fast and should be run all the time.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Aaron Conole <aconole@redhat.com>
3 years agotest: fix buffer overflow in Tx burst
Alvin Zhang [Wed, 25 Nov 2020 09:46:22 +0000 (17:46 +0800)]
test: fix buffer overflow in Tx burst

The Tx buffer may overflow when there is more than one port.

Fixes: 002ade70e933 ("app/test: measure cycles per packet in Rx/Tx")
Cc: stable@dpdk.org
Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
Tested-by: Wei Ling <weix.ling@intel.com>
3 years agonet/ice: implement power management API
Liang Ma [Thu, 14 Jan 2021 14:46:12 +0000 (14:46 +0000)]
net/ice: implement power management API

Implement support for the power management API by implementing a
`get_monitor_addr` function that will return an address of an RX ring's
status bit.

Signed-off-by: Liang Ma <liang.j.ma@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
3 years agonet/i40e: implement power management API
Liang Ma [Thu, 14 Jan 2021 14:46:11 +0000 (14:46 +0000)]
net/i40e: implement power management API

Implement support for the power management API by implementing a
`get_monitor_addr` function that will return an address of an RX ring's
status bit.

Signed-off-by: Liang Ma <liang.j.ma@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
3 years agonet/ixgbe: implement power management API
Liang Ma [Thu, 14 Jan 2021 14:46:10 +0000 (14:46 +0000)]
net/ixgbe: implement power management API

Implement support for the power management API by implementing a
`get_monitor_addr` function that will return an address of an RX ring's
status bit.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Signed-off-by: Liang Ma <liang.j.ma@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
3 years agoethdev: add simple power management API
Liang Ma [Thu, 14 Jan 2021 14:46:08 +0000 (14:46 +0000)]
ethdev: add simple power management API

Add a simple API to allow getting the monitor conditions for
power-optimized monitoring of the Rx queues from the PMD, as well as
release notes information.

Signed-off-by: Liang Ma <liang.j.ma@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
3 years agoeal: add monitor wakeup function
Anatoly Burakov [Thu, 14 Jan 2021 14:46:07 +0000 (14:46 +0000)]
eal: add monitor wakeup function

Now that we have everything in a C file, we can store the information
about our sleep, and have a native mechanism to wake up the sleeping
core. This mechanism would however only wake up a core that's sleeping
while monitoring - waking up from `rte_power_pause` won't work.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
3 years agoeal: remove sync version of power monitor
Anatoly Burakov [Thu, 14 Jan 2021 14:46:06 +0000 (14:46 +0000)]
eal: remove sync version of power monitor

Currently, the "sync" version of power monitor intrinsic is supposed to
be used for purposes of waking up a sleeping core. However, there are
better ways to achieve the same result, so remove the unneeded function.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
3 years agoeal: change power intrinsics API
Anatoly Burakov [Thu, 14 Jan 2021 14:46:05 +0000 (14:46 +0000)]
eal: change power intrinsics API

Instead of passing around pointers and integers, collect everything
into struct. This makes API design around these intrinsics much easier.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
3 years agoeal: avoid invalid power intrinsics API usage
Anatoly Burakov [Thu, 14 Jan 2021 14:46:04 +0000 (14:46 +0000)]
eal: avoid invalid power intrinsics API usage

Currently, the API documentation mandates that if the user wants to use
the power management intrinsics, they need to call the
`rte_cpu_get_intrinsics_support` API and check support for specific
intrinsics.

However, if the user does not do that, it is possible to get illegal
instruction error because we're using raw instruction opcodes, which may
or may not be supported at runtime.

Now that we have everything in a C file, we can check for support at
startup and prevent the user from possibly encountering illegal
instruction errors.

We also add return values to the API's as well, because why not.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
3 years agoeal: uninline power intrinsics
Anatoly Burakov [Thu, 14 Jan 2021 14:46:03 +0000 (14:46 +0000)]
eal: uninline power intrinsics

Currently, power intrinsics are inline functions. Make them part of the
ABI so that we can have various internal data associated with them
without exposing said data to the outside world.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
3 years agoconfig/arm: disable libnuma in cross builds
Juraj Linkeš [Fri, 15 Jan 2021 13:26:08 +0000 (14:26 +0100)]
config/arm: disable libnuma in cross builds

Some Arm SoCs are not NUMA systems. Add the capability to disable NUMA
for cross build and disable NUMA in Arm cross files.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Tested-by: Jerin Jacob <jerinj@marvell.com>
Tested-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Tested-by: Vimal Chungath <vcchunga@amazon.com>
Tested-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
3 years agoconfig/arm: add core and NUMA counts to cross files
Juraj Linkeš [Fri, 15 Jan 2021 13:26:06 +0000 (14:26 +0100)]
config/arm: add core and NUMA counts to cross files

Add support for setting core count and numa nodes in cross files. The
values specified in cross files will override the default values.
Also add missing default values to Arm config.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Tested-by: Jerin Jacob <jerinj@marvell.com>
Tested-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Tested-by: Vimal Chungath <vcchunga@amazon.com>
Tested-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
3 years agoconfig/arm: use native machine build arguments
Juraj Linkeš [Fri, 15 Jan 2021 13:26:05 +0000 (14:26 +0100)]
config/arm: use native machine build arguments

Letting the compiler decide is going to yield the best results for
native builds, so use native machine args usable for both GCC and Clang.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Tested-by: Jerin Jacob <jerinj@marvell.com>
Tested-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Tested-by: Vimal Chungath <vcchunga@amazon.com>
Tested-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
3 years agoconfig/arm: isolate generic build
Juraj Linkeš [Fri, 15 Jan 2021 13:26:04 +0000 (14:26 +0100)]
config/arm: isolate generic build

Use generic configuration for the only build where it makes sense - the
generic build. For other builds, if we don't know either of implementer
ID or part number, the build is not supported.
Add part numbers to cross files where fallback to generic configuration
is assumed.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Tested-by: Jerin Jacob <jerinj@marvell.com>
Tested-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Tested-by: Vimal Chungath <vcchunga@amazon.com>
Tested-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
3 years agoconfig/arm: organize config into dict
Juraj Linkeš [Fri, 15 Jan 2021 13:26:03 +0000 (14:26 +0100)]
config/arm: organize config into dict

Use dictionary lookup instead of checking for existing variables,
iterating over all elements in the list or checking lists for optional
configuration. Move variable contents into the dictionary for variables
that would be referenced only once.
Fallback to generic part number if the discovered part number is
unknown.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Tested-by: Jerin Jacob <jerinj@marvell.com>
Tested-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Tested-by: Vimal Chungath <vcchunga@amazon.com>
Tested-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
3 years agoconfig/arm: simplify how flags are processed
Juraj Linkeš [Fri, 15 Jan 2021 13:26:02 +0000 (14:26 +0100)]
config/arm: simplify how flags are processed

Set flags in one loop. Append flags to a list and use the list in the
loop.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Tested-by: Jerin Jacob <jerinj@marvell.com>
Tested-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Tested-by: Vimal Chungath <vcchunga@amazon.com>
Tested-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
3 years agoconfig/arm: reformat and move config and comments
Juraj Linkeš [Fri, 15 Jan 2021 13:26:01 +0000 (14:26 +0100)]
config/arm: reformat and move config and comments

Change formatting so that it's more consistent and readable, add/modify
comments/stdout messages, move configuration options to more appropriate
places and make the order consistent according to these rules:
1. First list generic configuration options, then list options that may
   be overwritten. List SoC-specific options last.
2. For SoC-specific options, list number of cores before the number of
   NUMA nodes, to make it consistent with config/meson.build.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Tested-by: Jerin Jacob <jerinj@marvell.com>
Tested-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Tested-by: Vimal Chungath <vcchunga@amazon.com>
Tested-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
3 years agoconfig/arm: remove unused or superfluous variables
Juraj Linkeš [Fri, 15 Jan 2021 13:26:00 +0000 (14:26 +0100)]
config/arm: remove unused or superfluous variables

Remove variables that were either not used, referenced just once or not
needed.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Tested-by: Jerin Jacob <jerinj@marvell.com>
Tested-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Tested-by: Vimal Chungath <vcchunga@amazon.com>
Tested-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
3 years agoconfig/arm: rename variables
Juraj Linkeš [Fri, 15 Jan 2021 13:25:59 +0000 (14:25 +0100)]
config/arm: rename variables

Rename Arm build variables and values so that they better conform to Arm
specifications. Also rename generically sounding variable to names that
better capture what the variables hold.

Rename machine_args_generic to part_number_config_arm since the
variable contains more than just the generic machine args and is used
mainly as the fallback arm configuration.
Rename the default machine args to generic machine args to reflect that.
The rest of the variables are self-explanatory.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Tested-by: Jerin Jacob <jerinj@marvell.com>
Tested-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Tested-by: Vimal Chungath <vcchunga@amazon.com>
Tested-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
3 years agocfgfile: build on Windows
Narcisa Vasile [Tue, 5 Jan 2021 02:35:22 +0000 (18:35 -0800)]
cfgfile: build on Windows

The librte_cfgfile lib is functional on Windows.
Enable compilation of this lib for Windows.

Signed-off-by: Narcisa Vasile <navasile@linux.microsoft.com>
3 years agoraw/ioat: support secondary process
Kumar Amber [Fri, 8 Jan 2021 16:52:16 +0000 (22:22 +0530)]
raw/ioat: support secondary process

Add support for secondary processes in ioat devices. The update
allocates a memzone for a primary process or returns it in a
secondary process.

Signed-off-by: Kumar Amber <kumar.amber@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
3 years agobitmap: support 128-byte cacheline in empty check
Nithin Dabilpuram [Tue, 5 Jan 2021 08:57:29 +0000 (14:27 +0530)]
bitmap: support 128-byte cacheline in empty check

Currently bitmap line not empty check API assumes cache line
of 64B and only checks 8 slabs. Since in 128B cacheline, we
have 16 slabs per cacheline, rte_bitmap_clear() will mark
complete line as empty as soon as 8 slabs are empty thereby
breaking bitmap scan functionality. Fix it by defining new
__rte_bitmap_line_not_empty() for 128B cacheline platform.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
3 years agotest/bitmap: test scan after half cacheline is cleared
Nithin Dabilpuram [Tue, 5 Jan 2021 08:57:28 +0000 (14:27 +0530)]
test/bitmap: test scan after half cacheline is cleared

Add a test case to test scan operation post clear of half
cacheline of slabs.

Also fix meson.build to include test_bitmap.c in the compilation.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
3 years agonet/netvsc: support VF device hot add/remove
Long Li [Mon, 21 Dec 2020 21:33:22 +0000 (13:33 -0800)]
net/netvsc: support VF device hot add/remove

When a VF device is present, netvsc can send or receive packets over the
VF device. The VF device driver communicates directly with the PCI device
via the PF from the host hypervisor. This is faster than exchanging data
with netvsp via vmbus, i.e. syntheic path.

In Azure and Hyper-v environments, VF device can be hot added or hot
removed at anytime while guest VM is running. This patch improves netvsc
to support VF device hot add/remove.

1. netvsc monitors all system hot add activities over the PCI bus. When it
detects a VF device is added to the system and is managed under this
netvsc device, it asks EAL to probe and start this VF device, then it
attaches and switches data path to the VF device.

2. After a VF device is attached to netvsc, netvsc monitors this device on
hot remove. When this VF device is hot removed, netvsc switches data path
to synthetic, stops this VF device and removes it from EAL.

3. If any failure happens during a VF device hot remove or add, the netvsc
falls back to synthetic path for all data traffic.

Signed-off-by: Long Li <longli@microsoft.com>
3 years agoeal/linux: allow multiple starts of event monitor
Long Li [Mon, 21 Dec 2020 21:32:36 +0000 (13:32 -0800)]
eal/linux: allow multiple starts of event monitor

In some cases, a device or infrastructure may want to enable hotplug
but application may also try and start hotplug as well. Therefore
change the monitor_started from a boolean into a reference count.

Signed-off-by: Long Li <longli@microsoft.com>
3 years agotest: fix terminal settings on exit
Stephen Hemminger [Thu, 14 Jan 2021 16:45:37 +0000 (08:45 -0800)]
test: fix terminal settings on exit

When running one test (via DPDK_TEST) the test program
would leave the terminal in raw mode.  This was because
it was setting up cmdline to do interactive input.

The fix is to use cmdline_new() for the interactive case.

This also fixes a memory leak because the test
runner was never calling cmdline_free().

Fixes: 9b848774a5dc ("test: use env variable to run tests")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Tested-by: Harry van Haaren <harry.van.haaren@intel.com>
3 years agotest/rwlock: fix spelling and missing whitespace
Stephen Hemminger [Thu, 14 Jan 2021 16:48:37 +0000 (08:48 -0800)]
test/rwlock: fix spelling and missing whitespace

Trivial fix to for spelling errors and incorrect spacing.
No change to any built code.

Fixes: 7a61fc5d1b09 ("test/rwlock: add new test-cases")
Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agoeal/windows: fix C++ compatibility
Tyler Retzlaff [Fri, 15 Jan 2021 19:38:21 +0000 (11:38 -0800)]
eal/windows: fix C++ compatibility

Explicitly cast void * to type * so that EAL headers may be compiled
as C or C++.

Fixes: e8428a9d89f1 ("eal/windows: add some basic functions and macros")
Cc: stable@dpdk.org
Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
3 years agomaintainers: update for hns3
Lijun Ou [Sat, 16 Jan 2021 09:02:09 +0000 (17:02 +0800)]
maintainers: update for hns3

Because Wei Hu has changed to a new job and the
email address (xavier.huwei@huawei.com) has expired,
we remove him from the hns3 maintainer list.

All patches signed-off-by Wei Hu will be copied to Lijun Ou.

Signed-off-by: Lijun Ou <oulijun@huawei.com>
3 years agodevtools: reduce ABI checks and static binaries
Thomas Monjalon [Wed, 2 Dec 2020 16:47:03 +0000 (17:47 +0100)]
devtools: reduce ABI checks and static binaries

When testing compilation and checking ABI compatibility,
there is no real need of static binaries eating disks.

The static linkage of applications was already well tested,
though the static examples tested with meson were limited to "l3fwd" only.
The static build test with make is limited to "helloworld" example.

The ABI compatibility is checked on shared libraries,
and there is no need to test again on similar builds.
A new parameter is added to the function "build",
so the ABI check is enabled only for native gcc and clang shared builds,
32-bit, generic armv8 and ppc cross compilations.
In other words, it is disabled for some static builds and some Arm ones.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>