dpdk.git
5 years agoethdev: fix expand RSS flows
Xiaoyu Min [Tue, 5 Nov 2019 13:42:43 +0000 (15:42 +0200)]
ethdev: fix expand RSS flows

rte_flow_expand_rss expands rte_flow item list based on the RSS
types. In another word, some additional rules are added if the user
specified items are not complete enough according to the RSS type,
for example:

  ... pattern eth / end actions rss type tcp end ...

User only provides item eth but want to do RSS on tcp traffic.
The pattern is not complete enough to filter TCP traffic only.
This will be a problem for some HWs.
So some PMDs use rte_flow_expand_rss to expand above user provided
flow to:

  ... pattern eth / end actions rss types tcp
  ... pattern eth / ipv4 / tcp / end actions rss types tcp ...
  ... pattern eth / ipv6 / tcp / end actions rss types tcp ...

in order to filter TCP traffic only and do RSS correctly.

However the current expansion cannot handle pattern as below, which
provides ethertype or ip next proto instead of providing an item:

  ... pattern eth type is 0x86DD / end actions rss types tcp ...

rte_flow_expand_rss will expand above flow to:

  ... pattern eth type is 0x86DD / ipv4 / tcp end ...

which has conflicting values: 0x86DD vs. ipv4 and some HWs will refuse
to create flow.

This patch will fix above by checking the last item's spec and to
expand RSS flows correctly.

Currently only support to complete item list based on ether type or ip
next proto.

Fixes: 4ed05fcd441b ("ethdev: add flow API to expand RSS flows")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
5 years agonet/sfc: add SPDX tag in meson file
Hemant Agrawal [Fri, 27 Sep 2019 09:04:29 +0000 (14:34 +0530)]
net/sfc: add SPDX tag in meson file

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
5 years agonet/mlx5: add missing packet type for GENEVE
Wisam Jaddo [Wed, 6 Nov 2019 09:38:55 +0000 (09:38 +0000)]
net/mlx5: add missing packet type for GENEVE

HW ptype are missing TUNNEL_GENEVE support

Fixes: e59a5dbcfd07 ("net/mlx5: add flow match on GENEVE item")

Signed-off-by: Wisam Jaddo <wisamm@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: allow pattern start from IP
Xiaoyu Min [Tue, 5 Nov 2019 08:03:09 +0000 (10:03 +0200)]
net/mlx5: allow pattern start from IP

Some applications, i.e. OVS, have rule like:

[1] pattern ipv4 / end actions ...

which intends to match ipv4 only on non-vlan ethernet and MLX5 NIC
supports this.

So PMD should accept this.

Fixes: 906a2efae8da ("net/mlx5: validate flow rule item order")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: improve flow item IP validation
Xiaoyu Min [Tue, 5 Nov 2019 07:51:27 +0000 (09:51 +0200)]
net/mlx5: improve flow item IP validation

Currently PMD doesn't check whether the user specified ethernet type is
conflicting with the followed IPv4/IPv6 items, which leads to HW refuse
to create rule, for example:

  ... pattern eth type is 0x86dd / ipv4 / end ...

ethernet type is IPv6 but IPv4 is following, this should be validated
as failure and report corresponding error in detail.

Fixes: 23c1d42c7138 ("net/mlx5: split flow validation to dedicated function")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
5 years agonet/mlx5: add ConnectX6-DX device ID
Raslan Darawsheh [Thu, 7 Nov 2019 09:36:09 +0000 (09:36 +0000)]
net/mlx5: add ConnectX6-DX device ID

This adds new device id to the list of Mellanox devices
that runs mlx5 PMD.
- ConnectX-6DX device ID
- ConnectX-6DX SRIOV device ID

Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/ice: fix flow director tunnel profile existence check
Yahui Cao [Tue, 5 Nov 2019 13:37:21 +0000 (21:37 +0800)]
net/ice: fix flow director tunnel profile existence check

If first rule is issued and then the second rule is issued with the same
input set as first rule's, FDIR driver can't find there is an identical
input set.

Fixes: 109e8e06249e ("net/ice: configure HW flow director rule")

Signed-off-by: Yahui Cao <yahui.cao@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
5 years agonet/ice/base: add new device IDs
Qi Zhang [Fri, 1 Nov 2019 01:44:06 +0000 (09:44 +0800)]
net/ice/base: add new device IDs

Add device IDs for E810_XXV.

Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
5 years agonet/octeontx2: support SDP interface
Subrahmanyam Nilla [Wed, 6 Nov 2019 09:27:34 +0000 (14:57 +0530)]
net/octeontx2: support SDP interface

System DPI Packet Interface Unit (SDP) is a co-processor
of OCTEON TX2 which provides PCIe endpoint support for a
remote host to DMA packets into and out of the OCTEON TX2 SoC.
SDP interface comes in to live only when it is connected in
EP mode. It exposes input and output queue pairs to remote host
for instruction input and packet output. It can be used as
a communication channel between remote host and OCTEON TX2.
Host machine needs to use corresponding user/kernel mode
driver to communicate with SDP interface on OCTEON TX2 SoC.

SDP interface support is limited to SDP PF device now.
No SDP VF support.

Signed-off-by: Subrahmanyam Nilla <snilla@marvell.com>
Signed-off-by: Venkateshwarlu Nalla <venkatn@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
5 years agovhost: fix batch enqueue only handle few packets
Marvin Liu [Thu, 7 Nov 2019 14:37:48 +0000 (22:37 +0800)]
vhost: fix batch enqueue only handle few packets

After enqueue function finished, packet index has been increased. Batch
enqueue function should retrieve mbuf structure pointed by that index.

Fixes: 0294211bb6dc ("vhost: optimize packed ring enqueue")

Signed-off-by: Marvin Liu <yong.liu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
5 years agovhost: fix dirty page logging missing
Marvin Liu [Mon, 4 Nov 2019 11:15:47 +0000 (19:15 +0800)]
vhost: fix dirty page logging missing

Packets data are directly copied when doing batch enqueue, add missed
dirty page logging after memory copy.

Fixes: ef861692c398 ("vhost: add packed ring batch enqueue")

Signed-off-by: Marvin Liu <yong.liu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
5 years agonet/virtio-user: fix setting filters
Marvin Liu [Wed, 6 Nov 2019 09:02:50 +0000 (17:02 +0800)]
net/virtio-user: fix setting filters

As doc mentioned, Rx/Mac/vlan filters are all supported by best effort.
These control commands should return success.

Fixes: f9b9d1a55775 ("net/virtio-user: add multiple queues in device emulation")
Cc: stable@dpdk.org
Signed-off-by: Marvin Liu <yong.liu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
5 years agovhost: fix virtqueue not accessible
Marvin Liu [Mon, 4 Nov 2019 10:13:22 +0000 (18:13 +0800)]
vhost: fix virtqueue not accessible

