dpdk.git
4 years agonet/mlx5: fix validation of VLAN PCP item
Dekel Peled [Mon, 29 Jul 2019 15:14:45 +0000 (18:14 +0300)]
net/mlx5: fix validation of VLAN PCP item

Function mlx5_flow_validate_item_vlan() validates the user setting
is supported by NIC, using a mask with TCI mask 0x0fff.
This check will reject a flow rule specifying a vlan pcp item.

This patch updates mlx5_flow_validate_item_vlan() to use mask 0xffff,
so flow rules with vlan pcp item are accepted.

Fixes: 23c1d42c7138 ("net/mlx5: split flow validation to dedicated function")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
4 years agonet/mlx4: fix crash on info query in secondary process
Stephen Hemminger [Fri, 12 Jul 2019 20:54:24 +0000 (13:54 -0700)]
net/mlx4: fix crash on info query in secondary process

mlx4_dev_info_get calls mlx4_get_ifname, but mlx4_get_ifname
uses priv->ctx which is not a valid pointer in a secondary
process. The fix is to cache the value in primary.

In the primary process, get and store the interface index of
the device so that secondary process can see it.

Bugzilla ID: 320
Fixes: 61cbdd419478 ("net/mlx4: separate device control functions")
Cc: stable@dpdk.org
Reported-by: Suyang Ju <sju@paloaltonetworks.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agonet/mlx5: fix Tx inline minimum for ConnectX-5
David Christensen [Wed, 31 Jul 2019 22:41:11 +0000 (17:41 -0500)]
net/mlx5: fix Tx inline minimum for ConnectX-5

The function mlx5_set_min_inline() includes a switch() that checks
various PCI device IDs in order to set the txq_inline_min value.  No
value is set when the PCI device ID matches the ConnectX-5 adapters,
resulting in an assert() failure later in the function
mlx5_set_txlimit_params().

This error was encountered on an IBM Power 9 system running RHEL 7.6
w/o Mellanox OFED installed.

Fixes: 38b4b397a57d ("net/mlx5: add Tx configuration and setup")

Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
4 years agonet/mlx5: fix limit of direct rules tables number
Dekel Peled [Thu, 1 Aug 2019 13:22:58 +0000 (16:22 +0300)]
net/mlx5: fix limit of direct rules tables number

MLX5 PMD limits the number of SW steering tables to 32.
This patch updates the limit to 65535, to allow wide range of values.

Fixes: e2b4925ef7c1 ("net/mlx5: support Direct Rules E-Switch")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
4 years agonet/mlx5: add workaround for VLAN in virtual machine
Viacheslav Ovsiienko [Tue, 30 Jul 2019 09:20:24 +0000 (09:20 +0000)]
net/mlx5: add workaround for VLAN in virtual machine

On some virtual setups (particularly on ESXi) when we have SR-IOV and
E-Switch enabled there is the problem to receive VLAN traffic on VF
interfaces. The NIC driver in ESXi hypervisor does not setup E-Switch
vport setting correctly and VLAN traffic targeted to VF is dropped.

The patch provides the temporary workaround - if the rule
containing the VLAN pattern is being installed for VF the VLAN
network interface over VF is created, like the command does:

  ip link add link vf.if name mlx5.wa.1.100 type vlan id 100

The PMD in DPDK maintains the database of created VLAN interfaces
for each existing VF and requested VLAN tags. When all of the RTE
Flows using the given VLAN tag are removed the created VLAN interface
with this VLAN tag is deleted.

The name of created VLAN interface follows the format:

  evmlx.d1.d2, where d1 is VF interface ifindex, d2 - VLAN ifindex

Implementation limitations:

- mask in rules is ignored, rule must specify VLAN tags exactly,
  no wildcards (which are implemented by the masks) are allowed

- virtual environment is detected via rte_hypervisor() call,
  and the type of hypervisor is checked. Currently we engage
  the workaround for ESXi and unrecognized hypervisors (which
  always happen on platforms other than x86 - it means workaround
  applied for the Flow over PCI VF). There are no confirmed data
  the other hypervisors (HyperV, Qemu) need this workaround,
  we are trying to reduce the list of configurations on those
  workaround should be applied.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
4 years agonet/fm10k: fix address of first segment
Xiao Zhang [Mon, 5 Aug 2019 23:20:54 +0000 (07:20 +0800)]
net/fm10k: fix address of first segment

This patch fixes (dereference after null check) coverity issue.
The address of first segmented packets was not set correctly during
reassembling packets which led to this issue.

Coverity issue: 343416
Fixes: fe65e1e1ce61 ("fm10k: add vector scatter Rx")
Cc: stable@dpdk.org
Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agonet/iavf: fix address of first segment
Xiao Zhang [Mon, 5 Aug 2019 23:20:53 +0000 (07:20 +0800)]
net/iavf: fix address of first segment

This patch fixes (dereference after null check) coverity issue.
The address of first segmented packets was not set correctly during
reassembling packets which led to this issue.

Coverity issue: 343447
Fixes: 319c421f3890 ("net/avf: enable SSE Rx Tx")
Cc: stable@dpdk.org
Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agonet/i40e: fix address of first segment
Xiao Zhang [Mon, 5 Aug 2019 23:20:52 +0000 (07:20 +0800)]
net/i40e: fix address of first segment

This patch fixes (dereference after null check) coverity issue.
The address of first segmented packets was not set correctly during
reassembling packets which led to this issue.

Coverity issue: 343422, 343403
Fixes: ca74903b75cf ("net/i40e: extract non-x86 specific code from vector driver")
Cc: stable@dpdk.org
Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agonet/ice: fix address of first segment
Xiao Zhang [Mon, 5 Aug 2019 23:20:51 +0000 (07:20 +0800)]
net/ice: fix address of first segment

This patch fixes (dereference after null check) coverity issue.
The address of first segmented packets was not set correctly during
reassembling packets which led to this issue.

Coverity issue: 343452, 343407
Fixes: c68a52b8b38c ("net/ice: support vector SSE in Rx")
Cc: stable@dpdk.org
Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agonet/ixgbe: fix address of first segment
Xiao Zhang [Mon, 5 Aug 2019 23:20:50 +0000 (07:20 +0800)]
net/ixgbe: fix address of first segment

This patch fixes (dereference after null check) coverity issue.
The address of first segmented packets was not set correctly during
reassembling packets which led to this issue.

