dpdk.git
5 years agohash: replace license text with SPDX tag
Xiaolong Ye [Fri, 26 Jul 2019 16:43:42 +0000 (00:43 +0800)]
hash: replace license text with SPDX tag

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
5 years agolpm: replace license text with SPDX tag
Xiaolong Ye [Fri, 26 Jul 2019 16:43:40 +0000 (00:43 +0800)]
lpm: replace license text with SPDX tag

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
5 years agoapp/eventdev: replace license text with SPDX tag
Xiaolong Ye [Fri, 26 Jul 2019 16:43:38 +0000 (00:43 +0800)]
app/eventdev: replace license text with SPDX tag

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
5 years agoexamples/qos_sched: replace license text with SPDX tag
Xiaolong Ye [Fri, 26 Jul 2019 16:43:37 +0000 (00:43 +0800)]
examples/qos_sched: replace license text with SPDX tag

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
5 years agonet/vmxnet3: replace license text with SPDX tag
Xiaolong Ye [Fri, 26 Jul 2019 16:43:36 +0000 (00:43 +0800)]
net/vmxnet3: replace license text with SPDX tag

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
5 years agonet/e1000: replace license text with SPDX tag
Xiaolong Ye [Fri, 26 Jul 2019 16:43:35 +0000 (00:43 +0800)]
net/e1000: replace license text with SPDX tag

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
5 years agonet/i40e: replace license text with SPDX tag
Xiaolong Ye [Fri, 26 Jul 2019 16:43:34 +0000 (00:43 +0800)]
net/i40e: replace license text with SPDX tag

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
5 years agonet/ixgbe: replace license text with SPDX tag
Xiaolong Ye [Fri, 26 Jul 2019 16:43:33 +0000 (00:43 +0800)]
net/ixgbe: replace license text with SPDX tag

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
5 years agonet/enic: restore default log level to info
John Daley [Fri, 26 Jul 2019 20:12:46 +0000 (13:12 -0700)]
net/enic: restore default log level to info

Prior to the fix, RTE_LOGTYPE_INFO messages were displayed by default.
After the fix, only NOTICE level and higher were displayed by default
and INFO level were not. There are INFO level vNIC config related
messages which customers and tech support currently depend on for
debugging and so on and to suddenly hide these messages is not a good
idea.

This patch changes the default log level to RTE_LOG_INFO for enic so
messages are printed as before the fix.

Fixes: bbd8ecc05434 ("net/enic: remove PMD log type references")

Signed-off-by: John Daley <johndale@cisco.com>
5 years agonet/octeontx2: support GRE key parsing
Kiran Kumar K [Fri, 26 Jul 2019 09:03:03 +0000 (14:33 +0530)]
net/octeontx2: support GRE key parsing

Adding support to parse GRE KEY for octeontx2 Flow.
Matching on GRE Key will only work, if checksum and routing
bits in the GRE header are equal to 0.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
5 years agonet/octeontx2: support read clock
Harman Kalra [Sun, 28 Jul 2019 09:09:45 +0000 (09:09 +0000)]
net/octeontx2: support read clock

This patch implements read clock api whose purpose is to return
raw clock ticks. Using this API real time ticks spent in
processing a packet can be known:
    <read_clock val at any time> - mbuf->timestamp

Calling mbox for reading raw clock ticks in fastpath is very
expensive so its value is derived from time stamp counter(tsc)
using freq multiplier (ratio of raw clock ticks and tsc) and clock
delta (by how much tsc is lagging from raw clock value).

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
5 years agonet/octeontx2: fix PTP performance
Harman Kalra [Sun, 28 Jul 2019 09:09:38 +0000 (09:09 +0000)]
net/octeontx2: fix PTP performance

A huge drop in per core MPPS value was observed when PTP stack is
enabled. The reason behind the bottleneck is HW serialises the
transfer of all SQEs, which seeks timestamp capture, on the same
send DMA path. Hence only those packets which requires timestamp
capture should set SETTSTAMP in send mem alg.
With this patch timestamping would be done only for those packets
with PKT_TX_IEEE1588_TMST set.

Fixes: fb3ae0951abd ("net/octeontx2: support Tx")
Fixes: 8980a153006b ("event/octeontx2: support PTP for SSO")

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
5 years agonet/octeontx2: fix PTP enable via Rx offload flags
Harman Kalra [Sat, 27 Jul 2019 13:56:22 +0000 (13:56 +0000)]
net/octeontx2: fix PTP enable via Rx offload flags

Earlier implementation for enabling ptp via RX offload flag was
causing segmentation fault as it was getting executed in the
device configuration stage where RX and TX queues were not
configured. As in the ptp enable process rx queues are used for
mbuf setup while tx queues are used for send descriptor setup.
Moving the logic in dev start as all the resources will be
configured.

Fixes: b5dc3140448e ("net/octeontx2: support base PTP")

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
5 years agonet/octeontx2: fix indirect mbuf handling during Tx
Sunil Kumar Kori [Thu, 25 Jul 2019 08:20:59 +0000 (13:50 +0530)]
net/octeontx2: fix indirect mbuf handling during Tx

Multi segmented packet may be spliced with indirect mbufs also.
Currently driver causes buffer leak for indirect mbufs as they
were not being freed to packet pool.

Patch fixes handling of indirect mbufs for following use cases
- packet contains all indirect mbufs only.
- packet contains mixed mbufs i.e. direct and indirect both.

Fixes: cbd5710db48d ("net/octeontx2: add Tx multi segment version")

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
5 years agonet/vhost: do not count unsent packets as errors
David Marchand [Fri, 26 Jul 2019 10:21:28 +0000 (12:21 +0200)]
net/vhost: do not count unsent packets as errors