Log feature is disabled in vhost user, so that log address was invalid
when checking. Check whether log address is valid can work around it.
Log address should also be translated in packed ring virtqueue.

Fixes: fbda9f145927 ("vhost: translate incoming log address to GPA")
Cc: stable@dpdk.org
Signed-off-by: Marvin Liu <yong.liu@intel.com>
Reviewed-by: Adrian Moreno <amorenoz@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
5 years agovhost: fix build dependency on hash lib
Jin Yu [Wed, 30 Oct 2019 09:40:55 +0000 (17:40 +0800)]
vhost: fix build dependency on hash lib

Compile librte_vhost/vhost_crypto.c needs the rte_hash.h
So we need the librte_hash to be compiled before vhost.
Add the DEPDIRs to make sure this.

Bugzilla ID: 356
Fixes: 939066d96563 ("vhost/crypto: add public function implementation")
Cc: stable@dpdk.org
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
5 years agovhost: do not limit packed ring size
Marvin Liu [Wed, 30 Oct 2019 09:24:21 +0000 (17:24 +0800)]
vhost: do not limit packed ring size

Virtio spec only set rule that packed ring maximum size is up to 2^15
entries. Should not limit packed ring size to power of two.

Fixes: 708e14d8b9ac ("vhost: advertize packed ring layout support")
Cc: stable@dpdk.org
Signed-off-by: Marvin Liu <yong.liu@intel.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
5 years agonet/virtio: do not limit packed ring size
Marvin Liu [Wed, 30 Oct 2019 09:24:20 +0000 (17:24 +0800)]
net/virtio: do not limit packed ring size

Virtio spec only set rule that packed ring maximum size is up to 2^15
entries. Should not limit packed ring size to power of two.

Fixes: aea29aa5d37b ("net/virtio: enable packed virtqueues by default")
Cc: stable@dpdk.org
Signed-off-by: Marvin Liu <yong.liu@intel.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
5 years agodoc: remove unsupported feature from hinic
Xiaoyun Wang [Fri, 1 Nov 2019 13:36:46 +0000 (21:36 +0800)]
doc: remove unsupported feature from hinic

This patch removes feature "Free Tx mbuf" on demand from hinic.ini
because pmd driver does not support this feature.

Fixes: 1d09792a270a ("net/hinic: add build and doc files")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
5 years agodoc: remove flow director feature from hinic
Xiaoyun Wang [Fri, 1 Nov 2019 13:36:45 +0000 (21:36 +0800)]
doc: remove flow director feature from hinic

This patch removes deprecated feature Flow Director from hinic.ini,
hinic.rst and release_19_11.rst, because the feature has been
removed from the feature list in the following commit:
Commit 030febb6642c ("doc: remove deprecated ethdev features"), and
adds Flow API feature which is for generic filtering to doc files.

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
5 years agonet/hinic: optimize mbuf allocation
Xiaoyun Wang [Fri, 1 Nov 2019 13:36:44 +0000 (21:36 +0800)]
net/hinic: optimize mbuf allocation

When port start, driver needs to alloc mbuf resource to fill Rx
queue bd section, replace rte_mbuf_raw_alloc function to
rte_pktmbuf_alloc_bulk with initialized mbuf structure to avoid
some structures being used without initialization.

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
5 years agonet/hinic: fix offload info calculating for TSO
Xiaoyun Wang [Fri, 1 Nov 2019 13:36:43 +0000 (21:36 +0800)]
net/hinic: fix offload info calculating for TSO

For VXLAN TSO offload, PMD calculates offload info
err due to the wrong branch, which can cause hardware failed.

Fixes: c3ba1f0f20cd ("net/hinic: support inner L3 checksum offload")

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
5 years agonet/hinic/base: fix code style
Xiaoyun Wang [Fri, 1 Nov 2019 13:36:42 +0000 (21:36 +0800)]
net/hinic/base: fix code style

This patch fixs the code style check issue for MACRO_ARG_REUSE.

Fixes: b8582d051af1 ("net/hinic/base: add HW interfaces for SR-IOV")

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
5 years agonet: fix IPv4 IHL and VHL define
Flavia Musatescu [Wed, 6 Nov 2019 14:49:41 +0000 (14:49 +0000)]
net: fix IPv4 IHL and VHL define

Fix the RTE_IPV4_VHL_DEF macro that represents the value
for the IPv4 VHL and Minimum IHL header fields according to
rfc791.

Fixes: 2318d8d54565 ("net: define IPv4 IHL and VHL")
Cc: stable@dpdk.org
Reported-by: David Harton <dharton@cisco.com>
Signed-off-by: Flavia Musatescu <flavia.musatescu@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agoapp/testpmd: fix IP next proto in set raw decap/encap
Xiaoyu Min [Thu, 31 Oct 2019 10:11:02 +0000 (12:11 +0200)]
app/testpmd: fix IP next proto in set raw decap/encap

The IP's next protocol will be specified by user when set IP-in-IP
tunnel header via set raw decap/encap commands.

Currently this field is wrongly set to zero if there is no upper layer.
This leads to the encapsulated IP-in-IP tunnel header is not correct.

This next protocol field should be leave it as-is if there is no upper
layer or value is already set.

Fixes: 30626def03d6 ("app/testpmd: support raw encap/decap actions")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/enic: suppress unwanted error messages
Hyong Youb Kim [Thu, 31 Oct 2019 05:36:23 +0000 (22:36 -0700)]
net/enic: suppress unwanted error messages

Do not log errors when CMD_OVERLAY_OFFLOAD_CTRL and
CMD_GET_SUPP_FEATURE_VER fail, as they are only used to probe if a
feature is provisioned. They are expected to fail if the feature is
not provisioned.

Do not log an error when disabling Geneve offload fails. It is
expected to fail if this feature is provisioned but not enabled.

Fixes: c02a96fc4aec ("net/enic: enable GENEVE with options offload")

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
5 years agonet/enic: fix speed capabilities for new VF
Hyong Youb Kim [Thu, 31 Oct 2019 05:36:22 +0000 (22:36 -0700)]
net/enic: fix speed capabilities for new VF

VFs all have subsystem ID 0. VIC models with the latest VF are at
least 40G, so report that as a more reasonable speed than 10G.

Fixes: 57bb45b37bdf ("net/enic: add PCI id for new virtual function")

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
5 years agonet/enic: fix whitespaces in log macros
Hyong Youb Kim [Thu, 31 Oct 2019 05:36:21 +0000 (22:36 -0700)]
net/enic: fix whitespaces in log macros

Add a space between the function name and message.

Fixes: bbd8ecc05434 ("net/enic: remove PMD log type references")
Cc: stable@dpdk.org
Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
5 years agoapp/testpmd: support checking descriptor status
Kiran Kumar K [Tue, 29 Oct 2019 11:34:09 +0000 (17:04 +0530)]
app/testpmd: support checking descriptor status