Coverity issue: 13245
Fixes: 8a44c15aa57d ("net/ixgbe: extract non-x86 specific code from vector driver")
Cc: stable@dpdk.org
Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agonet/ice: fix null pointer dereferences for tunnels
Xiaolong Ye [Mon, 5 Aug 2019 09:15:11 +0000 (17:15 +0800)]
net/ice: fix null pointer dereferences for tunnels

This patch fixes two null pointer dereferences in flow code detected by
coverity scan.

Coverity issue: 345815, 345816
Fixes: 94f00800d78b ("net/ice: fix VXLAN/NVGRE flow matching")

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
4 years agonet/e1000: fix PCI config read check
Xiao Zhang [Sun, 4 Aug 2019 21:27:00 +0000 (05:27 +0800)]
net/e1000: fix PCI config read check

Add return value checking when reading configure information from PCI
register to avoid Coverity issue.

Fixes: 1fc97012 ("net/e1000: fix i219 hang on reset/close")
Cc: stable@dpdk.org
Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agonet/ice: remove unused parameter tag
Xiaolong Ye [Thu, 1 Aug 2019 15:12:01 +0000 (23:12 +0800)]
net/ice: remove unused parameter tag

Given the fact that dev parameter is used in ice_dev_configure.

Fixes: 50370662b727 ("net/ice: support device and queue ops")
Cc: stable@dpdk.org
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
4 years agoexamples/ip_pipeline: fix TC oversubscription weight
Jasvinder Singh [Tue, 6 Aug 2019 11:49:51 +0000 (12:49 +0100)]
examples/ip_pipeline: fix TC oversubscription weight

The sched library checks the subport tc ov weight value regardless
of whether RTE_SCHED_SUBPORT_TC_OV flag is enabled or not.

This fix allows application to always set valid tc ov weight value.

error log
SCHED: pipe_profile_check: Incorrect value for tc ov weight
SCHED: rte_sched_port_check_params: Pipe profile check failed(-22)
Command "tmgr" failed.

Fixes: 25961ff3bcb9 ("examples/ip_pipeline: add traffic manager object")
Cc: stable@dpdk.org
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
4 years agoexamples/bpf: fix build
Konstantin Ananyev [Tue, 30 Jul 2019 10:19:27 +0000 (11:19 +0100)]
examples/bpf: fix build

Example BPF programs t2.c, t3.c in folder examples/bpf are
failing to compile with latest dpdk.org master.
The reason is changes in some core DPDK header files, that causes
now inclusion of x86 specific headers.
To overcome the issue, minimize inclusion of DPDK header files
into BPF source code.

Bugzilla ID: 321

Fixes: 9dfc06c26a8b ("test/bpf: add samples")
Cc: stable@dpdk.org
Reported-by: Michel Machado <michel@digirati.com.br>
Suggested-by: Michel Machado <michel@digirati.com.br>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
4 years agodoc: update release notes for i40e MARK+RSS
Mesut Ali Ergin [Thu, 25 Jul 2019 22:11:12 +0000 (15:11 -0700)]
doc: update release notes for i40e MARK+RSS

Signed-off-by: Mesut Ali Ergin <mesut.a.ergin@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
4 years agonet/memif: fix multi-process Tx
Phil Yang [Tue, 6 Aug 2019 08:45:26 +0000 (16:45 +0800)]
net/memif: fix multi-process Tx

When working as a secondary process, it uses eth_memif_rx in PMD egress.
It should be eth_memif_tx.

Fixes: c41a04958b ("net/memif: support multi-process")

Signed-off-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
4 years agonet/memif: fix error paths
Jakub Grajciar [Mon, 5 Aug 2019 09:07:32 +0000 (11:07 +0200)]
net/memif: fix error paths

Coverity issue: 343440, 343459, 343464, 343394
Fixes: 09c7e63a71f9 ("net/memif: introduce memory interface PMD")

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
4 years agoexamples/ntb: fix error handling
Xiaoyun Li [Mon, 5 Aug 2019 05:57:28 +0000 (13:57 +0800)]
examples/ntb: fix error handling

This patch adds return value checking for fseek function to fix
error handling issue found by coverity scan.

Coverity issue: 344996
Fixes: c5eebf85badc ("examples/ntb: add example for NTB")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agoraw/ntb: fix null pointer dereference
Xiaoyun Li [Mon, 5 Aug 2019 05:02:47 +0000 (13:02 +0800)]
raw/ntb: fix null pointer dereference

This patch fixes null pointer dereference issues found by coverity scan.

Coverity issue: 344981, 344991, 345000, 345002, 345006, 345024
Fixes: 277310027965 ("raw/ntb: introduce NTB raw device driver")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agodoc: add tested platforms with Mellanox NICs
Raslan Darawsheh [Tue, 6 Aug 2019 07:01:52 +0000 (07:01 +0000)]
doc: add tested platforms with Mellanox NICs

Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
4 years agonet/bnxt: fix traffic stall on Rx queue stop/start
Kalesh AP [Thu, 1 Aug 2019 15:45:20 +0000 (08:45 -0700)]
net/bnxt: fix traffic stall on Rx queue stop/start

Fixed a check in bnxt_alloc_hwrm_rx_ring() while initializing
the rx ring.

Driver should not change "deferred_start" status of rx/tx queues.
It should get the status in queue_setup_op() and use that value.

Fixes: 9b63c6fd70e3 ("net/bnxt: support Rx/Tx queue start/stop")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
4 years agocommon/octeontx2: fix mbox memory access
Vamsi Attunuru [Fri, 2 Aug 2019 06:57:16 +0000 (12:27 +0530)]
common/octeontx2: fix mbox memory access

Octeontx2 PMD's mailbox client uses device memory to send messages
to mailbox server in the admin function Linux kernel driver.
The device memory used for the mailbox communication needs to
be qualified as volatile memory type to avoid unaligned device
memory accesses because of compiler's memory access coalescing.

This patch modifies the mailbox request and responses as volatile
type which were non-volatile earlier and accessed from unaligned
memory addresses which resulted in bus errors on Fedora 30 with
gcc 9.1.1.

Fixes: 2b71657c8660 ("common/octeontx2: add mbox request and response definition")

Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
4 years agonet/mvpp2: remove resources when port is closed
Liron Himi [Mon, 5 Aug 2019 10:16:56 +0000 (13:16 +0300)]
net/mvpp2: remove resources when port is closed

Since 18.11, it is suggested that driver should release all its private
resources at the dev_close routine. So all resources previously released
in remove routine are now released at the dev_close routine, and the
dev_close routine will be called in driver remove routine in order to
support removing a device without closing its ports.

Above behavior changes are supported by setting RTE_ETH_DEV_CLOSE_REMOVE
flag during probe stage.