missed_pkts reflects the number of packets that the driver did not manage
to send.
This is a temporary situation, those packets are not freed and the
application can still retry to send them later.
Hence, we can't count them as transmit failed.

Fixes: 5f05e95cd5d9 ("net/vhost: fix Tx error counting")
Fixes: ee584e9710b9 ("vhost: add driver on top of the library")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
5 years agonet/ring: do not count unsent packets as errors
David Marchand [Fri, 26 Jul 2019 10:21:27 +0000 (12:21 +0200)]
net/ring: do not count unsent packets as errors

err_pkts reflects the number of packets that the driver did not manage
to send.
This is a temporary situation, those packets are not freed and the
application can still retry to send them later.
Hence, we can't count them as transmit failed.

Fixes: e1e4017751f1 ("ring: add new driver")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet/memif: do not count unsent packets as errors
David Marchand [Fri, 26 Jul 2019 10:21:26 +0000 (12:21 +0200)]
net/memif: do not count unsent packets as errors

n_err reflects the number of packets that the driver did not manage to
send.
This is a temporary situation, those packets are not freed and the
application can still retry to send them later.
Hence, we can't count them as transmit failed.

Fixes: 09c7e63a71f9 ("net/memif: introduce memory interface PMD")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet/kni: do not count unsent packets as errors
David Marchand [Fri, 26 Jul 2019 10:21:25 +0000 (12:21 +0200)]
net/kni: do not count unsent packets as errors

err_pkts reflects the number of packets that the driver did not manage to
send.
This is a temporary situation, those packets are not freed and the
application can still retry to send them later.
Hence, we can't count them as transmit failed.

Fixes: 75e2bc54c018 ("net/kni: add KNI PMD")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet/kni: remove unused Rx error counter
David Marchand [Fri, 26 Jul 2019 10:21:24 +0000 (12:21 +0200)]
net/kni: remove unused Rx error counter

The delta between what the application asked to receive and what was
indeed received, can not be called an error counter.
This counter is not reported anywhere, remove it.

Fixes: 75e2bc54c018 ("net/kni: add KNI PMD")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet/virtio: remove unused Tx error counter
David Marchand [Fri, 26 Jul 2019 10:21:23 +0000 (12:21 +0200)]
net/virtio: remove unused Tx error counter

This Tx counter has never been used.

Fixes: 9658d17da27b ("virtio: maintain stats per queue")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
5 years agonet/null: remove unused Tx error counter
David Marchand [Fri, 26 Jul 2019 10:21:22 +0000 (12:21 +0200)]
net/null: remove unused Tx error counter

This Tx counter has never been used.

Fixes: c743e50c475f ("null: new poll mode driver")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet/af_xdp: remove unused Tx counter
David Marchand [Fri, 26 Jul 2019 10:21:21 +0000 (12:21 +0200)]
net/af_xdp: remove unused Tx counter

This Tx counter is now unused.

Fixes: 10edf857fde4 ("net/af_xdp: make reserve/submit peek/release consistent")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
5 years agonet/af_packet: remove unused Rx counter
David Marchand [Fri, 26 Jul 2019 10:21:20 +0000 (12:21 +0200)]
net/af_packet: remove unused Rx counter

This Rx counter has never been used.

Fixes: 364e08f2bbc0 ("af_packet: add PMD for AF_PACKET-based virtual devices")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet/ixgbe: fix RETA size for VF
Wei Zhao [Fri, 26 Jul 2019 01:38:28 +0000 (09:38 +0800)]
net/ixgbe: fix RETA size for VF

Filling correct RETA table size at ixgbevf_dev_info_get,
so RETA table update will be supported for VF port.
For X540_vf and 82599_vf, since they don't support
RETA table update, set RETA size to 0.

Fixes: 2144f6630fca ("ixgbe: add redirection table size in device info")
Cc: stable@dpdk.org
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
5 years agonet/i40e: fix double flow mark action check
Mesut Ali Ergin [Thu, 25 Jul 2019 21:50:49 +0000 (14:50 -0700)]
net/i40e: fix double flow mark action check

This commit fixes an issue with the error checking in flow
MARK action. Previously, (ANY + MARK) would fail, as the
(mark_spec == 0) condition would cause an early error return,
however really it is (mark_spec != 0) that should cause the
early error return.

Flipping the binary comparison corrects the behaviour, and
(ANY + MARK) now succeeds, while (MARK + MARK) fails.

Fixes: 0bbcfc706a2b ("net/i40e: support MARK and RSS flow action")

Suggested-by: Harry van Haaren <harry.van.haaren@intel.com>
Signed-off-by: Mesut Ali Ergin <mesut.a.ergin@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
5 years agonet/iavf: fix endless loop
Qi Zhang [Thu, 25 Jul 2019 04:38:29 +0000 (12:38 +0800)]
net/iavf: fix endless loop

Change loop index from uint16_t to uint32_t since max
index 65535 could be exceeded when ring size is 2k+.

Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")
Cc: stable@dpdk.org
Reported-by: Lei Yao <lei.a.yao@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
5 years agonet/pcap: fix concurrent multiseg Tx
David Marchand [Thu, 25 Jul 2019 19:24:19 +0000 (21:24 +0200)]
net/pcap: fix concurrent multiseg Tx

Two cores can send multi segment packets on two different pcap ports.
Because of this, we can't have one single buffer to linearize packets.

Use rte_pktmbuf_read() to copy the packet into a buffer on the stack
and remove eth_pcap_gather_data() when necessary (if the mbuf is
contiguous, rte_pktmbuf_read() just points at the buffer address).

Fixes: 6db141c91e1f ("pcap: support jumbo frames")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet/pcap: fix Tx return count in error conditions
David Marchand [Thu, 25 Jul 2019 19:24:18 +0000 (21:24 +0200)]
net/pcap: fix Tx return count in error conditions