Adding support to check TX and RX descriptor status.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agoethdev: move egress metadata to dynamic field
Viacheslav Ovsiienko [Tue, 5 Nov 2019 14:19:31 +0000 (14:19 +0000)]
ethdev: move egress metadata to dynamic field

The dynamic mbuf fields were introduced by [1]. The egress metadata is
good candidate to be moved from statically allocated field tx_metadata to
dynamic one. Because mbufs are used in half-duplex fashion only, it is
safe to share this dynamic field with ingress metadata.

The shared dynamic field contains either egress (if application going to
transmit mbuf with tx_burst) or ingress (if mbuf is received with rx_burst)
metadata and can be accessed by RTE_FLOW_DYNF_METADATA() macro or with
rte_flow_dynf_metadata_set() and rte_flow_dynf_metadata_get() helper
routines. PKT_TX_DYNF_METADATA/PKT_RX_DYNF_METADATA flag will be set
along with the data.

The mbuf dynamic field must be registered by calling
rte_flow_dynf_metadata_register() prior accessing the data.

The availability of dynamic mbuf metadata field can be checked with
rte_flow_dynf_metadata_avail() routine.

DEV_TX_OFFLOAD_MATCH_METADATA offload and configuration flag is removed.
The metadata support in PMDs is engaged on dynamic field registration.

Metadata feature is getting complex. We might have some set of actions
and items that might be supported by PMDs in multiple combinations,
the supported values and masks are the subjects to query by perfroming
trials (with rte_flow_validate).

[1] http://patches.dpdk.org/patch/62040/

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Ori Kam <orika@mellanox.com>
5 years agoethdev: extend flow metadata
Viacheslav Ovsiienko [Tue, 5 Nov 2019 14:19:30 +0000 (14:19 +0000)]
ethdev: extend flow metadata

Currently, metadata can be set on egress path via mbuf tx_metadata field
with PKT_TX_METADATA flag and RTE_FLOW_ITEM_TYPE_META matches metadata.

This patch extends the metadata feature usability.

1) RTE_FLOW_ACTION_TYPE_SET_META

When supporting multiple tables, Tx metadata can also be set by a rule and
matched by another rule. This new action allows metadata to be set as a
result of flow match.

2) Metadata on ingress

There's also need to support metadata on ingress. Metadata can be set by
SET_META action and matched by META item like Tx. The final value set by
the action will be delivered to application via metadata dynamic field of
mbuf which can be accessed by RTE_FLOW_DYNF_METADATA() macro or with
rte_flow_dynf_metadata_set() and rte_flow_dynf_metadata_get() helper
routines. PKT_RX_DYNF_METADATA flag will be set along with the data.

The mbuf dynamic field must be registered by calling
rte_flow_dynf_metadata_register() prior to use SET_META action.

The availability of dynamic mbuf metadata field can be checked
with rte_flow_dynf_metadata_avail() routine.

If application is going to engage the metadata feature it registers
the metadata  dynamic fields, then PMD checks the metadata field
availability and handles the appropriate fields in datapath.

For loopback/hairpin packet, metadata set on Rx/Tx may or may not be
propagated to the other path depending on hardware capability.

MARK and METADATA look similar and might operate in similar way,
but not interacting.

Initially, there were proposed two metadata related actions:

- RTE_FLOW_ACTION_TYPE_FLAG
- RTE_FLOW_ACTION_TYPE_MARK

These actions set the special flag in the packet metadata, MARK action
stores some specified value in the metadata storage, and, on the packet
receiving PMD puts the flag and value to the mbuf and applications can
see the packet was threated inside flow engine according to the appropriate
RTE flow(s). MARK and FLAG are like some kind of gateway to transfer some
per-packet information from the flow engine to the application via
receiving datapath. Also, there is the item of type RTE_FLOW_ITEM_TYPE_MARK
provided. It allows us to extend the flow match pattern with the capability
to match the metadata values set by MARK/FLAG actions on other flows.

From the datapath point of view, the MARK and FLAG are related to the
receiving side only. It would useful to have the same gateway on the
transmitting side and there was the feature of type RTE_FLOW_ITEM_TYPE_META
was proposed. The application can fill the field in mbuf and this value
will be transferred to some field in the packet metadata inside the flow
engine. It did not matter whether these metadata fields are shared because
of MARK and META items belonged to different domains (receiving and
transmitting) and could be vendor-specific.

So far, so good, DPDK proposes some entities to control metadata inside
the flow engine and gateways to exchange these values on a per-packet basis
via datapaths.

As we can see, the MARK and META means are not symmetric, there is absent
action which would allow us to set META value on the transmitting path.
So, the action of type:

- RTE_FLOW_ACTION_TYPE_SET_META was proposed.

The next, applications raise the new requirements for packet metadata.
The flow ngines are getting more complex, internal switches are introduced,
multiple ports might be supported within the same flow engine namespace.
From the DPDK points of view, it means the packets might be sent on one
eth_dev port and received on the other one, and the packet path inside
the flow engine entirely belongs to the same hardware device. The simplest
example is SR-IOV with PF, VFs and the representors. And there is a
brilliant opportunity to provide some out-of-band channel to transfer
some extra data from one port to another one, besides the packet data
itself. And applications would like to use this opportunity.

It is supposed for application to use trials (with rte_flow_validate)
to detect which metadata features (FLAG, MARK, META) actually supported
by PMD and underlying hardware. It might depend on PMD configuration,
system software, hardware settings, etc., and should be detected
in run time.

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Ori Kam <orika@mellanox.com>
5 years agoethdev: enhance burst mode information API
Haiyue Wang [Wed, 6 Nov 2019 01:30:05 +0000 (09:30 +0800)]
ethdev: enhance burst mode information API

Change the type of burst mode information from bit field to free string
data, so that each PMD can describe the Rx/Tx busrt functions flexibly.

Fixes: eb5902504a13 ("ethdev: add API for getting burst mode information")
Fixes: 6b6609f68ccd ("net/i40e: support Rx/Tx burst mode info")
Fixes: e9a10e6c2102 ("net/ice: support Rx/Tx burst mode info")
Fixes: 7fe108edcf53 ("app/testpmd: show Rx/Tx burst mode description")

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Ray Kinsella <ray.kinsella@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agodoc: replace license text with SPDX tag for nfp
Hemant Agrawal [Fri, 27 Sep 2019 09:04:33 +0000 (14:34 +0530)]
doc: replace license text with SPDX tag for nfp

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Alejandro Lucero <alejandro.lucero@netronome.com>
5 years agonet/octeontx2: fix 32-bit build
Pavan Nikhilesh [Wed, 30 Oct 2019 18:31:42 +0000 (00:01 +0530)]
net/octeontx2: fix 32-bit build