Signed-off-by: Liron Himi <lironh@marvell.com>
Reviewed-by: Yuri Chipchev <yuric@marvell.com>
4 years agonet/thunderx: fix crash on detach
Amit Gupta [Mon, 5 Aug 2019 08:00:44 +0000 (13:30 +0530)]
net/thunderx: fix crash on detach

Fix the PCIe detach segfault by releasing eth_dev resources
by adding nicvf cleanup support on PCI detach.

Fixes: fdf91e0f2fac ("drivers/net: do not use ethdev driver")
Cc: stable@dpdk.org
Signed-off-by: Amit Gupta <agupta3@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
4 years agodrivers/octeontx2: fix Coverity warnings
Harman Kalra [Sun, 4 Aug 2019 07:20:52 +0000 (07:20 +0000)]
drivers/octeontx2: fix Coverity warnings

Addressed issues reported by coverity: NULL pointer dereferencing
issues, unchecked return value, uinitialized scalar value,
probable deadcode cases, unintended sign extension, bad bit
shift operation, Wrong sizeof argument (SIZEOF_MISMATCH)

Coverity issue: 343396, 345028, 344977, 345015, 345025, 344969
Coverity issue: 345014, 344966, 343437, 344993, 345007, 344988
Coverity issue: 343405, 344999, 345003

Fixes: 58f6f93c34c1 ("net/octeontx2: add module EEPROM dump")
Fixes: 38f566280abb ("net/octeontx2: add link stats operations")
Fixes: b5dc3140448e ("net/octeontx2: support base PTP")
Fixes: ba1b3b081edf ("net/octeontx2: support VLAN offloads")
Fixes: 092b38341859 ("net/octeontx2: add flow init and fini")
Fixes: 3da1b85b6d06 ("common/octeontx2: add FLR IRQ handler")
Fixes: 2548ab774f92 ("mempool/octeontx2: add context dump support")
Fixes: 2b71657c8660 ("common/octeontx2: add mbox request and response definition")

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
4 years agonet/octeontx2: support 96xx A1 silicon revision
Nithin Dabilpuram [Mon, 5 Aug 2019 05:40:51 +0000 (11:10 +0530)]
net/octeontx2: support 96xx A1 silicon revision

Update workaround changes for erratas that are fixed on 96xx A1.
This patch also enables cq drop for all the passes for
maintaining performance along with updating a default
Rx ring size in dev_info.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
4 years agonet/octeontx2: fix optimal default SQE buffer count
Vamsi Attunuru [Mon, 5 Aug 2019 15:37:39 +0000 (21:07 +0530)]
net/octeontx2: fix optimal default SQE buffer count

Patch extends minimum supported max_sqb_count devarg value
such that it can limit the max sqb count to 8 buffers and
also defines NIX_DEF_SQB and uses it to compute the number
of sqe buffers required for the egress traffic.

NIX_DEF_SQB is defined as 16 which is optimal across multiple
octeontx2 platforms to scale up the performance proportional
to the corresponding port/queue to lcore mappings.

Fixes: fb0198b7dc07 ("net/octeontx2: add devargs parsing functions")

Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
4 years agocommon/octeontx2: update ready message response
Jerin Jacob [Sat, 3 Aug 2019 18:42:19 +0000 (00:12 +0530)]
common/octeontx2: update ready message response

The kernel mbox server driver(AF) updated the ready
message response. Sync with AF driver.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
4 years agonet/octeontx2: drop Rx and L2 error packets
Jerin Jacob [Tue, 30 Jul 2019 14:27:19 +0000 (19:57 +0530)]
net/octeontx2: drop Rx and L2 error packets

From B0 HW revision onwards, HW can drop the Rx and L2 error packets.
Enable this by default if the feature is available.
Since this bit field is used as reserved in old HW revisions,
No need to have additional HW version check.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
4 years agodoc: add tested Marvell integrated NIC platforms
Jerin Jacob [Wed, 31 Jul 2019 15:45:49 +0000 (21:15 +0530)]
doc: add tested Marvell integrated NIC platforms

Add tested Marvell integrated NIC platforms to v19.08 release note.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
4 years agodoc: add co-existence consideration for qede
Rasesh Mody [Mon, 5 Aug 2019 09:19:54 +0000 (02:19 -0700)]
doc: add co-existence consideration for qede

Add and update co-existence considerations for qede PMD

Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rmody@marvell.com>
4 years agodoc: add co-existence consideration for bnx2x
Rasesh Mody [Mon, 5 Aug 2019 09:24:26 +0000 (02:24 -0700)]
doc: add co-existence consideration for bnx2x

Add and update co-existence considerations for bnx2x PMD

Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rmody@marvell.com>
4 years agodoc: use SPDX tag for bnx2x guide
Rasesh Mody [Mon, 5 Aug 2019 09:24:25 +0000 (02:24 -0700)]
doc: use SPDX tag for bnx2x guide

Use SPDX tag for bnx2x PMD guide

Signed-off-by: Rasesh Mody <rmody@marvell.com>
4 years agonet/ena: fix L4 checksum Tx offload
Maciej Bielski [Thu, 1 Aug 2019 11:45:36 +0000 (13:45 +0200)]
net/ena: fix L4 checksum Tx offload

During an if-condition evaluation, a 2-bit flag evaluates to 'true' for
'0x1', '0x2' and '0x3'. Thus, from this perspective these flags are
indistinguishable. To make them distinct, respective bits must be
extracted with a mask and then checked for strict equality.

Specifically here, even if `PKT_TX_UDP_CKSUM` (value '0x3') was set, the
expression `mbuf->ol_flags & PKT_TX_TCP` (the second flag of value
'0x1') is evaluated first and the result is 'true'. In consequence, for
UDP packets the execution flow enters an incorrect branch.

Fixes: 56b8b9b7e5d2 ("net/ena: convert to new Tx offloads API")
Cc: stable@dpdk.org
Reported-by: Eduard Serra <eserra@vmware.com>
Signed-off-by: Maciej Bielski <mba@semihalf.com>
Acked-by: Michal Krawczyk <mk@semihalf.com>
4 years agonet/virtio: fix build with 0 headroom
Hemant Agrawal [Thu, 25 Jul 2019 11:06:45 +0000 (16:36 +0530)]
net/virtio: fix build with 0 headroom

When using RTE_PKTMBUF_HEADROOM as 0, virito ethdev driver throws
compilation error
virtio_ethdev.c:1851:2: note: in expansion of macro ‘RTE_BUILD_BUG_ON’
RTE_BUILD_BUG_ON(RTE_PKTMBUF_HEADROOM
< sizeof(struct virtio_net_hdr_mrg_rxbuf));