When a packet cannot be transmitted, the driver is supposed to free this
packet and report it as handled.
This is to prevent the application from retrying to send the same packet
and ending up in a liveloop since the driver will never manage to send
it.

Fixes: 49a0a2ffd5db ("net/pcap: fix possible mbuf double freeing")
Fixes: 6db141c91e1f ("pcap: support jumbo frames")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet/pcap: fix Rx with small buffers
David Marchand [Thu, 25 Jul 2019 19:24:17 +0000 (21:24 +0200)]
net/pcap: fix Rx with small buffers

If the pkt pool contains only buffers smaller than the default headroom,
then the driver will compute an invalid buffer size (negative value cast
to an uint16_t).
Rely on the mbuf api to check how much space is available in the mbuf.

Fixes: 6eb0ae218a98 ("pcap: fix mbuf allocation")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet/bnxt: reduce verbosity of a message
Kalesh AP [Thu, 25 Jul 2019 04:59:49 +0000 (10:29 +0530)]
net/bnxt: reduce verbosity of a message

Change verbosity of a message to DEBUG from ERROR.
This is just debug message.

Fixes: 3e92fd4e4ec0 ("net/bnxt: use dynamic log type")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
5 years agonet/bnxt: fix endianness
Kalesh AP [Thu, 25 Jul 2019 04:59:48 +0000 (10:29 +0530)]
net/bnxt: fix endianness

Use rte_cpu_to_le_16/32 while parsing the hwrm command response.

Fixes: 11e5e19695c7 ("net/bnxt: support redirecting tunnel packets to VF")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
5 years agonet/bnxt: fix tunnel redirect commands
Kalesh AP [Thu, 25 Jul 2019 04:59:47 +0000 (10:29 +0530)]
net/bnxt: fix tunnel redirect commands

Modified to send the tunnel redirect commands to Chimp HWRM channel as
Kong does not support these commands.

Fixes: 11e5e19695c7 ("net/bnxt: support redirecting tunnel packets to VF")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
5 years agonet/bnxt: fix extended port counter statistics
Santoshkumar Karanappa Rastapur [Thu, 25 Jul 2019 04:59:46 +0000 (10:29 +0530)]
net/bnxt: fix extended port counter statistics

We were trying to fill in more rx extended stats than the size allocated
for stats causing segfault. Fixed this by adding an explicit check.
Rearranged the code to return statistic values in xstats_get as per the
names returned in xstats_get_names.

Fixes: f55e12f33416 ("net/bnxt: support extended port counters")
Cc: stable@dpdk.org
Signed-off-by: Rahul Gupta <rahul.gupta@broadcom.com>
Signed-off-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
5 years agonet/bnxt: use dedicated CPR for async events
Lance Richardson [Wed, 24 Jul 2019 16:49:32 +0000 (12:49 -0400)]
net/bnxt: use dedicated CPR for async events

This commit enables the creation of a dedicated completion
ring for asynchronous event handling instead of handling these
events on a receive completion ring.

For the stingray platform and other platforms needing tighter
control of resource utilization, we retain the ability to
process async events on a receive completion ring.

For Thor-based adapters, we use a dedicated NQ (notification
queue) ring for async events (async events can't currently
be received on a completion ring due to a firmware limitation).

Rename "def_cp_ring" to "async_cp_ring" to better reflect its
purpose (async event notifications) and to avoid confusion with
VNIC default receive completion rings.

Allow rxq 0 to be stopped when not being used for async events.

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
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/sfc: unify power of 2 alignment check macro
Andrew Rybchenko [Wed, 24 Jul 2019 13:16:34 +0000 (14:16 +0100)]
net/sfc: unify power of 2 alignment check macro

Substitute driver-defined IS_P2ALIGNED() with EFX_IS_P2ALIGNED()
defined in libefx.

Add type argument and cast value and alignment to one specified type.

Fixes: e1b944598579 ("net/sfc: build libefx")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
5 years agonet/sfc: fix align to power of 2 when align has smaller type
Andrew Rybchenko [Wed, 24 Jul 2019 13:16:33 +0000 (14:16 +0100)]
net/sfc: fix align to power of 2 when align has smaller type

Substitute driver-defined P2ALIGN() with EFX_P2ALIGN() defined in
libefx.

Cast value and alignment to one specified type to guarantee result
correctness.

Fixes: e1b944598579 ("net/sfc: build libefx")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
5 years agonet/sfc: fix power of 2 round up when align has smaller type
Andrew Rybchenko [Wed, 24 Jul 2019 13:16:32 +0000 (14:16 +0100)]
net/sfc: fix power of 2 round up when align has smaller type

Substitute driver-defined P2ROUNDUP() h with EFX_P2ROUNDUP()
defined in libefx.

Cast value and alignment to one specified type to guarantee result
correctness.

Fixes: e1b944598579 ("net/sfc: build libefx")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
5 years agonet/i40e: replace license text with SPDX tag
Xiaolong Ye [Wed, 24 Jul 2019 11:30:41 +0000 (19:30 +0800)]
net/i40e: replace license text with SPDX tag

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: David Christensen <drc@linux.vnet.ibm.com>
5 years agonet/e1000: replace license text with SPDX tag
Xiaolong Ye [Wed, 24 Jul 2019 11:30:40 +0000 (19:30 +0800)]
net/e1000: replace license text with SPDX tag

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
5 years agonet/fm10k: replace license text with SPDX tag
Xiaolong Ye [Wed, 24 Jul 2019 11:30:39 +0000 (19:30 +0800)]
net/fm10k: replace license text with SPDX tag

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
5 years agonet/iavf: replace license text with SPDX tag
Xiaolong Ye [Wed, 24 Jul 2019 11:30:38 +0000 (19:30 +0800)]
net/iavf: replace license text with SPDX tag

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
5 years agonet/mlx5: fix Rx queue release of resources
Dekel Peled [Wed, 24 Jul 2019 09:05:11 +0000 (12:05 +0300)]
net/mlx5: fix Rx queue release of resources