x86_x32 compilation failing due to incorrect format specifiers in logs.

Fixes: a78b9246723b ("net/octeontx2: add remaining PTP operations")
Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
5 years agonet/bnxt: fix Rx queue start/stop for Thor based NICs
Lance Richardson [Mon, 4 Nov 2019 20:27:47 +0000 (15:27 -0500)]
net/bnxt: fix Rx queue start/stop for Thor based NICs

Controller-specific handling is required for Thor-based NICs when
stopping or starting a receive queue, otherwise packet reception
may not be reliably resumed when a stopped receive queue is
restarted:
  - The VNIC default receive ring needs to be recomputed when a
    receive queue is stopped or started.
  - When stopping the last (or only) receive queue for a given
    VNIC, ensure that no packets can reach the default receive
    ring by temporarily setting the VNIC MRU to zero.

Fixes: f8168ca0e690 ("net/bnxt: support thor controller")
Cc: stable@dpdk.org
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
5 years agonet/bnxt: release HWRM lock before returning
Lance Richardson [Mon, 4 Nov 2019 20:27:46 +0000 (15:27 -0500)]
net/bnxt: release HWRM lock before returning

The function bnxt_vnic_rss_configure_thor() returns early when
all receive queues are stopped without releasing the hwrm
spinlock, which causes subsequent HWRM operations to hang. Fix
by ensuring that the lock is released before returning from
this function.

Fixes: 38412304b50a ("net/bnxt: enable RSS for thor-based controllers")
Cc: stable@dpdk.org
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
5 years agonet/bnxt: keep consistent Rx queue start/stop state
Lance Richardson [Mon, 4 Nov 2019 20:27:45 +0000 (15:27 -0500)]
net/bnxt: keep consistent Rx queue start/stop state

Receive queue state needs to reflect "started" state when rebuilding
the RSS table for Thor-based NICs. Move state update so that receive
queues being started are included in the RSS table.

Fixes: 38412304b50a ("net/bnxt: enable RSS for thor-based controllers")
Cc: stable@dpdk.org
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
5 years agonet/bnxt: fix RSS table update for start/stop Rx queue
Lance Richardson [Mon, 4 Nov 2019 20:27:44 +0000 (15:27 -0500)]
net/bnxt: fix RSS table update for start/stop Rx queue

A previous commit made updating of the RSS table when a receive
queue is stopped/started conditional on vnic->rx_queue_cnt being
nonzero. This count is only nonzero for dynamically created VNICs,
so the RSS table was not being updated in the normal path.
Fix by restoring the original logic.

Also ensure that vnic->rx_queue_cnt is initialized to zero when
reinitializing the VNIC array.

Fixes: 36024b2e7fe5 ("net/bnxt: allow dynamic creation of VNIC")

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
5 years agonet/bnxt: fix COS queue mapping
Ajit Khaparde [Mon, 4 Nov 2019 10:02:40 +0000 (15:32 +0530)]
net/bnxt: fix COS queue mapping

While issuing hwrm_queue_qportcfg command, we are setting the
drv_qmap_cap bit which is causing the firmware to return incorrect COS
queue mapping.
This bit is not required when COS classification is enabled.

Fixes: 698aa7e95325 ("net/bnxt: add code to determine the Tx COS queue")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
5 years agonet/bnxt: fix initialization
Kalesh AP [Mon, 4 Nov 2019 10:02:39 +0000 (15:32 +0530)]
net/bnxt: fix initialization

During initialization sequence in bnxt_alloc_mem()
if bnxt_alloc_async_cp_ring() fails, driver invokes bnxt_free_mem()
which in turn call bnxt_free_vnic_mem() which causes the error logs
"bnxt_free_vnic_mem(): VNIC is not freed yet!". This is because
vnic memory is allocated but not initialized yet.

Fix this by moving bnxt_init_vnics() from bnxt_init_nic() to
bnxt_alloc_vnic_mem(). Also get rid of bnxt_init_nic() as the
initialization is done in respective functions now.

Fixes: 1bf01f5135f8 ("net/bnxt: prevent device access when device is in reset")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
5 years agonet/bnxt: fix VNIC allocation on port toggle
Santoshkumar Karanappa Rastapur [Mon, 4 Nov 2019 10:02:38 +0000 (15:32 +0530)]
net/bnxt: fix VNIC allocation on port toggle

bnxt_init_chip called on port start keeps incrementing rx_cosq_cnt.
Hence more vnics are allocated with less number of rings on each port
stop/start operation. Eventually vnic allocation fails due to incorrect
ring group as no ring gets allocated to the vnic.

Fixes: 84d49664b5b2 ("net/bnxt: support CoS classification")

Signed-off-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
5 years agonet/bnxt: fix redundant MAC address check
Venkat Duvvuru [Mon, 4 Nov 2019 10:02:37 +0000 (15:32 +0530)]
net/bnxt: fix redundant MAC address check

filter->mac_index is used to check, if a same mac is
already programmed. Hence, filter->dflt member is not
needed which is also used for mac addr redundancy check.

This patch fixes it by moving mac_index based redundant
check from bnxt_mac_addr_add_op to bnxt_add_mac_filter

Fixes: 6118503d8071 ("net/bnxt: fix VLAN filtering")
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>
5 years agonet/bnxt: fix L4 checksum indication in non-vector Rx
Kalesh AP [Mon, 4 Nov 2019 10:02:36 +0000 (15:32 +0530)]
net/bnxt: fix L4 checksum indication in non-vector Rx

Update "mbuf->ol_flags" correctly for inner and ourter ip checksum
errors in case of tunnel and non-tunnel packets.

Fixes: 65ee636872eb ("net/bnxt: fix Rx checksum flags")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
5 years agonet/bnxt: fix debug log level
Stephen Hemminger [Mon, 28 Oct 2019 16:53:39 +0000 (09:53 -0700)]
net/bnxt: fix debug log level

Creating a flow is a normal event; should not be logged at error level.

Fixes: 5c1171c97216 ("net/bnxt: refactor filter/flow")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
5 years agonet/mlx5: check port ID and VLAN actions ordering
Xiaoyu Min [Mon, 4 Nov 2019 12:43:39 +0000 (14:43 +0200)]
net/mlx5: check port ID and VLAN actions ordering

Rdma-core needs the dst_vport (port_id) action be after push/pop VLAN
and modify hdr actions otherwise it will reject to create rule.

This pach validates the port_id is after push/pop VLAN and set VLAN
VID/PCP otherwise PMD spits out errors.

Fixes: 5f163d520cff ("net/mlx5: support modify VLAN ID on existing VLAN header")

Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
5 years agonet/mlx5: fix set VLAN ID/PCP in new header
Xiaoyu Min [Fri, 1 Nov 2019 01:32:32 +0000 (03:32 +0200)]
net/mlx5: fix set VLAN ID/PCP in new header