This patch change it into run-time check.

Bugzilla ID: 335
Fixes: dec08c28c0b3 ("virtio: check packet headroom at compile time")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
4 years agobus/fslmc: fix build with 0 headroom
Hemant Agrawal [Thu, 25 Jul 2019 11:06:44 +0000 (16:36 +0530)]
bus/fslmc: fix build with 0 headroom

When using RTE_PKTMBUF_HEADROOM as 0, dpaa driver throws compilation error
error "Annotation requirement is more than RTE_PKTMBUF_HEADROOM"

This patch change it into run-time check.

Bugzilla ID: 335
Fixes: beb2a7865dda ("bus/fslmc: define hardware annotation area size")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
4 years agonet/dpaa: fix build with 0 headroom
Hemant Agrawal [Thu, 25 Jul 2019 11:06:43 +0000 (16:36 +0530)]
net/dpaa: fix build with 0 headroom

When using RTE_PKTMBUF_HEADROOM as 0, dpaa driver throws compilation error
error "Annotation requirement is more than RTE_PKTMBUF_HEADROOM"

This patch change it into run-time check.

Bugzilla ID: 335
Fixes: ff9e112d7870 ("net/dpaa: add NXP DPAA PMD driver skeleton")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
4 years agodevtools: allow misc options in null test
Thomas Monjalon [Tue, 30 Jul 2019 17:34:14 +0000 (19:34 +0200)]
devtools: allow misc options in null test

In order to ease basic testing with customized options,
EAL and testpmd options can be added as third and fourth arguments
of the "null PMD" script.

Also, the first argument becomes more flexible by accepting
the testpmd path as an alternative to the build directory.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
4 years agodevtools: restore null test
Thomas Monjalon [Tue, 30 Jul 2019 17:34:13 +0000 (19:34 +0200)]
devtools: restore null test

This small testpmd test was not working for a long time
because of several changes in EAL and mempool.
The 3 main issues solved are:
- Make --no-huge working by specifying an amount of memory
to allocate in legacy mode, and disabling mlockall.
- Load a mempool handler in shared library case.
- Support meson

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
4 years agoreplace license text with SPDX tag on PPC files
David Christensen [Tue, 30 Jul 2019 20:01:58 +0000 (15:01 -0500)]
replace license text with SPDX tag on PPC files

Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
4 years agodoc: replace tools guide license with SPDX tag
Hemant Agrawal [Tue, 5 Jun 2018 07:50:22 +0000 (13:20 +0530)]
doc: replace tools guide license with SPDX tag

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
4 years agovhost: replace IOTLB license with SPDX tag
Maxime Coquelin [Fri, 2 Aug 2019 06:59:09 +0000 (08:59 +0200)]
vhost: replace IOTLB license with SPDX tag

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
4 years agodoc: replace PVP guide license with SPDX tag
Maxime Coquelin [Fri, 2 Aug 2019 07:00:02 +0000 (09:00 +0200)]
doc: replace PVP guide license with SPDX tag

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
4 years agodoc: update supported i40e driver and firmware version
Zhaoyan Chen [Mon, 29 Jul 2019 03:36:21 +0000 (11:36 +0800)]
doc: update supported i40e driver and firmware version

Update supported Intel NIC driver version and firmware version

Signed-off-by: Zhaoyan Chen <zhaoyan.chen@intel.com>
4 years agoapp/testpmd: use exit instead of panic
Stephen Hemminger [Fri, 2 Aug 2019 02:51:54 +0000 (19:51 -0700)]
app/testpmd: use exit instead of panic

rte_panic causes a backtrace (which is uniformative since all
these calls are in main). Instead use rte_exit and try and make the
messages informative.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
4 years agoapp/testpmd: block secondary process
Stephen Hemminger [Fri, 2 Aug 2019 02:51:53 +0000 (19:51 -0700)]
app/testpmd: block secondary process

Since testpmd has several issues which keep it from working correctly
as a secondary process; abort if user tries to do it, rather than
running into later problems.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
4 years agoapp/testpmd: allow log level on command line
Stephen Hemminger [Fri, 2 Aug 2019 02:51:52 +0000 (19:51 -0700)]
app/testpmd: allow log level on command line

Since testpmd registers log type after processing command
line arguments, it is not possible to do:
  # testpmd --log-level='testpmd:info' ...

Fix this by initializing logtype first.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
4 years agoremove extra blank lines at end of files
Stephen Hemminger [Wed, 31 Jul 2019 14:57:38 +0000 (07:57 -0700)]
remove extra blank lines at end of files

There should not be blank lines at end of files.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
4 years agoethdev: sort experimental symbols per release
David Marchand [Wed, 31 Jul 2019 12:27:16 +0000 (14:27 +0200)]
ethdev: sort experimental symbols per release

Sort the experimental symbols per release to make it easier/quicker to
check for how long we have them.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
4 years agobus/pci: always check IOMMU capabilities
David Marchand [Mon, 5 Aug 2019 06:23:26 +0000 (08:23 +0200)]
bus/pci: always check IOMMU capabilities

IOMMU capabilities won't change and must be checked even if no PCI device
seem to be supported yet when EAL initialised.

This is to accommodate with SPDK that registers its drivers after
rte_eal_init(), especially on PPC platform where the IOMMU does not
support VA.

Fixes: 703458e19c16 ("bus/pci: consider only usable devices for IOVA mode")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: David Christensen <drc@linux.vnet.ibm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Tested-by: Jerin Jacob <jerinj@marvell.com>
Tested-by: Takeshi Yoshimura <tyos@jp.ibm.com>
4 years agobus/pci: remove unused x86 Linux constant
David Marchand [Fri, 2 Aug 2019 09:54:01 +0000 (11:54 +0200)]
bus/pci: remove unused x86 Linux constant

This macro is unused after a previous fix.

Fixes: fe822eb8c565 ("bus/pci: use IOVA DMA mask check when setting IOVA mode")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
4 years agoeal: hide internal function
David Marchand [Wed, 31 Jul 2019 12:07:33 +0000 (14:07 +0200)]
eal: hide internal function

This function has never been used outside of this code unit.
Mark it static and remove it from the eal internal header.

Fixes: 9e29251b2afa ("eal: thread affinity API")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
4 years agoeal: warn on legacy memory allocation requirement
Thomas Monjalon [Tue, 30 Jul 2019 17:21:53 +0000 (19:21 +0200)]
eal: warn on legacy memory allocation requirement