Function rxq_release_rq_resources() releases resources of RQ object
created by DevX API.

This patch updates this function to properly clear the released
resources, to avoid repeated release of the same resource.

Fixes: dc9ceff73c99 ("net/mlx5: create advanced RxQ via DevX")

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: fix doorbell release on Rx queue release
Dekel Peled [Wed, 24 Jul 2019 09:05:10 +0000 (12:05 +0300)]
net/mlx5: fix doorbell release on Rx queue release

Function mlx5_rxq_release() calls mlx5_release_dbr() to release the
doorbell allocated for this Rx queue.
This call is relevant only for Rx queue objects created using
DevX API.

This patch adds the required check, to call mlx5_release_dbr()
only when relevant.
It also updates mlx5_release_dbr() to use the input offset correctly.

Fixes: dc9ceff73c99 ("net/mlx5: create advanced RxQ via DevX")

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/ice: fix VXLAN/NVGRE flow matching
Ying A Wang [Tue, 23 Jul 2019 23:20:59 +0000 (07:20 +0800)]
net/ice: fix VXLAN/NVGRE flow matching

For VXLAN/NVGRE packet, vni/tni should be included in the matching
keys. This patch fixes this issue.

Fixes: d76116a4678f ("net/ice: add generic flow API")

Signed-off-by: Ying A Wang <ying.a.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
5 years agonet/ice: remove type cast in Rx/Tx ring setup
Haiyue Wang [Wed, 24 Jul 2019 00:52:25 +0000 (08:52 +0800)]
net/ice: remove type cast in Rx/Tx ring setup

The memzone's start virtual address pointer (addr) is of type void *,
no need to add type cast.

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
5 years agonet/i40e: fix RSS hash update for X722 VF
Peng Huang [Mon, 22 Jul 2019 13:50:28 +0000 (13:50 +0000)]
net/i40e: fix RSS hash update for X722 VF

This patch fixes X722 VF problem when received packet don't have
HASH value.
1) Packet classifier types update should support X722 VF, not only
 for X722 PF;
2) MAC type is invalid for X722 VF when set packet classifier type,
so move it after MAC type is set correctly;

Fixes: a286ebeb0714 ("net/i40e: add dynamic mapping of SW flow types to HW pctypes")
Cc: stable@dpdk.org
Signed-off-by: Peng Huang <peng.huang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
5 years agonet/i40e: fix request queue in VF
Tao Zhu [Wed, 24 Jul 2019 08:32:54 +0000 (16:32 +0800)]
net/i40e: fix request queue in VF

When the VF configuration is larger than the number of queues reserved
by PF, VF sends the request queue command through admin queue. When PF
received this command, it may reset the VF and send a notification
before resetting. If this notification is read by the timed task alarm,
Task request queue will lost notification. This patch prevents two
tasks from running simultaneously.

Fixes: ee653bd80044 ("net/i40e: determine number of queues per VF at run time")
Cc: stable@dpdk.org
Signed-off-by: Tao Zhu <taox.zhu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
5 years agonet/ice/base: fix bitmap and/or routines
Qi Zhang [Tue, 23 Jul 2019 03:51:15 +0000 (11:51 +0800)]
net/ice/base: fix bitmap and/or routines

There was an issue with ice_and_bitmap and ice_or_bitmap when
dealing with bit array sizes that are not even multiples of 32,
where some of relevant bits in the highest 32 bits were being
cleared. This patch fixes those problems.

Fixes: c9e37832c95f ("net/ice/base: rework on bit ops")
Cc: stable@dpdk.org
Signed-off-by: Dan Nowlin <dan.nowlin@intel.com>
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: Qiming Yang <qiming.yang@intel.com>
5 years agonet/ice/base: cleanup hardware register macros
Qi Zhang [Tue, 23 Jul 2019 03:51:14 +0000 (11:51 +0800)]
net/ice/base: cleanup hardware register macros

Cleanup hardware registers macros in ice_auto_generator.h.

Fixes: 51c7f09f3f81 ("net/ice/base: add registers for Intel E800 Series NIC")
Cc: stable@dpdk.org
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: Qiming Yang <qiming.yang@intel.com>
5 years agonet/ice/base: use macro instead of function name
Qi Zhang [Tue, 23 Jul 2019 03:51:13 +0000 (11:51 +0800)]
net/ice/base: use macro instead of function name

use __func__ instead of function name in ice_debug calls.

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: Qiming Yang <qiming.yang@intel.com>
5 years agonet/ice/base: fix packet type size
Qi Zhang [Tue, 23 Jul 2019 03:51:12 +0000 (11:51 +0800)]
net/ice/base: fix packet type size

Change ptype variable to correctly be 16-bits in ice_prof_map
structure.

Fixes: 51d04e4933e3 ("net/ice/base: add flexible pipeline module")
Cc: stable@dpdk.org
Signed-off-by: Dan Nowlin <dan.nowlin@intel.com>
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: Qiming Yang <qiming.yang@intel.com>
5 years agonet/ice/base: fix resource leak
Qi Zhang [Tue, 23 Jul 2019 03:51:11 +0000 (11:51 +0800)]
net/ice/base: fix resource leak

We don't free s_rule if ice_aq_sw_rules() returns a non-zero status. If
it returned a zero status, s_rule would be freed right after, so this
implies it should be freed within the scope of the function regardless.