Currently if user want to set VLAN id/pcp on an about to be pushed VLAN
header, the of_set_vlan_vid/of_set_vlan_pcp must be present _before_
action of_push_vlan:

[1] ... actions of_set_vlan_vid vlan_vid 2 / of_push_vlan ...

This is misleading because people think rule [1] intends to set VLAN id
on the existing VLAN header and then push one new VLAN header on top of
it.

A more natual way to set VLAN id/pcp on an to be pushed VLAN header
should be:

[2] ... actions of_push_vlan / of_set_vlan_vid vlan_vid 2 / ...

Fixes: a5f2da0b816b ("net/mlx5: support modify VLAN ID on new VLAN header")
Fixes: 68fad3635042 ("net/mlx5: support modifying VLAN priority on VLAN header")

Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: remove redundant new line in logs
Dekel Peled [Wed, 30 Oct 2019 08:42:08 +0000 (10:42 +0200)]
net/mlx5: remove redundant new line in logs

DRV_LOG macro is used to print log messages, one per line.
In several locations this macro is used with redundant '\n' character
at the end of the log message, causing blank lines between log lines.

This patch removes the '\n' character where it is redundant.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/ice: fix setting max frame size
Jiaqi Min [Mon, 4 Nov 2019 15:33:32 +0000 (15:33 +0000)]
net/ice: fix setting max frame size

Max frame size is not set to HW, so packets above the MTU
do not get dropped by HW. The patch fixed the issue.

Fixes: 50370662b727 ("net/ice: support device and queue ops")
Cc: stable@dpdk.org
Signed-off-by: Jiaqi Min <jiaqix.min@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
5 years agonet/ixgbe: fix link status
Xiao Zhang [Tue, 29 Oct 2019 05:33:23 +0000 (13:33 +0800)]
net/ixgbe: fix link status

The link status for 82599eb got from link status register was not
correct, check the enable/disable flag of tx laser when getting the link
status, set the link status down if tx laser disabled since the tx laser
flag could be set correctly when up/down the link status.

Fixes: dc66e5fd01b9 ("net/ixgbe: improve link state check on VF")
Cc: stable@dpdk.org
Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
5 years agonet/ixgbe: fix port close in FreeBSD
Chenxu Di [Fri, 1 Nov 2019 02:26:44 +0000 (02:26 +0000)]
net/ixgbe: fix port close in FreeBSD

FreeBSD OS doesn't support igb_uio interrupt, so it will fail when
unregister the interrupt callback in port close. We can fix the issue by
passing -ENOENT when check the return value of unregister interrupt
callback function.

Fixes: f2f4990eff94 ("net/ixgbe: release port upon close")

Signed-off-by: Chenxu Di <chenxux.di@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
5 years agonet/i40e: handle QinQ strip
Tao Zhu [Wed, 30 Oct 2019 18:21:31 +0000 (02:21 +0800)]
net/i40e: handle QinQ strip

Qinq strip is not supported by i40e. When user tries to turn on
QinQ strip, the driver gives unsupported return value and log.

Signed-off-by: Tao Zhu <taox.zhu@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
5 years agonet/ice/base: fix symmetric hash configure
Qi Zhang [Thu, 31 Oct 2019 03:55:21 +0000 (11:55 +0800)]
net/ice/base: fix symmetric hash configure

When a new hash profile is created, we need to reset all related
GLQF_HSYMM registers, otherwise unexpected hash behaviour may happen
on packet that hits that profile.

The patch fixes the issue that we only do reset when symmetric hash
is required, but actually for non symmetric hash we also need this,
since GLQF_HSYMM might be polluted by previous configuration.

Fixes: ddae0440353f ("net/ice/base: enable symmetric hash for RSS")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Tested-by: Simei Su <simei.su@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
5 years agonet/ixgbe: fix MACsec setting
Guinan Sun [Thu, 31 Oct 2019 11:31:52 +0000 (11:31 +0000)]
net/ixgbe: fix MACsec setting

MACsec setting is not valid when port is stopped.
In order to make it valid, the patch changes the setting
to where port is started.

Fixes: 597f9fafe13b ("app/testpmd: convert to new Tx offloads API")
Cc: stable@dpdk.org
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
5 years agonet/ice: remove GTPU tunnel support for inner L4
Yahui Cao [Thu, 31 Oct 2019 13:05:38 +0000 (21:05 +0800)]
net/ice: remove GTPU tunnel support for inner L4

The current code doesn't support L4 matching, it only supports L3
matching so remove the code for inner L4.

Fixes: efc16c621415 ("net/ice: support flow director GTPU tunnel")

Signed-off-by: Yahui Cao <yahui.cao@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
5 years agonet/ixgbe: remove unused macro in NEON path
Ruifeng Wang [Thu, 24 Oct 2019 02:58:03 +0000 (10:58 +0800)]
net/ixgbe: remove unused macro in NEON path

Fixes: ed838a5fe957 ("net/ixgbe: use intrinsics to count packet in NEON Rx")
Cc: stable@dpdk.org
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet/ixgbe: support packet type with NEON
Ruifeng Wang [Thu, 24 Oct 2019 02:58:02 +0000 (10:58 +0800)]
net/ixgbe: support packet type with NEON

Ptype parse is missing in aarch64 vector PMD. It makes packet type info
provided by NIC get lost, thus requires extra CPU cycles to do this.
Add the parse process to utilize NIC hardware capability.

In test with l3fwd (removed port conf DEV_RX_OFFLOAD_CHECKSUM),
observed over 3% performance gain.

Fixes: b20971b6cca0 ("net/ixgbe: implement vector driver for ARM")
Cc: stable@dpdk.org
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agodoc: remove flow director feature from hns3
Wei Hu (Xavier) [Fri, 11 Oct 2019 02:29:53 +0000 (10:29 +0800)]
doc: remove flow director feature from hns3

This patch removes deprecated feature 'Flow Director' from hns3.ini
and hns3_vf.ini because the feature has been removed from the
feature list in the following commit:
Commit 030febb6642c ("doc: remove deprecated ethdev features")

Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Chunsong Feng <fengchunsong@huawei.com>
5 years agoethdev: add flow tag
Viacheslav Ovsiienko [Sun, 27 Oct 2019 18:42:28 +0000 (18:42 +0000)]
ethdev: add flow tag

A tag is a transient data which can be used during flow match. This can be
used to store match result from a previous table so that the same pattern
need not be matched again on the next table. Even if outer header is
decapsulated on the previous match, the match result can be kept.

Some device expose internal registers of its flow processing pipeline and
those registers are quite useful for stateful connection tracking as it
keeps status of flow matching. Multiple tags are supported by specifying
index.