When using --no-huge mode, dynamic allocation is not supported.
Because of this limitation, the option --legacy-mem is implied
and -m may be needed to specify the amount of memory to allocate.
Otherwise the default amount MEMSIZE_IF_NO_HUGE_PAGE will be allocated.

The option --socket-mem can also be used with --legacy-mem
when hugepages are supported.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
4 years agoci: enable unit tests with Travis
Aaron Conole [Fri, 2 Aug 2019 21:25:52 +0000 (17:25 -0400)]
ci: enable unit tests with Travis

When building under Travis (or another linux CI service), enable
running the fast-tests when the RUN_TESTS environment variable is set.

For the Travis service, introduce two new shared builds, since the
shared builds are the ones passing.  Builds that are statically
linked still show some issues in some of the eal_flags tests.  We make
new builds for this, rather than piggybacking, because 'at a glance'
it is difficult to determine why a build fails, and if tests were
enabled for all builds, then looking at the logs for any build would
take a significant amount of time.

Finally, the command to invoke fast tests includes a timeout
multiplier, since some CI environments don't have enough resources to
complete the tests in the default 10s timeout period.

Signed-off-by: Aaron Conole <aconole@redhat.com>
Acked-by: Michael Santana <msantana@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
4 years agotest: allow running shared build without installing
Michael Santana [Fri, 2 Aug 2019 21:25:51 +0000 (17:25 -0400)]
test: allow running shared build without installing

Currently many unit tests fail when running tests under shared builds.
This happens because of missing driver dependencies. This is fixed by
explicitly linking in missing drivers for the test application.

before and after (clang):
https://travis-ci.com/Maickii/dpdk-2/jobs/212329160#L623
https://travis-ci.com/Maickii/dpdk-2/jobs/212335912#L620

Suggested-by: Bruce Richardson <bruce.richardson@intel.com>
Suggested-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Michael Santana <msantana@redhat.com>
Signed-off-by: Aaron Conole <aconole@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
4 years agotest/eal: fix command array sizes
David Marchand [Wed, 31 Jul 2019 18:56:30 +0000 (20:56 +0200)]
test/eal: fix command array sizes

Following removal of -c and -n options, the array should have been
shrunk to avoid launch_proc to access unitialised strings.

Fixes: b4dbacdb1ad7 ("test/eal: set core mask/list config only in dedicated test")
Fixes: 501fa9a40298 ("test/eal: set memory channel config only in dedicated test")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Michael Santana <msantana@redhat.com>
4 years agotest: remove link to ixgbe/i40e with meson
David Marchand [Wed, 31 Jul 2019 07:55:34 +0000 (09:55 +0200)]
test: remove link to ixgbe/i40e with meson

The tests do not depend on ixgbe or i40e drivers, just remove this
explicit link that likely comes from a copy/paste from testpmd.

Fixes: b5dc795a8a55 ("test: build app with meson as dpdk-test")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
4 years agoacl: fix undefined behavior of bit shifts
Aaron Conole [Wed, 31 Jul 2019 15:43:11 +0000 (11:43 -0400)]
acl: fix undefined behavior of bit shifts

Left-shift of an integer constant is represented as 'int' type, but a left
shift of 1 by 31 bits in 'int' is undefined.  Use the U suffix to force
a representation as unsigned.

Caught while running with ubsan under gcc.

Fixes: dc276b5780c2 ("acl: new library")
Cc: stable@dpdk.org
Signed-off-by: Aaron Conole <aconole@redhat.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
4 years agodoc: fix link in release notes
Jerin Jacob [Fri, 2 Aug 2019 05:52:45 +0000 (11:22 +0530)]
doc: fix link in release notes

Fix the following doc build warning by correcting path.

doc/guides/rel_notes/release_18_05.rst:285:
WARNING: unknown document: ../rawdevs/ifpga_rawdev

Fixes: 473c88f9b391 ("drivers/raw: remove rawdev from directory names")

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
4 years agoversion: 19.08-rc3
Thomas Monjalon [Tue, 30 Jul 2019 22:18:46 +0000 (00:18 +0200)]
version: 19.08-rc3

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
4 years agotest/flow_classify: fix undefined behavior
Aaron Conole [Tue, 30 Jul 2019 21:31:23 +0000 (17:31 -0400)]
test/flow_classify: fix undefined behavior

The unit test for the flow classify introduced undefined behavior by using
a corrupted list.  Remove these tests as the invalid data is impossible to
detect with the current API.

Fixes: 9c9befea4f57 ("test: add flow classify unit tests")
Cc: stable@dpdk.org
Signed-off-by: Aaron Conole <aconole@redhat.com>
4 years agodevtools: support FreeBSD
Olivier Matz [Thu, 11 Jul 2019 14:25:30 +0000 (16:25 +0200)]
devtools: support FreeBSD

- As "readlink -e" and "readlink -m" do not exist on freebsd,
  use "readlink -f", it should not have any impact in these cases.
- "sed -ri" is invalid on freebsd and should be replaced by
  "sed -ri=''"
- Use gmake instead of make.

This fixes the following command:
  SYSDIR=/usr/src/sys ./devtools/test-build.sh \
    -j4 x86_64-native-freebsd-gcc

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
4 years agodevtools: fix building kernel component tags
Jerin Jacob [Wed, 17 Jul 2019 15:54:42 +0000 (21:24 +0530)]
devtools: fix building kernel component tags

Update devtools/build-tags.sh to account the kernel
components under in kernel directory.

Fixes: acaa9ee991b5 ("move kernel modules directories")
Cc: stable@dpdk.org
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
4 years agousertools: replace unsafe input function
Andrius Sirvys [Mon, 8 Apr 2019 13:54:41 +0000 (14:54 +0100)]
usertools: replace unsafe input function

LGTM static code analysis tool reports that the function 'input' is
unsafe. Changed to use raw_input which then converts it using
ast.literal_eval() which is safe.

Fixes: d1b94da4a4e0 ("usertools: add client script for telemetry")
Cc: stable@dpdk.org
Signed-off-by: Andrius Sirvys <andrius.sirvys@intel.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
4 years agousertools: print binding errors to stderr
Anatoly Burakov [Thu, 25 Jul 2019 14:21:10 +0000 (15:21 +0100)]
usertools: print binding errors to stderr

Bring consistency to error messages and output them to stderr.
Also, whenever the script tells the user to "check usage", don't
tell the user to do it and just display usage instead.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
4 years agousertools: check if module is loaded before binding
Anatoly Burakov [Thu, 25 Jul 2019 14:21:09 +0000 (15:21 +0100)]
usertools: check if module is loaded before binding