Fixes: c7dd15931183 ("net/ice/base: add virtual switch code")
Cc: stable@dpdk.org
Signed-off-by: Jeb Cramer <jeb.j.cramer@intel.com>
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: Qiming Yang <qiming.yang@intel.com>
5 years agonet/ice/base: fix inner TCP and UDP support for GRE
Qi Zhang [Tue, 23 Jul 2019 03:51:10 +0000 (11:51 +0800)]
net/ice/base: fix inner TCP and UDP support for GRE

The dummy packets for GRE were set up for IP, but not inner
TCP or UDP. There are some applications that want to be
able to parse on those inner L4 headers so add them to
the dummy packets.

Also, the GRE dummy packet was formatted differently from
the other dummy packets so change the formatting to match
all the other dummy packets.

Fixes: 839c0a4b77e6 ("net/ice/base: enable additional switch rules")

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: Qiming Yang <qiming.yang@intel.com>
5 years agonet/e1000: fix i219 hang on reset/close
Xiao Zhang [Mon, 22 Jul 2019 15:11:52 +0000 (23:11 +0800)]
net/e1000: fix i219 hang on reset/close

Unit hang may occur if multiple descriptors are available in the rings
during reset or close. This state can be detected by configure status
by bit 8 in register. If the bit is set and there are pending
descriptors in one of the rings, we must flush them before reset or
close.

Fixes: 805803445a02 ("e1000: support EM devices (also known as e1000/e1000e)")
Cc: stable@dpdk.org
Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
5 years agocompressdev: clarify destination buffer size
Fiona Trahe [Thu, 25 Jul 2019 17:04:09 +0000 (18:04 +0100)]
compressdev: clarify destination buffer size

Clarify the corner case with incompressible data
whereby the output can actually be greater than the
uncompressed data.

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Shally Verma <shallyv@marvell.com>
5 years agosecurity: remove duplicated symbols from map file
Ferruh Yigit [Fri, 26 Jul 2019 14:10:19 +0000 (15:10 +0100)]
security: remove duplicated symbols from map file

Fixes: f63ffee26f9c ("security: restore experimental tag for unimplemented APIs")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agocryptodev: fix typo in comment
Ferruh Yigit [Fri, 26 Jul 2019 13:42:23 +0000 (14:42 +0100)]
cryptodev: fix typo in comment

Remove extra ';' which is probably added unintentionally, reported by
./devtools/check-includes.sh script.

Fixes: 26008aaed14c ("cryptodev: add asymmetric xform and op definitions")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agodoc: update release notes for IPsec
Bernard Iremonger [Fri, 26 Jul 2019 13:42:19 +0000 (14:42 +0100)]
doc: update release notes for IPsec

Update release notes for recently supported features in IPsec library and
IPsec Security Gateway application.

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agotest/crypto: improve asymmetric setup
Ayuj Verma [Wed, 24 Jul 2019 10:27:01 +0000 (15:57 +0530)]
test/crypto: improve asymmetric setup

Improve logic:
  * to get list of valid devices based on driver id so that to
    eliminate unnecessary if check for driver id match in device loop
  * loop till 1st device supporting asymmetric feature is found unlike
    previous logic which breaks on 1st device

Signed-off-by: Kanaka Durga Kotamarthy <kkotamarthy@marvell.com>
Signed-off-by: Ayuj Verma <ayverma@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agocompress/zlib: fix error handling
Adam Dybkowski [Wed, 24 Jul 2019 08:42:46 +0000 (10:42 +0200)]
compress/zlib: fix error handling

Add missing return after setting the error status in case of
invalid flush_flag in the operation.
The issue was found by the coverity scan as the fin_flush variable,
not initialized in such case, was used later in the flow.

Coverity issue: 340859
Fixes: c7b436ec95fd ("compress/zlib: support burst enqueue/dequeue")
Cc: stable@dpdk.org
Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
5 years agoapp/compress-perf: prevent output buffer overflow
Adam Dybkowski [Tue, 23 Jul 2019 09:53:28 +0000 (11:53 +0200)]
app/compress-perf: prevent output buffer overflow

This patch fixes the issue of memory overwrite after the end of
the output buffer by calculating its size as the number of all
segments multipled by the output segment size.
Additionally buffer overflow errors returned by PMD driver are
detected and shown, ending the test.

Also the output buffer size multiplier was increased from 105%
to 110% to allow running the tests on noncompressible files that
expand to over 107% of original size during the compression.

The changes were made in the verification part of the flow and
they don't affect the benchmark results.

Fixes: 424dd6c8c1 ("app/compress-perf: add weak functions for multicore test")

Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
5 years agoapp/compress-perf: improve results report
Artur Trybula [Wed, 24 Jul 2019 13:55:15 +0000 (15:55 +0200)]
app/compress-perf: improve results report

This patch adds extra features to the compress performance
test. Some important parameters (memory allocation,
number of ops, number of segments) are calculated and
printed out.
Information about threads, cores, devices and queue-pairs
is also printed.

Signed-off-by: Artur Trybula <arturx.trybula@intel.com>
Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
5 years agoapp/crypto-perf: disable asymmetric crypto
Anoob Joseph [Wed, 24 Jul 2019 09:04:19 +0000 (14:34 +0530)]
app/crypto-perf: disable asymmetric crypto

Asymmetric crypto is not required for test-crypto-perf application.
Disabling the feature using 'ff_disable' field.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Shally Verma <shallyv@marvell.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
5 years agotest/compress: fix some checks
Adam Dybkowski [Tue, 23 Jul 2019 10:53:49 +0000 (12:53 +0200)]
test/compress: fix some checks

CID 340857: Null pointer dereferences (NULL_RETURNS)
CID 340856: (CONSTANT_EXPRESSION_RESULT)