Example testpmd commands are:

  flow create 0 ingress pattern ... / end
    actions set_tag index 2 value 0xaa00bb mask 0xffff00ff /
            set_tag index 3 value 0x123456 mask 0xffffff /
            vxlan_decap / jump group 1 / end

  flow create 0 ingress pattern ... / end
    actions set_tag index 2 value 0xcc00 mask 0xff00 /
            set_tag index 3 value 0x123456 mask 0xffffff /
            vxlan_decap / jump group 1 / end

  flow create 0 ingress group 1
    pattern tag index is 2 value spec 0xaa00bb value mask 0xffff00ff /
            eth ... / end
    actions ... jump group 2 / end

  flow create 0 ingress group 1
    pattern tag index is 2 value spec 0xcc00 value mask 0xff00 /
            tag index is 3 value spec 0x123456 value mask 0xffffff /
            eth ... / end
    actions ... / end

  flow create 0 ingress group 2
    pattern tag index is 3 value spec 0x123456 value mask 0xffffff /
            eth ... / end
    actions ... / end

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
5 years agoethdev: remove deprecated port count function
Thomas Monjalon [Mon, 28 Oct 2019 10:49:34 +0000 (11:49 +0100)]
ethdev: remove deprecated port count function

The function rte_eth_dev_count() was marked as deprecated in DPDK 18.05
in commit d9a42a69febf ("ethdev: deprecate port count function").
It was planned to be removed after 19.11 LTS release,
but given we must not break ABI between 19.11 and 20.11,
it is removed now.

Note the ABI version is not dumped in this commit
because other changes already did.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
5 years agomk: fix dpaax library dependency
Gagandeep Singh [Thu, 31 Oct 2019 07:14:10 +0000 (12:44 +0530)]
mk: fix dpaax library dependency

This patch fixes dpaax library dependency for
NXP's PMDs.

Fixes: e56463ec47f0 ("net/enetc: enable dpaax library")
Fixes: 67fc3ff97c39 ("net/pfe: introduce basic functions")
Fixes: 9e727d4a3fd4 ("crypto/caam_jr: integrate DPAAX table")

Suggested-by: Thierry Herbelot <thierry.herbelot@6wind.com>
Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Thierry Herbelot <thierry.herbelot@6wind.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet/mlx5: split hairpin flows
Ori Kam [Wed, 30 Oct 2019 23:53:23 +0000 (23:53 +0000)]
net/mlx5: split hairpin flows

Since the encap action is not supported in RX, we need to split the
hairpin flow into RX and TX.

Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: add default flows for hairpin
Ori Kam [Wed, 30 Oct 2019 23:53:22 +0000 (23:53 +0000)]
net/mlx5: add default flows for hairpin

When using hairpin all traffic from TX hairpin queues should jump
to dedecated table where matching can be done using regesters.

Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: add ID generation
Ori Kam [Wed, 30 Oct 2019 23:53:21 +0000 (23:53 +0000)]
net/mlx5: add ID generation

When splitting flows for example in hairpin / metering, there is a need
to combine the flows. This is done using ID.
This commit introduce a simple way to generate such IDs.

The reason why bitmap was not used is due to fact that the release and
allocation are O(n) while in the chosen approch the allocation and
release are O(1)

Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: add internal tag item and action
Ori Kam [Wed, 30 Oct 2019 23:53:20 +0000 (23:53 +0000)]
net/mlx5: add internal tag item and action

This commit introduce the setting and matching on registers.
This item and and action will be used with number of different
features like hairpin, metering, metadata.

Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: support RSS on hairpin
Ori Kam [Wed, 30 Oct 2019 23:53:19 +0000 (23:53 +0000)]
net/mlx5: support RSS on hairpin

Add support for rss on hairpin queues.

Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: add hairpin binding function
Ori Kam [Wed, 30 Oct 2019 23:53:18 +0000 (23:53 +0000)]
net/mlx5: add hairpin binding function

When starting the port, in addition to creating the queues
we need to bind the hairpin queues.

Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: get hairpin capabilities
Ori Kam [Wed, 30 Oct 2019 23:53:16 +0000 (23:53 +0000)]
net/mlx5: get hairpin capabilities

This commits adds the hairpin get capabilities function.

Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: support Tx hairpin queues
Ori Kam [Wed, 30 Oct 2019 23:53:15 +0000 (23:53 +0000)]
net/mlx5: support Tx hairpin queues

This commit adds the support for creating Tx hairpin queues.
Hairpin queue is a queue that is created using DevX and only used
by the HW.

Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: prepare Tx queues to have different types
Ori Kam [Wed, 30 Oct 2019 23:53:14 +0000 (23:53 +0000)]
net/mlx5: prepare Tx queues to have different types

Currently all Tx queues are created using Verbs.
This commit modify the naming so it will not include verbs,
since in next commit a new type will be introduce (hairpin)

Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: support Rx hairpin queues
Ori Kam [Wed, 30 Oct 2019 23:53:13 +0000 (23:53 +0000)]
net/mlx5: support Rx hairpin queues

This commit adds the support for creating Rx hairpin queues.
Hairpin queue is a queue that is created using DevX and only used
by the HW. This results in that all the data part of the RQ is not being
used.

Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: query hairpin capabilities
Ori Kam [Wed, 30 Oct 2019 23:53:12 +0000 (23:53 +0000)]
net/mlx5: query hairpin capabilities

This commit query and store the hairpin capabilities from the device.

Those capabilities will be used when creating the hairpin queue.

Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agoethdev: add hairpin queue
Ori Kam [Wed, 30 Oct 2019 23:53:11 +0000 (23:53 +0000)]
ethdev: add hairpin queue

This commit introduce hairpin queue type.

The hairpin queue in build from Rx queue binded to Tx queue.
It is used to offload traffic coming from the wire and redirect it back
to the wire.

There are 3 new functions:
- rte_eth_dev_hairpin_capability_get
- rte_eth_rx_hairpin_queue_setup
- rte_eth_tx_hairpin_queue_setup

In order to use the queue, there is a need to create rte_flow
with queue / RSS action that targets one or more of the Rx queues.

Signed-off-by: Ori Kam <orika@mellanox.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
5 years agoethdev: move queue state defines to private file
Ori Kam [Wed, 30 Oct 2019 23:53:10 +0000 (23:53 +0000)]
ethdev: move queue state defines to private file

The queue state defines are internal to the DPDK.
This commit moves them to a private header file.

Signed-off-by: Ori Kam <orika@mellanox.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
5 years agonet/octeontx2: support HIGIG2
Kiran Kumar K [Wed, 23 Oct 2019 15:25:49 +0000 (20:55 +0530)]
net/octeontx2: support HIGIG2

Adding support to parse higig2 header in RTE flow for octeontx2.
And added devargs to configure port for higig2.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
5 years agonet/octeontx2: support enabling switch type
Kiran Kumar K [Wed, 23 Oct 2019 15:25:48 +0000 (20:55 +0530)]
net/octeontx2: support enabling switch type