Currently, if an attempt is made to bind a device to a driver that
is not loaded, a confusing and misleading error message appears.
Fix it so that, before binding to the driver, we actually check if
it is loaded in the kernel first.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
4 years agousertools: add error on missing driver to bind
Anatoly Burakov [Thu, 25 Jul 2019 14:21:08 +0000 (15:21 +0100)]
usertools: add error on missing driver to bind

A common user error is to forget driver to which the PCI devices should
be bound to. Currently, the error message in this case looks unhelpful
misleading and indecipherable to anyone but people who know how devbind
works.

Fix this by checking if the driver string is actually a valid device
string. If it is, we assume that the user has just forgot to specify the
driver, and display appropriate error. We also assume that no one will
name their driver in a format that looks like a PCI address, but that
seems like a reasonable assumption to make.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
4 years agodoc: update release notes for 19.08
John McNamara [Tue, 30 Jul 2019 13:24:27 +0000 (14:24 +0100)]
doc: update release notes for 19.08

Fix grammar, spelling and formatting of DPDK 19.08 release notes.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
4 years agodoc: add tested Intel platforms with Intel NICs
Wenjie Li [Mon, 29 Jul 2019 05:29:22 +0000 (13:29 +0800)]
doc: add tested Intel platforms with Intel NICs

Add tested Intel platforms with Intel NICs to v19.08 release note.

Signed-off-by: Wenjie Li <wenjiex.a.li@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
4 years agodoc: update features supported by mlx
Thomas Monjalon [Tue, 30 Jul 2019 15:06:21 +0000 (17:06 +0200)]
doc: update features supported by mlx

Flow control was not documented as a supported feature
since the first fill of features matrix for mlx drivers.

Flow API and CRC offload flag support in mlx4 were missing in the
feature matrix when they were implemented (see below commits).

Fixes: 46d5736a7049 ("net/mlx4: support basic flow items and actions")
Fixes: ce07b1514d59 ("net/mlx4: fix CRC stripping capability report")
Fixes: e86b85ca757b ("doc: fill nics features matrix for mlx")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agodoc: remove unused maintainer role from guide
Thomas Monjalon [Wed, 17 Jul 2019 18:10:07 +0000 (20:10 +0200)]
doc: remove unused maintainer role from guide

The backup maintainer role is not explicitly used in the file MAINTAINERS.
Listing names in a priority order is preferred and more flexible
than explicit named roles.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
4 years agomaintainers: add co-maintainer to sched library
Jasvinder Singh [Fri, 26 Jul 2019 16:42:15 +0000 (17:42 +0100)]
maintainers: add co-maintainer to sched library

Add myself as a co-maintainer to dpdk sched library.

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
4 years agoeal: fix control thread affinity with --lcores
David Marchand [Tue, 30 Jul 2019 15:05:22 +0000 (17:05 +0200)]
eal: fix control thread affinity with --lcores

The ctrl thread cpu affinity setting has been broken when using --lcores.

Using -l/-c options makes each lcore associated to a physical cpu in a 1:1
fashion.
On the contrary, when using --lcores, each lcore cpu affinity can be set
to a list of any online cpu on the system.

To handle both cases, each lcore cpu affinity is considered and removed
from the process startup cpu affinity.

Introduced macros to manipulate dpdk cpu sets in both Linux and FreeBSD.

Examples on a 8 cores Linux system:

$ cd /sys/fs/cgroup/cpuset/
$ mkdir dpdk
$ cd dpdk
$ echo 4-7 > cpuset.cpus
$ echo 0 > cpuset.mems
$ echo $$ > tasks

Before the fix:
$ ./master/app/testpmd --master-lcore 0 --lcores '(0,7)@(7,4,5)' \
 --no-huge --no-pci -m 512 -- -i --total-num-mbufs=2048

8427 cpu_list=4-5,7 testpmd
8428 cpu_list=4-6 eal-intr-thread
8429 cpu_list=4-6 rte_mp_handle
8430 cpu_list=4-5,7 lcore-slave-7

$ taskset -c 7 \
 ./master/app/testpmd --master-lcore 0 --lcores '(0,7)@(7,4,5)' \
 --no-huge --no-pci -m 512 -- -i --total-num-mbufs=2048

EAL: Detected 8 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: Failed to create thread for interrupt handling
EAL: FATAL: Cannot init interrupt-handling thread
EAL: Cannot init interrupt-handling thread
PANIC in main():
Cannot init EAL

After the fix:
$ ./master/app/testpmd --master-lcore 0 --lcores '(0,7)@(7,4,5)' \
 --no-huge --no-pci -m 512 -- -i --total-num-mbufs=2048

15214 cpu_list=4-5,7 testpmd
15215 cpu_list=6 eal-intr-thread
15216 cpu_list=6 rte_mp_handle
15217 cpu_list=4-5,7 lcore-slave-7

$ taskset -c 7 \
 ./master/app/testpmd --master-lcore 0 --lcores '(0,7)@(7,4,5)' \
 --no-huge --no-pci -m 512 -- -i --total-num-mbufs=2048

15297 cpu_list=4-5,7 testpmd
15298 cpu_list=4-5,7 eal-intr-thread
15299 cpu_list=4-5,7 rte_mp_handle
15300 cpu_list=4-5,7 lcore-slave-7

Bugzilla ID: 322
Fixes: c3568ea37670 ("eal: restrict control threads to startup CPU affinity")
Cc: stable@dpdk.org
Reported-by: Johan Källström <johan.kallstrom@ericsson.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
4 years agoexamples/l3fwd: fix unaligned memory access on x86
Hariprasad Govindharajan [Tue, 30 Jul 2019 13:26:38 +0000 (14:26 +0100)]
examples/l3fwd: fix unaligned memory access on x86

Fix unaligned memory access when reading IPv6 header which
leads to segmentation fault by changing aligned memory read
to unaligned memory read.

Bugzilla ID: 279
Fixes: 64d3955de1de ("examples/l3fwd: fix ARM build")
Cc: stable@dpdk.org
Signed-off-by: Hariprasad Govindharajan <hariprasad.govindharajan@intel.com>
Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: David Christensen <drc@linux.vnet.ibm.com>
Reviewed-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
Tested-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
4 years agonet/bnxt: set checksum flags in vector Rx
Kalesh AP [Mon, 29 Jul 2019 21:28:25 +0000 (17:28 -0400)]
net/bnxt: set checksum flags in vector Rx

Fixed to return the checksum status of rx packets by setting
"ol_flags" correctly in vector mode receive.