Coverity issue: 340856, 340857
Fixes: 3be12ea52ad8 ("test/compress: improve debug trace setup")
Cc: stable@dpdk.org
Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
5 years agoversion: 19.08-rc2
Thomas Monjalon [Tue, 23 Jul 2019 21:39:37 +0000 (23:39 +0200)]
version: 19.08-rc2

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
5 years agoraw/ioat: fix include quotes
Bruce Richardson [Tue, 23 Jul 2019 16:26:48 +0000 (17:26 +0100)]
raw/ioat: fix include quotes

Some builds with clang report an error because '<>' rather than '""' were
used for including the ioat spec header file.

  Target: x86_64-native-bsdapp-clang
  error: 'rte_ioat_spec.h' file not found with <angled> include; use "quotes" instead
  #include <rte_ioat_spec.h>
           ^~~~~~~~~~~~~~~~~
           "rte_ioat_spec.h"
  1 error generated.

Since this file should always be in the same directory as the main header,
we can safely change the include line to fix this error.

Fixes: abff4333ec20 ("raw/ioat: create device on probe and destroy on release")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
5 years agovfio: use contiguous mapping for IOVA as VA mode
Anatoly Burakov [Tue, 23 Jul 2019 10:01:20 +0000 (11:01 +0100)]
vfio: use contiguous mapping for IOVA as VA mode

When using IOVA as VA mode, there is no need to map segments
page by page. This normally isn't a problem, but it becomes one
when attempting to use DPDK in no-huge mode, where VFIO subsystem
simply runs out of space to store mappings.

Fix this for x86 by triggering different callbacks based on whether
IOVA as VA mode is enabled.

Fixes: 73a639085938 ("vfio: allow to map other memory regions")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Tested-by: Andrius Sirvys <andrius.sirvys@intel.com>
5 years agoethdev: avoid getting uninitialized info for bad port
Andrew Rybchenko [Tue, 23 Jul 2019 12:11:21 +0000 (13:11 +0100)]
ethdev: avoid getting uninitialized info for bad port

rte_eth_dev_info_get() returns void and caller does know if the function
does its job or not. Changing of the return value to int would be
API/ABI breakage which requires deprecation process and cannot be
backported to stable branches. For now, make sure that device info is
initialized even in the case of invalid port ID.

Fixes: a30268e9a2d0 ("ethdev: reset whole dev info structure before filling")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
5 years agonet/mlx5: fix NVGRE matching
Dekel Peled [Mon, 22 Jul 2019 15:36:50 +0000 (18:36 +0300)]
net/mlx5: fix NVGRE matching

NVGRE has a GRE header with c_rsvd0_ver value 0x2000 and protocol
value 0x6558.
These should be matched when item_nvgre is provided.

This patch adds validation function of NVGRE item.
It also updates the translate function of NVGRE item, to add the
required values, if they were not specified.

Original work by Xiaoyu Min <jackmin@mellanox.com>

Fixes: fc2c498ccb94 ("net/mlx5: add Direct Verbs translate items")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Xiaoyu Min <jackmin@mellanox.com>
5 years agonet/mlx5: adjust maximum LRO message size
Matan Azrad [Mon, 22 Jul 2019 14:52:24 +0000 (14:52 +0000)]
net/mlx5: adjust maximum LRO message size

LRO message is contained in the MPRQ strides.
While the LRO message size cannot be bigger than 65280 according to the
PRM, the strides which contain it may be bigger than the maximum buffer
size allowed in dpdk mbuf - 0xFFFF.

Adjust the maximum LRO message size to avoid buffer length overflow.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: zero LRO mbuf headroom
Matan Azrad [Mon, 22 Jul 2019 14:52:23 +0000 (14:52 +0000)]
net/mlx5: zero LRO mbuf headroom

LRO packet may consume all the stride memory, hence the PMD cannot
guaranty head-room for the LRO mbuf.

The issue is lack in HW support to write the packet in offset from the
stride start.

A new striding RQ feature may be added in CX6 DX to allow head-room and
tail-room for the LRO strides.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: handle LRO packets in Rx queue
Matan Azrad [Mon, 22 Jul 2019 14:52:22 +0000 (14:52 +0000)]
net/mlx5: handle LRO packets in Rx queue

When LRO offload is configured in Rx queue, the HW may coalesce TCP
packets from same TCP connection into single packet.

In this case the SW should fix the relevant packet headers because the
HW doesn't update them according to the new created packet
characteristics.

Add update header code to the mprq Rx burst function to support LRO
feature.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: update LRO fields in completion entry
Matan Azrad [Mon, 22 Jul 2019 14:52:21 +0000 (14:52 +0000)]
net/mlx5: update LRO fields in completion entry

Update the CQE structure to include LRO fields.

Some reserved values were changed, hence also data-path code used the
reserved values were updated accordingly.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: replace external mbuf shared memory
Matan Azrad [Mon, 22 Jul 2019 14:52:20 +0000 (14:52 +0000)]
net/mlx5: replace external mbuf shared memory

As an arrangement to the LRO support when a packet can consume all the
stride memory, the external mbuf shared information cannot be anymore
in the end of the stride, because the HW may write the packet data to
all the stride memory.

Move the shared information memory from the stride to the control
memory of the external mbuf.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: support LRO with single RxQ object
Dekel Peled [Mon, 22 Jul 2019 14:52:19 +0000 (14:52 +0000)]
net/mlx5: support LRO with single RxQ object

Implement LRO support using a single RQ object per DPDK RxQ.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: create advanced RxQ via DevX
Dekel Peled [Mon, 22 Jul 2019 14:52:18 +0000 (14:52 +0000)]
net/mlx5: create advanced RxQ via DevX

