Nikhil Rao [Mon, 4 Jun 2018 12:55:17 +0000 (18:25 +0530)]
eventdev: fix Rx SW adapter stop
The Rx adapter stop call does not guarantee that the
SW service function will not execute after the
rte_event_eth_rx_adapter_stop() call.
Add a "started" flag to prevent the adapter from executing
if stop has been called.
Fixes:
9c38b704d280 ("eventdev: add eth Rx adapter implementation")
Cc: stable@dpdk.org
Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Nikhil Rao [Sun, 3 Jun 2018 14:10:46 +0000 (19:40 +0530)]
eventdev: fix internal port logic in Rx adapter
Set the internal_event_port flag when the ethdev-eventdev
packet transfer is implemented in hardware and add a check
for the flag to ignore the connection when setting up the
WRR polling sequence.
Fixes:
9c38b704d280 ("eventdev: add eth Rx adapter implementation")
Cc: stable@dpdk.org
Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Nikhil Rao [Sun, 3 Jun 2018 12:42:25 +0000 (18:12 +0530)]
eventdev: add event buffer flush in Rx adapter
Add an event buffer flush when the current invocation
of the Rx adapter is completed.
This patch provides lower latency in case there is a
BATCH_SIZE of events in the event buffer.
Cc: stable@dpdk.org
Suggested-by: Narender Vangati <narender.vangati@intel.com>
Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Nikhil Rao [Sun, 3 Jun 2018 11:41:08 +0000 (17:11 +0530)]
eventdev: fix missing update to Rx adaper WRR position
After dequeuing Rx packets and enqueueing them to the
temporary buffer towards eventdev, the packet Rx loop exits
if the temporary buffer is full but the current WRR position
is not saved.
Save away the current value of the WRR position, so packets
are dequeued from the correct Rx queue in the next invocation.
Fixes:
9c38b704d280 ("eventdev: add eth Rx adapter implementation")
Cc: stable@dpdk.org
Suggested-by: Gage Eads <gage.eads@intel.com>
Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Vipin Varghese [Mon, 21 May 2018 13:53:55 +0000 (19:23 +0530)]
test/eventdev: add multi-ports test
Add a new test to enhance the test suite, to allow multiple eth ports
rx queue to be added to rx bridge adapter. Update the test function to
reflect change of port index from 8 to 16 bit
Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
Acked-by: Nikhil Rao <nikhil.rao@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Jerin Jacob [Fri, 8 Jun 2018 03:32:27 +0000 (09:02 +0530)]
doc: fix octeontx eventdev selftest argument
Fixes:
3516327e00fd ("event/octeontx: add selftest to device arguments")
Cc: stable@dpdk.org
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Honnappa Nagarahalli [Wed, 6 Jun 2018 20:30:01 +0000 (15:30 -0500)]
doc: improve eventdev library guide
Add small amount of additional code, use consistent variable names
across code blocks, change the image to represent queues and
CPU cores intuitively. These help improve the eventdev library
documentation.
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Nikhil Rao [Tue, 22 May 2018 21:06:42 +0000 (02:36 +0530)]
eventdev: fix port in Rx adapter internal function
The dev_id parameter to fill_event_buffer() should be 16 bit,
also rename to to eth_dev_id to avoid confusion with event device
id elsewhere in the file.
Fixes:
c2189c907dd1 ("eventdev: make ethdev port identifiers 16-bit")
Cc: stable@dpdk.org
Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Stephen Hemminger [Wed, 13 Jun 2018 18:46:26 +0000 (11:46 -0700)]
net/mlx5: fix log initialization
The mlx5 driver had two init functions, but this could
cause log initialization to be done after the
other initialization. Also, the name of the function does
not match convention (cut/paste error?).
Fix by initializing log type first at start of the pmd_init.
This also gets rid of having two constructor functions.
Fixes:
a170a30d22a8 ("net/mlx5: use dynamic logging")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Xueming Li [Tue, 12 Jun 2018 11:38:11 +0000 (19:38 +0800)]
net/mlx5: fix crash in device probe
This patch initializes counter descriptor struct before invoking Verbs
api to avoid segmentation fault.
Fixes:
9a761de8ea14 ("net/mlx5: flow counter support")
Cc: stable@dpdk.org
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Adrien Mazarguil [Fri, 25 May 2018 16:15:36 +0000 (18:15 +0200)]
net/mlx5: fix error message in probe function
Error values passed to strerror() must be positive.
Fixes:
012ad9944dfc ("net/mlx5: fix probe return value polarity")
Cc: stable@dpdk.org
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Adrien Mazarguil [Thu, 24 May 2018 12:17:57 +0000 (14:17 +0200)]
net/mlx5: fix missing errno in probe function
Fixes:
b43802b4bdfe ("net/mlx5: support 16 hardware priorities")
Cc: stable@dpdk.org
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Adrien Mazarguil [Thu, 24 May 2018 12:17:55 +0000 (14:17 +0200)]
net/mlx5: fix errno object in probe function
Fixes:
a6d83b6a9209 ("net/mlx5: standardize on negative errno values")
Cc: stable@dpdk.org
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Adrien Mazarguil [Tue, 22 May 2018 15:37:01 +0000 (17:37 +0200)]
net/mlx5: remove limitation on number of instances
This artificial limitation was inherited from the mlx4 code base and has no
purpose other than adding unnecessary noise.
This patch is a port of commit
f2318196c71a ("net/mlx4: remove limitation
on number of instances").
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Adrien Mazarguil [Tue, 22 May 2018 15:36:59 +0000 (17:36 +0200)]
net/mlx4: fix minor resource leak during init
Temporary IB device context and list are not freed in case of a successful
initialization of the device.
This issue is caused by the two following commits, the first of which
causes initialization to return early, while the second one goes a bit
overboard while switching to negative errno values; an internal variable
(err) is needed to tell success from failure at the end of the function
since rte_errno is not reliable enough.
Fixes:
f2318196c71a ("net/mlx4: remove limitation on number of instances")
Fixes:
9d14b27308a0 ("net/mlx4: standardize on negative errno values")
Cc: stable@dpdk.org
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Haiyue Wang [Thu, 14 Jun 2018 03:09:49 +0000 (11:09 +0800)]
mbuf: fix typo in IPv6 macro comment
Comment should mention IPv6, not IPv4.
Fixes:
f295a00a2b44 ("mbuf: add definitions of unified packet types")
Cc: stable@dpdk.org
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Kiran Kumar [Wed, 23 May 2018 09:11:21 +0000 (14:41 +0530)]
net/bonding: fix MAC address reset
Currently when resetting bond mac address, we are getting the
persisted mac address from slave info considering primary port
as index. But we need to compare the port id from slave info
with the primary port to get the primary slave index and get
the persisted mac address. Without this fix, persisted mac addr
will be zero and rte_eth_dev_default_mac_addr_set will fail.
Fixes:
a45b288ef21a ("bond: support link status polling")
Cc: stable@dpdk.org
Signed-off-by: Kiran Kumar <kiran.kokkilagadda@caviumnetworks.com>
Maxime Coquelin [Thu, 7 Jun 2018 14:38:26 +0000 (16:38 +0200)]
vhost: use SMP memory barrier before kicking guest
vhost_vring_call() used rte_mb(), which translates into
mfence instruction on x86.
This patch changes to use rte_smp_mb(), which changed recently
to translate into a locked ADD instruction for performance
reason.
The measured gain is up to 3% with the testpmd benchmarks.
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
Tonghao Zhang [Wed, 13 Jun 2018 11:54:18 +0000 (04:54 -0700)]
vhost: introduce new function helper
Introduce an new common helper to avoid redundancy.
Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Tiwei Bie [Fri, 8 Jun 2018 03:22:24 +0000 (11:22 +0800)]
net/ifc: enable the host notifier support
The necessary vDPA ops have already been implemented
in ifcvf driver. So just need to announce the necessary
protocol features to enable the host notifier support.
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Acked-by: Xiao Wang <xiao.w.wang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Tiwei Bie [Fri, 8 Jun 2018 03:22:23 +0000 (11:22 +0800)]
vhost: support host notifier
When a vDPA device is attached, vhost user will try to
register host notifiers to QEMU to allow notifications
to be delivered between the driver in the guest and the
vDPA device in the host directly.
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Tonghao Zhang [Fri, 8 Jun 2018 09:18:04 +0000 (02:18 -0700)]
vhost: refine new device function
Make sure find avalid device id before allocating
virtio_net, if not, return directly. It may avoid
allocating and freeing virtio_net when there is
not valid device id.
Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Chas Williams [Thu, 17 May 2018 23:22:52 +0000 (19:22 -0400)]
net/bonding: always update bonding link status
When the first ETH_LINK_UP slave is added to a bonding device, it is
immediately activated. If these are polling slaves, there will be a
later link state event, when last_link_status doesn't match link_status.
But because this slave is already activated, the bonding device's link
status isn't updated.
To fix this, we always attempt to update the bonding device's link status
in the link state change callback.
Fixes:
46fb43683679 ("bond: add mode 4")
Cc: stable@dpdk.org
Signed-off-by: Chas Williams <chas3@att.com>
Adrien Mazarguil [Wed, 13 Jun 2018 16:27:43 +0000 (18:27 +0200)]
app/testpmd: fix crash when attaching a device
Below commit checks global device information to determine if a port uses
the softnic driver once initialized. Problem is that this information is
not available at this point when a port is initialized interactively
through a "port attach XXX" command, crashing testpmd.
This patch systematically initializes global device information to address
this issue.
Fixes:
5b590fbe09b6 ("app/testpmd: add traffic management forwarding mode")
Cc: stable@dpdk.org
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Bruce Richardson [Fri, 8 Jun 2018 21:20:48 +0000 (22:20 +0100)]
net/vhost: add to meson build
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Bruce Richardson [Fri, 8 Jun 2018 21:20:47 +0000 (22:20 +0100)]
net/szedata2: add to meson build
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Bruce Richardson [Fri, 8 Jun 2018 21:20:46 +0000 (22:20 +0100)]
net/softnic: add to meson build
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Bruce Richardson [Fri, 8 Jun 2018 21:20:45 +0000 (22:20 +0100)]
net/nfp: add to meson build
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Bruce Richardson [Fri, 8 Jun 2018 21:20:44 +0000 (22:20 +0100)]
net/liquidio: add to meson build
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Bruce Richardson [Fri, 8 Jun 2018 21:20:43 +0000 (22:20 +0100)]
net/kni: add to meson build
Since the kni library is an optional library, we need to add a check
here to ensure that the kni wrapper PMD is only built when the main kni
lib is being built.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Bruce Richardson [Fri, 8 Jun 2018 21:20:40 +0000 (22:20 +0100)]
net/failsafe: add to meson build
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Bruce Richardson [Fri, 8 Jun 2018 21:20:39 +0000 (22:20 +0100)]
net/ena: add to meson build
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Bruce Richardson [Fri, 8 Jun 2018 21:20:38 +0000 (22:20 +0100)]
net/cxgbe: add to meson build
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Bruce Richardson [Fri, 8 Jun 2018 21:20:37 +0000 (22:20 +0100)]
net/bnxt: add to meson build
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Bruce Richardson [Fri, 8 Jun 2018 21:20:36 +0000 (22:20 +0100)]
net/bnx2x: add to meson build
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Bruce Richardson [Fri, 8 Jun 2018 21:20:35 +0000 (22:20 +0100)]
net/avp: add to meson build
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Allain Legacy <allain.legacy@windriver.com>
Bruce Richardson [Fri, 8 Jun 2018 21:20:34 +0000 (22:20 +0100)]
net/ark: add to meson build
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Xiao Wang [Wed, 13 Jun 2018 11:32:46 +0000 (19:32 +0800)]
net/ifc: add to meson build
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Xiao Wang [Wed, 13 Jun 2018 11:32:45 +0000 (19:32 +0800)]
net/ifc: make driver name consistent
Make the compiler switch name and document name consistent as ``ifc`` to
avoid confusion. Also rename the map file to standard name for meson
build in the process.
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Ferruh Yigit [Thu, 31 May 2018 13:22:45 +0000 (14:22 +0100)]
ethdev: force RSS offload rules again
PMDs should provide supported RSS hash functions via
dev_info.flow_type_rss_offloads variable.
There is a check in ethdev if requested RSS hash function is supported
by PMD or not.
This check has been relaxed in previous release to not return an error
when a non supported has function requested [1], this has been done to
not break the applications.
Adding the error return back.
PMDs need to provide correct list of supported hash functions and
applications need to take care this information before configuring
the RSS otherwise they will get an error from APIs:
rte_eth_dev_rss_hash_update()
rte_eth_dev_configure()
[1] commit
af7551e2bfce ("ethdev: remove error return on RSS hash check")
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Ferruh Yigit [Thu, 31 May 2018 12:44:30 +0000 (13:44 +0100)]
ethdev: force offloading API rules
The error path was disabled in previous release to let apps to be more
flexible.
But this release they are enabled, applications have to obey offload API
rules otherwise they will get errors from following APIs:
rte_eth_dev_configure
rte_eth_rx_queue_setup
rte_eth_tx_queue_setup
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Alejandro Lucero [Mon, 11 Jun 2018 09:50:37 +0000 (10:50 +0100)]
net/nfp: fix field initialization in Tx descriptor
TX descriptor eop_offset field is not initialized and it could
contain garbage. This patch fixes the potential problem setting
EOP as the only subfield. The other subfield, data offset, is
not used by now.
Fixes:
b812daadad0d ("nfp: add Rx and Tx")
Cc: stable@dpdk.org
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Shagun Agrawal [Fri, 8 Jun 2018 17:58:17 +0000 (23:28 +0530)]
net/cxgbe: implement flow flush operation
Add API to flush all the filters under specified port.
Signed-off-by: Shagun Agrawal <shaguna@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Shagun Agrawal [Fri, 8 Jun 2018 17:58:16 +0000 (23:28 +0530)]
net/cxgbe: implement flow query operation
Add API to query filter hit and byte counts from hardware.
Signed-off-by: Shagun Agrawal <shaguna@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Shagun Agrawal [Fri, 8 Jun 2018 17:58:15 +0000 (23:28 +0530)]
net/cxgbe: implement flow destroy operation
Add API to construct delete filter work request to remove filter
at specified index in LE-TCAM (maskfull) region.
Signed-off-by: Shagun Agrawal <shaguna@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Shagun Agrawal [Fri, 8 Jun 2018 17:58:14 +0000 (23:28 +0530)]
net/cxgbe: implement flow create operation
Define filter work request API used to construct filter operations
to be communicated with firmware. These requests are sent via
control queue and completions come asynchronously in firmware event
queue.
Implement flow create operation to create filters in LE-TCAM
(maskfull) region at specified index.
Signed-off-by: Shagun Agrawal <shaguna@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Shagun Agrawal [Fri, 8 Jun 2018 17:58:13 +0000 (23:28 +0530)]
net/cxgbe: add control queue to communicate filter requests
Add control queue to communicate filter creation/deletion requests
with firmware. This API will be used by subsequent patches.
Signed-off-by: Shagun Agrawal <shaguna@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Shagun Agrawal [Fri, 8 Jun 2018 17:58:12 +0000 (23:28 +0530)]
net/cxgbe: parse and validate flows
Introduce rte_flow skeleton and implement validate operation.
Parse and convert <item>, <action>, <attributes> into hardware
specification. Perform validation, including basic sanity tests
and underlying device's supported filter capability checks.
Currently add support for:
<item>: IPv4, IPv6, TCP, and UDP.
<action>: Drop, Queue, and Count.
Also add sanity checks to ensure filters are created at specified
index in LE-TCAM region. The index in LE-TCAM region indicates
the filter rule's priority with index 0 having the highest priority.
If no index is specified, filters are created at closest available
free index.
Signed-off-by: Shagun Agrawal <shaguna@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Shagun Agrawal [Fri, 8 Jun 2018 17:58:11 +0000 (23:28 +0530)]
net/cxgbe: query firmware for filter resources
Fetch available filter resources from firmware and allocate table for
book-keeping and managing filters in hardware. Also define the hardware
filter specification (ch_filter_specification) used to describe each
filter rule.
Signed-off-by: Shagun Agrawal <shaguna@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Alejandro Lucero [Mon, 11 Jun 2018 11:20:46 +0000 (12:20 +0100)]
net/nfp: fix unused header reference
Apart from not being used, this is causing problem when compiling
DPDK with the musl library as reported by bugzilla.
Bugzilla ID: 40
Fixes:
c7e9729da6b5 ("net/nfp: support CPP")
Cc: stable@dpdk.org
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Rafal Kozik [Thu, 7 Jun 2018 09:43:22 +0000 (11:43 +0200)]
net/ena: set link speed as none
Link speed should is not limited to 10Gb/s and it shouldn't be hardcoded.
They link speed is set to none instead and the applications shouldn't
rely on this value when using ENA PMD.
Fixes:
1173fca25af9 ("ena: add polling-mode driver")
Cc: stable@dpdk.org
Signed-off-by: Rafal Kozik <rk@semihalf.com>
Acked-by: Michal Krawczyk <mk@semihalf.com>
Michal Krawczyk [Thu, 7 Jun 2018 09:43:21 +0000 (11:43 +0200)]
net/ena: store handle after memory allocation
The pointer received from rte_memzone_reserve from macro
ENA_MEM_ALLOC_COHERENT_NODE was not stored anywhere, and as a result
memory allocated by this macro could not been released.
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Rafal Kozik [Thu, 7 Jun 2018 09:43:20 +0000 (11:43 +0200)]
net/ena: fix GENMASK_ULL macro
When use GENMASK_ULL(63,0) left shift by 64 bits is performed.
Shifting by number greater or equal then word length
is undefined operation and failed on some platforms.
Fixes:
9ba7981ec992 ("ena: add communication layer for DPDK")
Cc: stable@dpdk.org
Signed-off-by: Rafal Kozik <rk@semihalf.com>
Acked-by: Michal Krawczyk <mk@semihalf.com>
Rafal Kozik [Thu, 7 Jun 2018 09:43:19 +0000 (11:43 +0200)]
net/ena: change memory type
ENA_MEM_ALLOC_NODE not need to use contiguous physical memory.
Also using memset without checking if allocation succeed can cause
segmentation fault.
To avoid both issue use rte_zmalloc_socket.
Fixes:
3d3edc265fc8 ("net/ena: make coherent memory allocation NUMA-aware")
Cc: stable@dpdk.org
Signed-off-by: Rafal Kozik <rk@semihalf.com>
Acked-by: Michal Krawczyk <mk@semihalf.com>
Rafal Kozik [Thu, 7 Jun 2018 09:43:18 +0000 (11:43 +0200)]
net/ena: check pointer before memset
Need to check if memory allocation succeed before using it.
Using memset on NULL pointer cause segfault.
Fixes:
9ba7981ec992 ("ena: add communication layer for DPDK")
Cc: stable@dpdk.org
Signed-off-by: Rafal Kozik <rk@semihalf.com>
Acked-by: Michal Krawczyk <mk@semihalf.com>
Rafal Kozik [Thu, 7 Jun 2018 09:43:17 +0000 (11:43 +0200)]
net/ena: update NUMA node
During initializing Tx queues update Non-Uniform Memory Access
configuration in NIC firmware.
Signed-off-by: Rafal Kozik <rk@semihalf.com>
Acked-by: Michal Krawczyk <mk@semihalf.com>
Rafal Kozik [Thu, 7 Jun 2018 09:43:16 +0000 (11:43 +0200)]
net/ena: adjust error checking and cleaning
Adjust error checking and cleaning to Linux driver:
* add checking if MTU is to small,
* fix error messages (mismatched Rx and Tx),
* return error received from base driver or proper error
code instead of -1,
* in case of error release occupied resources,
* in case of Rx error trigger NIC reset.
Signed-off-by: Rafal Kozik <rk@semihalf.com>
Acked-by: Michal Krawczyk <mk@semihalf.com>
Rafal Kozik [Thu, 7 Jun 2018 09:43:15 +0000 (11:43 +0200)]
net/ena: add (un)likely statements
Add likely and unlikely statements to increase performance.
Signed-off-by: Rafal Kozik <rk@semihalf.com>
Acked-by: Michal Krawczyk <mk@semihalf.com>
Rafal Kozik [Thu, 7 Jun 2018 09:43:14 +0000 (11:43 +0200)]
net/ena: validate Tx req id
Validate Tx req id during clearing completed packets.
If id is wrong, trigger NIC reset.
Signed-off-by: Rafal Kozik <rk@semihalf.com>
Acked-by: Michal Krawczyk <mk@semihalf.com>
Rafal Kozik [Thu, 7 Jun 2018 09:43:13 +0000 (11:43 +0200)]
net/ena: rework configuration of IO queue numbers
Move configuration of IO queue numbers to separate function and take
into consideration max number of IO completion queues.
Signed-off-by: Rafal Kozik <rk@semihalf.com>
Acked-by: Michal Krawczyk <mk@semihalf.com>
Rafal Kozik [Thu, 7 Jun 2018 09:43:12 +0000 (11:43 +0200)]
net/ena: log unimplemented handler error
Enable AENQ FATAL_ERROR and WARNING callbacks by setting flags
in aenq_groups. They are handled by "unimplemented handler".
If unimplemented handler is called, error is logged.
Signed-off-by: Rafal Kozik <rk@semihalf.com>
Acked-by: Michal Krawczyk <mk@semihalf.com>
Rafal Kozik [Thu, 7 Jun 2018 09:43:11 +0000 (11:43 +0200)]
net/ena: add info about max number of Tx/Rx descriptors
In function ena_infos_get driver provides information about minimal
and maximal number of Rx and Tx descriptors.
Signed-off-by: Rafal Kozik <rk@semihalf.com>
Acked-by: Michal Krawczyk <mk@semihalf.com>
Rafal Kozik [Thu, 7 Jun 2018 09:43:10 +0000 (11:43 +0200)]
net/ena: linearize Tx mbuf
Function ena_check_and_linearize_mbuf check Tx mbuf for number of
segments and linearize (defragment) it if necessary. It is called
before sending each packet.
Information about maximum number of segments is stored per each ring.
Maximum number of segments supported by NIC is taken from ENA COM in
ena_calc_queue_size function and stored in adapter structure.
Signed-off-by: Rafal Kozik <rk@semihalf.com>
Acked-by: Michal Krawczyk <mk@semihalf.com>
Michal Krawczyk [Thu, 7 Jun 2018 09:43:09 +0000 (11:43 +0200)]
net/ena: add Rx out of order completion
This feature allows Rx packets to be cleaned up out of order.
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Rafal Kozik [Thu, 7 Jun 2018 09:43:08 +0000 (11:43 +0200)]
net/ena: make watchdog configurable
Add variable wd_state to make driver functional without keep alive
AENQ handler.
The watchdog will be executed only if the aenq group has keep alive
enabled.
Signed-off-by: Rafal Kozik <rk@semihalf.com>
Acked-by: Michal Krawczyk <mk@semihalf.com>
Michal Krawczyk [Thu, 7 Jun 2018 09:43:07 +0000 (11:43 +0200)]
net/ena: check for admin queue state
The admin queue can stop responding or became inactive due to unexpected
behaviour of the device. In that case, the whole device should be
restarted.
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Michal Krawczyk [Thu, 7 Jun 2018 09:43:06 +0000 (11:43 +0200)]
net/ena: add watchdog and keep alive AENQ handler
Keep alive is executing AENQ interrupt periodically. It allows to check
health of the device and trigger reset event if the device will stop
responding.
To check for the state of the device, the DPDK application must call
rte_timer_manage().
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Michal Krawczyk [Thu, 7 Jun 2018 09:43:04 +0000 (11:43 +0200)]
net/ena: add reset routine
Reset routine can be used by the DPDK application to reset the device in
case of receiving RTE_ETH_EVENT_INTR_RESET from the PMD.
The reset event is not triggered by the driver, yet. It will be added in
next commits to enable error recovery in case of misfunctioning of the
device.
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Michal Krawczyk [Thu, 7 Jun 2018 09:43:03 +0000 (11:43 +0200)]
net/ena: restart only initialized queues instead of all
There is no need to check for restart all queues. It is sufficient to
check only previously initialized queues.
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Rafal Kozik [Thu, 7 Jun 2018 09:43:02 +0000 (11:43 +0200)]
net/ena: handle ENA notification
When ENA notifications are provided ena_notification handler is called.
It checks if received value is not corrupted and if necessary it
reports proper warnings.
Data received from NIC is parsed in ena_update_hints. Fields for
storing those information was added to ena_adapter structure.
ENA notification are enabled by setting ENA_ADMIN_NOTIFICATION flag in
aenq_groups.
Signed-off-by: Rafal Kozik <rk@semihalf.com>
Acked-by: Michal Krawczyk <mk@semihalf.com>
Michal Krawczyk [Thu, 7 Jun 2018 09:43:01 +0000 (11:43 +0200)]
net/ena: add LSC intr support and AENQ handling
To make the LSC interrupt working, the AENQ must be configured properly
in the ENA device. The AENQ interrupt is common for all maintenance
interrupts - the proper handler is then executed depending on the
received descriptor.
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Michal Krawczyk [Thu, 7 Jun 2018 09:43:00 +0000 (11:43 +0200)]
net/ena: add stop and uninit routines
Lack of uninit routine could lead to memory leak.
Stop was added to fulfill allowed PMD operations.
Checks for the PMD states in the start and configure routine were
removed, as the upper layer is already checking for them.
The interrupt setup was moved from start to init function.
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Michal Krawczyk [Thu, 7 Jun 2018 09:42:59 +0000 (11:42 +0200)]
net/ena: add interrupt handler for admin queue
The ENA device is able to send MSI-X when it will complete an command
when polling mode is deactivated. Further, the same interrupt handler
will be used for the AENQ handling - services of the ENA device, that
allows to implement watchdog or LSC handler.
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Rafal Kozik [Thu, 7 Jun 2018 09:42:58 +0000 (11:42 +0200)]
net/ena: remove support of legacy LLQ
The legacy LLQ should no longer be supported by the drivers, as this API
is deprecated. Because of that, it was removed from the driver.
Signed-off-by: Rafal Kozik <rk@semihalf.com>
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Michal Krawczyk [Mon, 11 Jun 2018 11:01:23 +0000 (13:01 +0200)]
net/ena: update HAL to the newer version
ena_com is the HAL provided by the vendor and it shouldn't be modified
by the driver developers.
The PMD and platform file was adjusted for the new version of the
ena_com:
* Do not use deprecated meta descriptor fields
* Add empty AENQ handler structure with unimplemented handlers
* Add memzone allocations count to ena_ethdev.c file - it was
removed from ena_com.c file
* Add new macros used in new ena_com files
* Use error code ENA_COM_UNSUPPORTED instead of ENA_COM_PERMISSION
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Signed-off-by: Rafal Kozik <rk@semihalf.com>
Michal Krawczyk [Thu, 7 Jun 2018 09:42:56 +0000 (11:42 +0200)]
net/ena: change version number to 1.1.0
The upcoming patches for the ENA PMD are part of 1.1.0 update of the PMD
and the version number is updated accordingly.
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
David Marchand [Thu, 7 Jun 2018 05:36:05 +0000 (07:36 +0200)]
net/bnxt: add missing ids in xstats
The xstats API expects that the driver fills both values and ids for
each filled entries.
Fixes:
bfb9c2260be2 ("net/bnxt: support xstats get/reset")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Maxime Coquelin [Tue, 29 May 2018 09:45:14 +0000 (11:45 +0200)]
vhost: improve batched copies performance
Instead of copying batch_copy_nb_elems into the stack,
this patch uses it directly.
Small performance gain of 3% is seen when running PVP
benchmark.
Acked-by: Zhihong Wang <zhihong.wang@intel.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Maxime Coquelin [Tue, 29 May 2018 09:45:13 +0000 (11:45 +0200)]
vhost: unify Rx mergeable and non-mergeable paths
This patch reworks the vhost enqueue path so that a single
code path is used for both Rx mergeable or non-mergeable cases.
Acked-by: Zhihong Wang <zhihong.wang@intel.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Shahed Shaikh [Thu, 7 Jun 2018 16:30:52 +0000 (09:30 -0700)]
net/qede: fix link change event notification
As per existing behavior, when firmware sends a link change
notification, PMD only updates the link structure but does
not notify applications about it.
This results in application sending packets even when link
status is down.
Fix this issue by issuing RTE_ETH_EVENT_INTR_LSC.
Fixes:
ec94dbc57362 ("qede: add base driver")
Cc: stable@dpdk.org
Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
Shahed Shaikh [Thu, 7 Jun 2018 16:30:51 +0000 (09:30 -0700)]
net/qede: fix incorrect link status update
qede_link_update() always returns -1 i.e. link not changed,
because it compares the variables which always hold same value.
Fix this function by using rte_eth_linkstatus_set().
Fixes:
2ea6f76aff40 ("qede: add core driver")
Cc: stable@dpdk.org
Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
Rasesh Mody [Thu, 7 Jun 2018 16:30:20 +0000 (09:30 -0700)]
net/qede: fix memory alloc for multiple port reconfig
Multiple port reconfigurations can lead to memory allocation failures
due to hitting RTE memzone limit or no more room in config while
reserving memzone.
When freeing memzones, update the memzone mapping and the memzone count.
Release Rx and Tx queue rings allocated during queue setup.
Fixes:
a39001d90dbd ("net/qede: fix DMA memory leak")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Reviewed-by: Kevin Traynor <ktraynor@redhat.com>
Rasesh Mody [Tue, 5 Jun 2018 23:03:57 +0000 (16:03 -0700)]
net/qede: fix L2-handles used for RSS hash update
Fix fast path array index which is used for passing L2 handles to RSS
indirection table, properly distribute rxq handles for indirection table.
Currently, it is using the local copy of indirection table. When the RX
queue configuration changes the local copy becomes invalid.
Fixes:
69d7ba88f1a1 ("net/qede/base: use L2-handles for RSS configuration")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Reviewed-by: Kevin Traynor <ktraynor@redhat.com>
Tomasz Duszynski [Mon, 4 Jun 2018 09:24:28 +0000 (11:24 +0200)]
net/mvpp2: check pointer before using it
Avoid NULL dereference by checking pointer before using it.
Note that the fixes tag is before the driver was renamed
to mvpp2, so the patch will not apply that far back.
Fixes:
3588aaa68eab ("net/mrvl: fix HIF objects allocation")
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Tomasz Duszynski [Mon, 4 Jun 2018 08:55:33 +0000 (10:55 +0200)]
net/mvpp2: convert to dynamic logging
Convert mvpp2 PMD to use dynamic logging.
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Rahul Lakkireddy [Wed, 23 May 2018 18:00:49 +0000 (23:30 +0530)]
net/cxgbe: report configured link auto-negotiation
Report current configured link auto-negotiation. Also initialize
rte_eth_link.
Coverity issue: 280648
Fixes:
f5b3c7b29357 ("net/cxgbevf: fix inter-VM traffic when physical link down")
Cc: stable@dpdk.org
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Rasesh Mody [Tue, 22 May 2018 23:16:04 +0000 (16:16 -0700)]
net/qede: fix for devargs
Do not error out on invalid devarg, log the message and continue.
Decide updating the tx-switching config in check args. Add a check for
VF when disabling tx-switching
Fixes:
612ce81b2007 ("net/qede: add devargs to disable NPAR Tx switching")
Fixes:
f64b91b0eb5d ("net/qede: replace config option with run-time arg")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Rasesh Mody [Tue, 22 May 2018 23:16:03 +0000 (16:16 -0700)]
net/qede: fix VF MTU update
This patch fixes VF MTU update to work without having to restart the
vport and there by not requiring port re-configuration. It adds a
VF MTU Update TLV to achieve the same. Firmware can handle VF MTU update
by just pausing the vport.
Fixes:
dd28bc8c6ef4 ("net/qede: fix VF port creation sequence")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Vipin Varghese [Sat, 12 May 2018 06:30:12 +0000 (12:00 +0530)]
net/tap: update tap index to unsigned
Updating the logic to reflect unsigned integer as index for TAP PMD.
Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
Bruce Richardson [Fri, 8 Jun 2018 10:35:12 +0000 (11:35 +0100)]
devtools: fix ARM builds test with meson
For cross-builds the CC environmental variable only applies for compiling
native binaries i.e. pmdinfogen, so setting it to a cross-build compiler
will only cause problems. Leave the value unset in the script to use the
platform-default compiler.
Fixes:
a55277a788df ("devtools: add test script for meson builds")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Maxime Coquelin [Tue, 12 Jun 2018 08:01:27 +0000 (10:01 +0200)]
maintainers: add vhost and virtio co-maintainers
Add Tiwei and Zhihong as co-maintainers for the Vhost and
Virtio components. They have done great contributions recently,
and been very helpful in helping to review Vhost and Virtio series.
Also, add Tiwei as backup for the Next-virtio tree.
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Tiwei Bie <tiwei.bie@intel.com>
Acked-by: Zhihong Wang <zhihong.wang@intel.com>
Acked-by: Zhiyong Yang <zhiyong.yang@intel.com>
Maxime Coquelin [Tue, 12 Jun 2018 08:01:26 +0000 (10:01 +0200)]
maintainers: update for vhost PMD
Tetsuya has kindly agreed to handover the maintainership
for the Vhost PMD. Thanks to him for his contributions.
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Tetsuya Mukawa <mtetsuyah@gmail.com>
Stephen Hemminger [Tue, 17 Apr 2018 21:49:19 +0000 (14:49 -0700)]
devtools: ignore SPDX warning of checkpatch
Since DPDK developers have decided to use a different tag format
than the kernel developers, ignore warnings about SPDX tags.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Thomas Monjalon [Fri, 1 Jun 2018 10:58:36 +0000 (12:58 +0200)]
version: 18.08-rc0
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Thomas Monjalon [Thu, 31 May 2018 17:01:57 +0000 (19:01 +0200)]
doc: add template release notes for 18.08
Add template release notes for DPDK 18.08 with inline
comments and explanations of the various sections.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: John McNamara <john.mcnamara@intel.com>
Thomas Monjalon [Wed, 30 May 2018 13:55:39 +0000 (15:55 +0200)]
version: 18.05.0
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
John McNamara [Wed, 30 May 2018 20:25:03 +0000 (21:25 +0100)]
doc: update release notes for 18.05
Fix grammar, spelling and formatting of DPDK 18.05 release notes.
Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Ferruh Yigit [Wed, 30 May 2018 17:46:06 +0000 (18:46 +0100)]
doc: add ixgbe detach crash in release notes
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Anoob Joseph [Tue, 29 May 2018 10:45:36 +0000 (16:15 +0530)]
crypto/armv8: fix HMAC supported digest sizes
For HMAC algorithms (SHAx-HMAC), the supported digest sizes are not a
fixed value, but a range between 1 and the maximum digest size for those
algorithms.
Fixes:
0f89def76127 ("crypto/armv8: fix HMAC supported key sizes")
Cc: stable@dpdk.org
Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
Signed-off-by: Sachin Saxena <sachin.saxena@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
David Marchand [Wed, 30 May 2018 14:45:29 +0000 (16:45 +0200)]
mem: add missing newline in callback log
Fixes:
56efb4c11753 ("malloc: support callbacks on memory events")
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>