These changes have been there for non vector mode receive.
In vector mode receive also indicate inner and outer checksum
errors individually in "ol_flag" to indicate L3 and L4 error.

Fixes: bc4a000f2f53 ("net/bnxt: implement SSE vector mode")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Acked-by: Somnath Kotur <somnath.kotur@broadcom.com>
4 years agonet/bnxt: fix context memory allocation
Kalesh AP [Mon, 29 Jul 2019 21:28:05 +0000 (17:28 -0400)]
net/bnxt: fix context memory allocation

There is a bug in context memory allocation because of which
it results in reusing the context memory allocated for the first
port while allocating memory for next ports.

Fix it by passing the port id in the name field while
allocating context memory.

Fixes: f8168ca0e690 ("net/bnxt: support thor controller")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
4 years agonet/virtio: fix build
Jerin Jacob [Tue, 30 Jul 2019 11:04:06 +0000 (16:34 +0530)]
net/virtio: fix build

Add extern to variable declaration to avoid some compiler treating it
as variable definition.

build error log:

lib/librte_pmd_virtio.a(vhost_kernel.o):(.rodata+0x110):
multiple definition of `vhost_msg_strings'
lib/librte_pmd_virtio.a(vhost_user.o):(.data.rel.ro.local+0x0):
first defined here
lib/librte_pmd_virtio.a(virtio_user_dev.o):(.rodata+0xe8):
multiple definition of `vhost_msg_strings'
lib/librte_pmd_virtio.a(vhost_user.o):(.data.rel.ro.local+0x0):
first defined here

Fixes: 33d24d65fe2b ("net/virtio-user: abstract backend operations")
Cc: stable@dpdk.org
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
4 years agodrivers/raw: standardize naming
Bruce Richardson [Fri, 5 Jul 2019 09:34:01 +0000 (10:34 +0100)]
drivers/raw: standardize naming

The driver names for rawdevs were both different in make and meson builds
and were non-standard in the make version in that some included "rawdev" in
the name while others didn't.

Therefore, for global consistency of naming, we can use "rte_rawdev" rather
than "rte_pmd" for the prefix for the libraries. While most other driver
categories use "rte_pmd" as a prefix, there is precedent for this in the
mempool drivers use "rte_mempool" as a prefix.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
4 years agodrivers/raw: remove rawdev from directory names
Bruce Richardson [Fri, 5 Jul 2019 09:34:00 +0000 (10:34 +0100)]
drivers/raw: remove rawdev from directory names

The ifpga and skeleton rawdev drivers included "rawdev" in their directory
names, which was superfluous given that they were in the drivers/raw
directory. Shorten the names via this patch.

For meson builds, this will rename the final library .so/.a files
produced, but those will be renamed again later via a patch to
standardize rawdev names.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
4 years agotest/rcu: remove redundant header file
Ruifeng Wang [Wed, 24 Jul 2019 03:25:38 +0000 (11:25 +0800)]
test/rcu: remove redundant header file

RCU library now includes stdbool.h header itself.
There is no need to include this header file in RCU user files.

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
4 years agotest/table: decrease memory requirement
Michael Santana [Mon, 29 Jul 2019 15:18:34 +0000 (11:18 -0400)]
test/table: decrease memory requirement

This patch reduces the memory footprint of tables for the unit test.
Lower memory footprint means the test now passes when trying to allocate
the tables. This patch is mainly to make table_autotest pass in CI.

Signed-off-by: Michael Santana <msantana@redhat.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
4 years agotest/eal: fix --socket-mem option
Vamsi Attunuru [Mon, 29 Jul 2019 08:08:50 +0000 (10:08 +0200)]
test/eal: fix --socket-mem option

eal flag autotest fails when multiple mem size flags are passed to
--socket-mem option irrespective of RTE_MAX_NUMA_NODES and the number of
available sockets on the test system.

Fixes: 45f1b6e8680a ("app: add new tests on eal flags")
Cc: stable@dpdk.org
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Vamsi Attunuru <vattunuru@marvell.com>
Tested-by: Vamsi Attunuru <vattunuru@marvell.com>
4 years agotest: enable installing app with meson
Anatoly Burakov [Wed, 24 Jul 2019 15:47:31 +0000 (16:47 +0100)]
test: enable installing app with meson

Currently, the test app is not being installed by default when
built and installed with meson build system. Fix that to enable
installation of the test app alongside other DPDK apps.

Fixes: b5dc795a8a55 ("test: build app with meson as dpdk-test")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
4 years agoexamples/rxtx_callbacks: fix HW timestamp config
Harman Kalra [Tue, 30 Jul 2019 07:46:45 +0000 (07:46 +0000)]
examples/rxtx_callbacks: fix HW timestamp config

Since all PMDs doesn't implement per queue offload capabilities but
supports RX timestamping and also since rx_offload_capa includes all
rx_queue_offload_capa's. Hence moving the logic to enable HW timestamp
via DEV_RX_OFFLOAD_TIMESTAMP flag before device configuration so that
this application can work with all PMDs.

Fixes: cd1dadeb9b2a ("examples/rxtx_callbacks: support HW timestamp")

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
4 years agoexamples/qos_sched: add more TC to red configuration
Jasvinder Singh [Wed, 24 Jul 2019 12:27:19 +0000 (13:27 +0100)]
examples/qos_sched: add more TC to red configuration

Add RED configuration to more traffic classes in app configuration
files.

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
4 years agoeal: pick IOVA as PA if IOMMU is not available
Anatoly Burakov [Mon, 29 Jul 2019 13:52:34 +0000 (14:52 +0100)]
eal: pick IOVA as PA if IOMMU is not available

When IOMMU is not available, /sys/kernel/iommu_groups will not be
populated. This is happening since at least 3.6 when VFIO support
was added. If the directory is empty, EAL should not pick IOVA as
VA as the default IOVA mode.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Tested-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
4 years agoexamples/ptpclient: fix delay request message
Harman Kalra [Thu, 25 Jul 2019 14:24:43 +0000 (14:24 +0000)]
examples/ptpclient: fix delay request message

Observed an issue with the length and domain number of the
delay request message sent out by the client. Due to which delay
response from master was not received.

Fixes: ab129e9065a5 ("examples/ptpclient: add minimal PTP client")
Cc: stable@dpdk.org
Signed-off-by: Harman Kalra <hkalra@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
4 years agoexamples/ip_frag: remove Tx fast free offload flag
Sunil Kumar Kori [Thu, 25 Jul 2019 08:24:10 +0000 (13:54 +0530)]
examples/ip_frag: remove Tx fast free offload flag