Adding support to configure specific switch types like high2 and dsa
on a port. When this switch type is configured, it is expected that
all the traffic on that port should be of specific type only.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
5 years agonet/octeontx2: skip flow control on LBK ports
Vamsi Attunuru [Wed, 30 Oct 2019 05:54:10 +0000 (11:24 +0530)]
net/octeontx2: skip flow control on LBK ports

LBK interface does not support any flow control related
HW configurations.

Skip flow control set requests on LBK bound ethports.

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
5 years agonet/octeontx2: fix VF index in VF action
Vamsi Attunuru [Tue, 29 Oct 2019 17:50:59 +0000 (23:20 +0530)]
net/octeontx2: fix VF index in VF action

VF index needs to be checked against maxvf count
before incrementing it for preparing pf_func.

Fixes: 520270d5184a ("net/octeontx2: support PF and VF action")
Cc: stable@dpdk.org
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
5 years agonet/qede: fix setting VLAN strip mode
Shahed Shaikh [Sun, 20 Oct 2019 05:20:51 +0000 (22:20 -0700)]
net/qede: fix setting VLAN strip mode

Commit 9a6d30ae6d46 ("net/qede: refactoring vport handling code")
deleted the code as part of refactoring which sets vlan strip mode.
Revert it back and fix vlan strip feature.

Fixes: 9a6d30ae6d46 ("net/qede: refactoring vport handling code")
Cc: stable@dpdk.org
Signed-off-by: Shahed Shaikh <shshaikh@marvell.com>
Reviewed-by: Rasesh Mody <rmody@marvell.com>
5 years agonet/qede: fix setting MTU
Shahed Shaikh [Sun, 20 Oct 2019 05:20:50 +0000 (22:20 -0700)]
net/qede: fix setting MTU

New MTU value is not propagated to vport in HW when MTU update request
is sent while ports are stopped.

This patch fixes the logic error for above mentioned condition.

Fixes: d121a6b5f781 ("net/qede: fix VF MTU update")
Cc: stable@dpdk.org
Signed-off-by: Shahed Shaikh <shshaikh@marvell.com>
Reviewed-by: Rasesh Mody <rmody@marvell.com>
5 years agonet/qede/base: update FW to 8.40.33.0
Rasesh Mody [Sun, 20 Oct 2019 05:20:49 +0000 (22:20 -0700)]
net/qede/base: update FW to 8.40.33.0

In our testing we have identified a critical FW bug. Performance
is degraded significantly for certain packet sizes with 8.40.25.0 FW.

This patch updates the FW to version 8.40.33.0. The updated FW has a
fix to performance issue.

The patch also adds initialization for FW overlay RAM as part of
hardware initialization which is required by the new FW.

Fixes: 3b307c55f2ac ("net/qede/base: update FW to 8.40.25.0")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rmody@marvell.com>
5 years agonet/ena: fix indication of bad L4 Rx checksums
Igor Chauskin [Mon, 28 Oct 2019 10:23:33 +0000 (11:23 +0100)]
net/ena: fix indication of bad L4 Rx checksums

Add checking of l4_csum_checked and frag flags before checking the
l4_csum_error flag.

In case of IP fragment/unchecked L4 csum - add PKT_RX_L4_CKSUM_UNKNOWN
flag to the indicated mbuf.

Fixes: 1173fca25af9 ("ena: add polling-mode driver")
Cc: stable@dpdk.org
Signed-off-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Maciej Bielski <mba@semihalf.com>
Reviewed-by: Michal Krawczyk <mk@semihalf.com>
5 years agonet/ice: fix flow director
Ying A Wang [Tue, 29 Oct 2019 18:13:41 +0000 (02:13 +0800)]
net/ice: fix flow director

Flow director rule can't be created when the flow table is nearly full.
The patch fixed this issue to enable created flows reaching the maximum
number.

Fixes: 1a2fc1799f09 ("net/ice: reject duplicated flow for flow director")

Signed-off-by: Ying A Wang <ying.a.wang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
5 years agonet/ice: correct key length and queues check for RSS
Simei Su [Wed, 30 Oct 2019 02:52:25 +0000 (10:52 +0800)]
net/ice: correct key length and queues check for RSS

This patch corrects key_len and queues check. The key_len and queues
are not supported to configure for RSS in rte_flow.

Fixes: 5ad3db8d4bdd ("net/ice: enable advanced RSS")

Signed-off-by: Simei Su <simei.su@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
5 years agonet/ice/base: fix ptype mapping pollution from GTP flow
Qi Zhang [Wed, 30 Oct 2019 01:14:32 +0000 (09:14 +0800)]
net/ice/base: fix ptype mapping pollution from GTP flow

A new gtp flow's profile will capture other profile's non-gtp ptypes
which is unexpected. For example, a RSS flow for inner IP / UDP on
regular tunnel packet's behaviour will be changed by a following GTP RSS
rule where inner IP is the only inputset, since all tunnel ptypes have
been shifted from the first profile to the second one.

The patch fixes the issue by correcting the ptype mapping that prevents
the ptype shift.

Fixes: d1c2f76b440a ("net/ice/base: support GTP and PPPoE protocols")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Tested-by: Simei Su <simei.su@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
5 years agonet/ice: fix RSS types check
Simei Su [Wed, 30 Oct 2019 02:49:30 +0000 (10:49 +0800)]
net/ice: fix RSS types check

This patch corrects logic error for checking rss->types to match
pattern in RSS action parser.

Fixes: 5ad3db8d4bdd ("net/ice: enable advanced RSS")

Signed-off-by: Simei Su <simei.su@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
5 years agonet/bonding: fix port ID check
Junyu Jiang [Tue, 29 Oct 2019 02:23:41 +0000 (02:23 +0000)]
net/bonding: fix port ID check

Port validation should be prior to getting device data
to avoid segment fault. This patch fixed the segment fault
caused by invalid port using.

Fixes: 6d72657ce379 ("net/bonding: add other aggregator modes")
Fixes: 112891cd27e5 ("net/bonding: add dedicated HW queues for LACP control")
Cc: stable@dpdk.org
Signed-off-by: Junyu Jiang <junyux.jiang@intel.com>
Acked-by: Chas Williams <chas3@att.com>
5 years agonet/mlx5: fix LRO dependency to include DV flow
Dekel Peled [Thu, 24 Oct 2019 12:46:42 +0000 (15:46 +0300)]
net/mlx5: fix LRO dependency to include DV flow

Rx queue for LRO is created using DevX. Flows created on this queue
must use the DV flow engine.

This patch adds check of dv_flow_en=1 when configuring LRO support
on device spawn.
Documentation is updated accordingly.

Fixes: 175f1c21d033 ("net/mlx5: check conditions to enable LRO")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: fix compilation directive
Dekel Peled [Sun, 27 Oct 2019 15:33:05 +0000 (17:33 +0200)]
net/mlx5: fix compilation directive