Function mlx5_rxq_obj_new(), previously called mlx5_rxq_ibv_new(),
supports creating Rx queue objects using verbs.
This patch expands the relevant functions, to support creating
verbs or DevX Rx queue objects:
Function mlx5_rxq_obj_new() updated to create RQ object using DevX.
Function mlx5_ind_table_obj_new() updated to create RQT object using DevX.
Function mlx5_hrxq_new() updated to create TIR object using DevX.
New utility functions added to perform specific operations:
mlx5_devx_rq_new(),  mlx5_devx_wq_attr_fill(),
mlx5_devx_create_rq_attr_fill().

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: add function for Rx verbs work queue
Dekel Peled [Mon, 22 Jul 2019 14:52:17 +0000 (14:52 +0000)]
net/mlx5: add function for Rx verbs work queue

Verbs WQ for RxQ is created inside function mlx5_rxq_obj_new().
This patch moves the creation of verbs WQ to dedicated function
mlx5_ibv_wq_new().

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: add function for Rx verbs completion queue
Dekel Peled [Mon, 22 Jul 2019 14:52:16 +0000 (14:52 +0000)]
net/mlx5: add function for Rx verbs completion queue

Verbs CQ for RxQ is created inside function mlx5_rxq_obj_new().
This patch moves the creation of CQ to dedicated function
mlx5_ibv_cq_new().

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: store protection domain number on create
Dekel Peled [Mon, 22 Jul 2019 14:52:15 +0000 (14:52 +0000)]
net/mlx5: store protection domain number on create

Function mlx5_alloc_shared_ibctx() allocates Protection Domain using
verbs API, as part of shared IB device context.
This patch adds reading and storing of pdn value from the created PD
object, using DV API.
The pdn value is required when creating WQ using DevX API.

This patch also updates function flow_dv_create_counter_stat_mem_mng()
which uses the pdn value as well.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: update queue state modify for DevX
Dekel Peled [Mon, 22 Jul 2019 14:52:14 +0000 (14:52 +0000)]
net/mlx5: update queue state modify for DevX

Function mlx5_queue_state_modify_primary() was implemented to handle
state change for queues created using Verbs API.

This patch update function mlx5_queue_state_modify_primary() to
support state change of RQ object created using DevX API.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: rename hash RxQ verbs to general
Dekel Peled [Mon, 22 Jul 2019 14:52:13 +0000 (14:52 +0000)]
net/mlx5: rename hash RxQ verbs to general

Prepare for introducing use of DevX TIR object.
Hash Rx queue is currently created using verbs QP only.
The next patches will add the option to create it with a TIR object
using DevX.
This patch renames hrxq_ibv to hrxq wherever relevant, and adds
the DevX items to relevant structs.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: rename verbs indirection table to obj
Dekel Peled [Mon, 22 Jul 2019 14:52:12 +0000 (14:52 +0000)]
net/mlx5: rename verbs indirection table to obj

Prepare for introducing of DevX RQT object.
Rx indirection table object is currently created using verbs only.
The next patches will add the option to create an RQT object using
DevX.
This patch renames ind_table_ibv to ind_table_obj wherever relevant,
and adds the DevX items to relevant structs.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: rename RxQ verbs to general RxQ object
Dekel Peled [Mon, 22 Jul 2019 14:52:11 +0000 (14:52 +0000)]
net/mlx5: rename RxQ verbs to general RxQ object

Prepare for introducing of DevX RxQ object.
RxQ object is currently created using verbs only.
The next patches will add the option to create RxQ object using DevX.
This patch renames rxq_ibv to rxq_obj wherever relevant, and adds the
DevX items to relevant structs.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: allocate door-bells via DevX
Dekel Peled [Mon, 22 Jul 2019 14:52:10 +0000 (14:52 +0000)]
net/mlx5: allocate door-bells via DevX

When using DevX API, memory for door-bell records should be allocated
by PMD and registered using DevX API.

This patch implements the utility functions to support it:
- Add struct mlx5_devx_dbr_page, containing door-bells page data.
- Add list of struct mlx5_devx_dbr_page door-bell pages to device
  private data.
- Implement function mlx5_alloc_dbr_page() to allocate page for
  door-bell records, and register it using DevX API.
- Implement function mlx5_get_dbr(). to acquire a door-bell record
  from the door-bells page, allocating a new page if needed.
- Implement function mlx5_release_dbr() to release a door-bell
  record that is no longer needed, freeing the containing page if
  it becomes empty.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: create advanced RxQ table via DevX
Dekel Peled [Mon, 22 Jul 2019 14:52:09 +0000 (14:52 +0000)]
net/mlx5: create advanced RxQ table via DevX

Implement function mlx5_devx_cmd_create_rqt() to create RQT
object using DevX API.
Add related structs in mlx5.h and mlx5_prm.h.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: create advanced Rx object via DevX
Dekel Peled [Mon, 22 Jul 2019 14:52:08 +0000 (14:52 +0000)]
net/mlx5: create advanced Rx object via DevX

Implement function mlx5_devx_cmd_create_tir() to create TIR
object using DevX API..
Add related structs in mlx5.h and mlx5_prm.h.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: modify advanced RxQ object via DevX
Dekel Peled [Mon, 22 Jul 2019 14:52:07 +0000 (14:52 +0000)]
net/mlx5: modify advanced RxQ object via DevX

Implement function mlx5_devx_cmd_modify_rq() to modify RQ.
Add related structs in mlx5.h and mlx5_prm.h.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: create advanced RxQ object via DevX
Dekel Peled [Mon, 22 Jul 2019 14:52:06 +0000 (14:52 +0000)]
net/mlx5: create advanced RxQ object via DevX

Implement function mlx5_devx_cmd_create_rq() to create RQ object using
DevX API.
Add related structs in mlx5.h and mlx5_prm.h.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: update Tx queue create for LRO
Dekel Peled [Mon, 22 Jul 2019 14:52:05 +0000 (14:52 +0000)]
net/mlx5: update Tx queue create for LRO