Application uses different pool to allocate direct and indirect
mbufs which are further spliced together to consturct a fragmented
packet and same is transmitted over the port which is configured
with DEV_TX_OFFLOAD_MBUF_FAST_FREE enabled i.e. all segments
must belong to the same pool. But constructed packet violates
the conditions.

So fixing DEV_TX_OFFLOAD_MBUF_FAST_FREE flag during device
configuration.

Fixes: fdb9eff67f0c ("examples/ip_fragmentation: convert to new offloads API")
Cc: stable@dpdk.org
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
4 years agoapp/testpmd: rename ambiguous VF config variable
David Marchand [Fri, 26 Jul 2019 07:59:49 +0000 (09:59 +0200)]
app/testpmd: rename ambiguous VF config variable

Caught while looking at the rx offloads code.

rx_mode is a global variable for the default rx configuration.
Rename the local rx_mode variable in cmd_set_vf_rxmode_parsed.

Fixes: 7741e4cf16c0 ("app/testpmd: VMDq and DCB updates")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
4 years agoapp/testpmd: fix eth packet dump for small buffers
David Marchand [Wed, 24 Jul 2019 10:58:56 +0000 (12:58 +0200)]
app/testpmd: fix eth packet dump for small buffers

In the rather unlikely case where the first segment is too small to
contain an ethernet header, we can't go and directly dereference the
mbuf data buffer.

Using rte_pktmbuf_read is a little more expensive but this is still
acceptable for a debugging feature.

Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
4 years agodistributor: fix livelock on flush
Liang Ma [Thu, 25 Jul 2019 09:03:01 +0000 (10:03 +0100)]
distributor: fix livelock on flush

The Distributor autotest can lock if ran enough times. Worker and
distributor threads get into a livelock situation waiting on each
other.

To repeat:
`while sudo sh -c "echo 'distributor_autotest' |
./build/app/test/dpdk-test"; do :; done`

The root cause is where we are flushing on exit, and do not wait for
all worker packets to be returned before exiting.
Add a delay on flush so that all worker packets are returned before
completing the flush.

Bugzilla ID: 316
Fixes: 775003ad2f96 ("distributor: add new burst-capable library")
Cc: stable@dpdk.org
Reported-by: Michael Santana <msantana@redhat.com>
Signed-off-by: David Hunt <david.hunt@intel.com>
Signed-off-by: Liang Ma <liang.j.ma@intel.com>
Tested-by: Michael Santana <msantana@redhat.com>
4 years agodoc: add SPDX tag for OPDL guide
Xiaolong Ye [Mon, 29 Jul 2019 07:32:18 +0000 (15:32 +0800)]
doc: add SPDX tag for OPDL guide

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agodoc: replace license text with SPDX tag
Jerin Jacob [Mon, 29 Jul 2019 13:17:18 +0000 (18:47 +0530)]
doc: replace license text with SPDX tag

Replace mvasm and mvpp2 Marvell PMD driver
documentation license text with SPDX tag.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Liron Himi <lironh@marvell.com>
4 years agoeal: replace license text with SPDX tag
Hemant Agrawal [Mon, 29 Jul 2019 07:33:14 +0000 (13:03 +0530)]
eal: replace license text with SPDX tag

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
4 years agoservice: remove experimental banner in API description
David Marchand [Tue, 23 Jul 2019 11:00:09 +0000 (13:00 +0200)]
service: remove experimental banner in API description

This was missed when promoting this API to stable.

Fixes: 7a0ac7cdb454 ("service: promote experimental functions to stable")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Gage Eads <gage.eads@intel.com>
4 years agoeal: sort experimental symbols per release
David Marchand [Sat, 27 Jul 2019 07:21:33 +0000 (09:21 +0200)]
eal: sort experimental symbols per release

Sort the experimental symbols per release to make it easier/quicker to
check for how long we have them.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Michael Santana <msantana@redhat.com>
4 years agoeal: revert parsing option --telemetry
Sean Morrissey [Wed, 24 Jul 2019 15:20:59 +0000 (16:20 +0100)]
eal: revert parsing option --telemetry

This reverts commit debacba0297fbe214b4185a9791e6a9fdf6642ba.

Reverting this patch as it currently breaks the initialization of
telemetry, more investigation is ongoing to fix the issue for the
printed error message for unrecognized argument.

Fixes: debacba0297f ("eal: fix parsing option --telemetry")
Cc: stable@dpdk.org
Signed-off-by: Sean Morrissey <sean.morrissey@intel.com>
4 years agoigb_uio: fix build on Linux 5.3 for fall through
Ferruh Yigit [Mon, 29 Jul 2019 12:32:16 +0000 (13:32 +0100)]
igb_uio: fix build on Linux 5.3 for fall through

build error:
kernel/linux/igb_uio/igb_uio.c:
   In function ‘igbuio_pci_enable_interrupts’:
   kernel/linux/igb_uio/igb_uio.c:230:6:
   error: this statement may fall through
   [-Werror=implicit-fallthrough=]
  230 |   if (pci_alloc_irq_vectors(udev->pdev, 1, 1, ....
kernel/linux/igb_uio/igb_uio.c:240:2: note: here
  240 |  case RTE_INTR_MODE_MSI:
      |  ^~~~

The build error is caused by Linux kernel commit in 5.3 that enables the
"-Wimplicit-fallthrough=3" gcc flag.
Commit a035d552a93b ("Makefile: Globally enable fall-through warning")

To fix the error, either a gcc attribute can be provided [1] or a code
comment with some defined syntax need to be provided [2], since there is
already comments, updated them slightly to match the required syntax to
fix the build error.

[1]
"__attribute__ ((fallthrough));"

[2]
[ \t.!]*([Ee]lse,? |[Ii]ntentional(ly)? )?
fall(s | |-)?thr(ough|u)[ \t.!]*(-[^\n\r]*)?

Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agocommon/octeontx2: prevent STP instruction fissure
Jerin Jacob [Fri, 26 Jul 2019 05:24:43 +0000 (10:54 +0530)]
common/octeontx2: prevent STP instruction fissure

OTX2 AP core can sometimes fissure STP instructions when it is more
optimal to send such writes into the pipeline as 2 separate
instructions. However registers should be excluded from such
optimization. This commit ensures that no CSR write is ever fissured
by introducing zero cost workaround by setting STP pre-index by zero to
make sure OTX2 AP core prevent fissure.

Fixes: 8a4f835971f5 ("common/octeontx2: add IO handling APIs")

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>