Glue function mlx5_glue_devx_qp_query() uses wrong directive
HAVE_IBV_DEVX_ASYNC by mistake.
This patch replaces the directive to HAVE_IBV_DEVX_OBJ, as required.

Fixes: 62d6f70f30f4 ("net/mlx5: add glue for queue query via DevX")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
5 years agonet/ice: fix flow API framework
Ying A Wang [Mon, 28 Oct 2019 17:43:36 +0000 (01:43 +0800)]
net/ice: fix flow API framework

In non-pipeline mode, switch should be used as FDIR'S backup.
The patch fixed rule can't be created when FDIR'S flow table is full.

Fixes: 7615a6895009 ("net/ice: rework for generic flow enabling")

Signed-off-by: Ying A Wang <ying.a.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
5 years agonet/igb: fix PHY status if PHY reset is not blocked
Shweta Choudaha [Thu, 16 May 2019 22:03:31 +0000 (23:03 +0100)]
net/igb: fix PHY status if PHY reset is not blocked

When PHY reset is blocked as is the case when BMC is connected via NC-SI
do not set GO_LINKD bit in PHY power management register in dev_stop as
this will disconnect the PHY. Also, in dev_close clear the GO_LINKD
bit only if PHY reset is not blocked

Fixes: 3af34dec0b41 ("igb: force phy power up/down")
Cc: stable@dpdk.org
Signed-off-by: Shweta Choudaha <shweta.choudaha@att.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
5 years agonet/ice: fix packet type table
Ying A Wang [Thu, 24 Oct 2019 21:39:59 +0000 (05:39 +0800)]
net/ice: fix packet type table

The original packet type table's hw-ptype index to sw-ptype
mapping is wrong. This patch fixed the issue.

Fixes: ab9dccf09af9 ("net/ice: support packet type getting")
Cc: stable@dpdk.org
Signed-off-by: Ying A Wang <ying.a.wang@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
5 years agonet/fm10k: fix mbuf free in vector Rx
Xiao Wang [Sat, 26 Oct 2019 00:33:22 +0000 (20:33 -0400)]
net/fm10k: fix mbuf free in vector Rx

There's a corner case that all the Rx queue mbufs are allocated but none
of them is used, this patch fixes mbuf free for this case.

Fixes: b6719f8a04bb ("fm10k: release mbuf for vector Rx")
Cc: stable@dpdk.org
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Signed-off-by: Anna Lukin <annal@silicom.co.il>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
5 years agodrivers: process shared link dependencies as for libs
Bruce Richardson [Tue, 8 Oct 2019 14:36:28 +0000 (15:36 +0100)]
drivers: process shared link dependencies as for libs

For the public APIs of DPDK libraries we run checks for correct use of
experimental tags, and also do dynamic generation of the version file to
its window's equivalent. Although must drivers don't export APIs, some do,
so these checks are relevant and should be copied from lib/meson.build to
drivers/meson.build.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
5 years agolib: check experimental symbols with meson
Bruce Richardson [Tue, 8 Oct 2019 14:36:27 +0000 (15:36 +0100)]
lib: check experimental symbols with meson

Call check-experimental-syms.sh script as part of the meson build to ensure
that all functions are correctly tagged.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
5 years agobuildtools: remove make-specific from symbols check
Bruce Richardson [Tue, 8 Oct 2019 14:36:26 +0000 (15:36 +0100)]
buildtools: remove make-specific from symbols check

The check-experimental-syms.sh script was finding the map-list-symbol.sh
script using $RTE_SDK, which is the variable set when using the "make"
build system. To make this script more independent, we just use the current
path of the script as the location to find its companion script.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
5 years agotest/compress: refactor unit tests
Artur Trybula [Thu, 7 Nov 2019 17:26:18 +0000 (18:26 +0100)]
test/compress: refactor unit tests

Core engine refactoring (test_deflate_comp_decomp function).
Smaller specialized functions created.

Signed-off-by: Artur Trybula <arturx.trybula@intel.com>
Acked-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Shally Verma <shallyv@marvell.com>
5 years agocrypto/openssl: use local copy for session contexts
Thierry Herbelot [Wed, 11 Sep 2019 16:06:01 +0000 (18:06 +0200)]
crypto/openssl: use local copy for session contexts

Session contexts are used for temporary storage when processing a
packet.
If packets for the same session are to be processed simultaneously on
multiple cores, separate contexts must be used.

Note: with openssl 1.1.1 EVP_CIPHER_CTX can no longer be defined as a
variable on the stack: it must be allocated. This in turn reduces the
performance.

Fixes: d61f70b4c918 ("crypto/libcrypto: add driver for OpenSSL library")
Cc: stable@dpdk.org
Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
5 years agocrypto/dpaa2_sec: add enqueue retry timeout
Nipun Gupta [Wed, 6 Nov 2019 07:18:27 +0000 (12:48 +0530)]
crypto/dpaa2_sec: add enqueue retry timeout

This patch adds retry in the DPAA2 SEC packet enqueue API

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agocrypto/dpaax_sec: enable anti replay window config
Hemant Agrawal [Wed, 6 Nov 2019 06:54:14 +0000 (12:24 +0530)]
crypto/dpaax_sec: enable anti replay window config

This patch usages the anti replay window size to config
the anti replay checking  in decap path for lookaside
IPSEC offload

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agoexamples/ipsec-secgw: fix library mode selection in tests
Konstantin Ananyev [Wed, 6 Nov 2019 14:22:02 +0000 (14:22 +0000)]
examples/ipsec-secgw: fix library mode selection in tests

Right now majority of lib mode functional tests enable
library mode with '-w N' option.
It worked till recently, as legacy mode didn't support replay window.
Now it changed.
To fix - use '-l' option to enable library mode explicitly.

Fixes: 929784452094 ("examples/ipsec-secgw: add scripts for functional test")

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
5 years agoipsec: remove redundant replay window size
Hemant Agrawal [Wed, 6 Nov 2019 06:54:13 +0000 (12:24 +0530)]
ipsec: remove redundant replay window size

The rte_security lib has introduced replay_win_sz,
so it can be removed from the rte_ipsec lib.

The relevant tests, app are also update to reflect
the usages.

Note that esn and anti-replay fileds were earlier used
only for ipsec library, they were enabling the libipsec
by default. With this change esn and anti-replay setting
will not automatically enabled libipsec.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agosecurity: add anti replay window size
Hemant Agrawal [Wed, 6 Nov 2019 06:54:12 +0000 (12:24 +0530)]
security: add anti replay window size

At present the ipsec xfrom is missing the important step
to configure the anti replay window size.
The newly added field will also help in to enable or disable
the anti replay checking, if available in offload by means
of non-zero or zero value.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>