Update function mlx5_txq_ibv_new(), query and store the TIS
transport domain value.
It is required later on Rx side when creating matching TIR.
Add field in mlx5 data structure to store Transport Domain ID.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: support Tx interface query via DevX
Dekel Peled [Mon, 22 Jul 2019 14:52:04 +0000 (14:52 +0000)]
net/mlx5: support Tx interface query via DevX

Implement function mlx5_devx_cmd_qp_tis_td_query(), to query
QP TIS Transport Domain value.

Add related structs in mlx5_prm.h.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: check conditions to enable LRO
Dekel Peled [Mon, 22 Jul 2019 14:52:03 +0000 (14:52 +0000)]
net/mlx5: check conditions to enable LRO

Use DevX API to read device LRO capabilities.
Check if LRO is supported and can be enabled.
Check if MPRQ is supported and can be used.
Enable MPRQ for LRO use if not enabled by user.
Added note for mlx5_mprq_enabled(), to emphasize that LRO
enables MPRQ.
Disable CQE compression and CRC stripping if LRO is enabled.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: add glue for create action via DevX
Dekel Peled [Mon, 22 Jul 2019 14:52:02 +0000 (14:52 +0000)]
net/mlx5: add glue for create action via DevX

Add compile option HAVE_MLX5DV_DR_ACTION_DEST_DEVX_TIR, and matching
dest_tir flag in device configuration structure.
Add glue function pointer dv_create_flow_action_dest_devx_tir, and
function mlx5_glue_dv_create_flow_action_dest_devx_tir(),
to invoke API mlx5dv_dr_action_create_dest_devx_tir();

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: add glue for queue query via DevX
Dekel Peled [Mon, 22 Jul 2019 14:52:01 +0000 (14:52 +0000)]
net/mlx5: add glue for queue query via DevX

Add function mlx5_glue_devx_qp_query().
Add glue function pointer devx_qp_query to run it.
Glue version updated to 19.08.0.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: query LRO capabilities via DevX
Dekel Peled [Mon, 22 Jul 2019 14:52:00 +0000 (14:52 +0000)]
net/mlx5: query LRO capabilities via DevX

Update function mlx5_devx_cmd_query_hca_attr() to query HCA
capabilities related to LRO.

Add relevant structs in drivers/net/mlx5/mlx5_prm.h.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: introduce LRO
Dekel Peled [Mon, 22 Jul 2019 14:51:59 +0000 (14:51 +0000)]
net/mlx5: introduce LRO

Add command-line argument to set LRO session timeout.
Add LRO settings struct in PMD configuration struct.
Add support of LRO offload in port configuration.
Add macros and function to check if LRO is supported and enabled.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: remove redundant item from union
Dekel Peled [Mon, 22 Jul 2019 14:51:58 +0000 (14:51 +0000)]
net/mlx5: remove redundant item from union

A variable of type struct ibv_cq_ex is declared in 2 unions, but
isn't used.
This patch removes the 2 redundant declarations.

Fixes: 6218063b39a6 ("net/mlx5: refactor Rx data path")
Fixes: 1d88ba171942 ("net/mlx5: refactor Tx data path")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agoapp/testpmd: fix MAC address parser for flow rule
Ferruh Yigit [Mon, 22 Jul 2019 16:58:32 +0000 (17:58 +0100)]
app/testpmd: fix MAC address parser for flow rule

MAC address parsing was causing failure [1],
this patch partially reverts the commit
commit b5ddce8959b2 ("app/testpmd: use new ethernet address parser")

[1]
testpmd> flow validate 0  priority  2 ingress group 0 pattern eth dst
is 98:03:9B:5C:D9:00 / end actions queue index  0 / end
Bad arguments

Fixes: b5ddce8959b2 ("app/testpmd: use new ethernet address parser")

Reported-by: Raslan Darawsheh <rasland@mellanox.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Tested-by: Raslan Darawsheh <rasland@mellanox.com>
5 years agonet/i40e: fix flow director rule destroy
Xiaolong Ye [Mon, 22 Jul 2019 12:06:38 +0000 (20:06 +0800)]
net/i40e: fix flow director rule destroy

We should tear down the fdir when the last flow is destroyed, current
logic is opposite to expected behavior, this patch fixes this issue.

Fixes: 2e67a7fbf3ff ("net/i40e: config flow director automatically")
Cc: stable@dpdk.org
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
5 years agonet/i40e: fix ethernet flow rule
Xiaolong Ye [Mon, 22 Jul 2019 12:06:37 +0000 (20:06 +0800)]
net/i40e: fix ethernet flow rule

i40e FDIR doesn't allow to create flow with empty spec and mask for
ethertype pattern. Without this patch, below flow would be created
successfully which is unexpected.

> flow create 0 ingress pattern eth / end actions drop / end

Fixes: 7d83c152a207 ("net/i40e: parse flow director filter")
Cc: stable@dpdk.org
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
5 years agonet/octeontx2: fix driver reconfiguration
Krzysztof Kanas [Mon, 22 Jul 2019 14:58:51 +0000 (16:58 +0200)]
net/octeontx2: fix driver reconfiguration

When configure returns error, e.g. in case not supported offloads
(outer ip and sctp) driver released Rx,Tx queues. Then in case of
correct configuration the driver could not start due to queues already
released but the driver thought it was configured correctly.

Secondly if driver returns error from configuration librte_ethdev will
release, rx queues and tx queues, without chaining driver configured
state.

Fix that by 'releasing' configuration and changing driver state when
error is returned from otx2_nix_configure.

Fixes: 548b5839a32b ("net/octeontx2: add device configure operation")

Signed-off-by: Krzysztof Kanas <kkanas@marvell.com>
Reviewed-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>