dpdk.git
4 years agonet/ena: limit refill threshold by fixed value
Michal Krawczyk [Wed, 8 Apr 2020 08:29:16 +0000 (10:29 +0200)]
net/ena: limit refill threshold by fixed value

Divider used for both Tx and Rx cleanup/refill threshold can cause too
big delay in case of the really big rings - for example if the 8k Rx
ring will be used, the refill won't trigger unless 1024 threshold will
be reached. It will also cause driver to try to allocate that much
descriptors.

Limiting it by fixed value - 256 in that case, would limit maximum
time spent in repopulate function.

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
4 years agonet/ena: rework getting number of available descriptors
Michal Krawczyk [Wed, 8 Apr 2020 08:29:15 +0000 (10:29 +0200)]
net/ena: rework getting number of available descriptors

ena_com API should be preferred for getting number of used/available
descriptors unless extra calculation needs to be performed.

Some helper variables were added for storing values that are later
reused. Moreover, for limiting the value of sent/received packets to
the number of available descriptors, the RTE_MIN is used instead of
if function, which was doing similar thing but was less descriptive.

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
4 years agonet/ena: refactor Rx
Michal Krawczyk [Wed, 8 Apr 2020 08:29:14 +0000 (10:29 +0200)]
net/ena: refactor Rx

* Split main Rx function into multiple ones - the body of the main
  was very big and further there were 2 nested loops, which were
  making the code hard to read
* Rework how the Rx mbuf chains are being created - Instead of having
  while loop which has conditional check if it's first segment, handle
  this segment outside the loop and if more fragments are existing,
  process them inside.
* Initialize Rx mbuf using simple function - it's the common thing for
  the 1st and next segments.
* Create structure for Rx buffer to align it with Tx path, other ENA
  drivers and to make the variable name more descriptive - on DPDK, Rx
  buffer must hold only mbuf, so initially array of mbufs was used as
  the buffers. However, it was misleading, as it was named
  "rx_buffer_info". To make it more clear, the structure holding mbuf
  pointer was added and now there is possibility to expand it in the
  future without reworking the driver.
* Remove redundant variables and conditional checks.

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
4 years agonet/ena: disable meta caching
Michal Krawczyk [Wed, 8 Apr 2020 08:29:13 +0000 (10:29 +0200)]
net/ena: disable meta caching

In the LLQ (Low-latency queue) mode, the device can indicate that meta
data descriptor caching is disabled. In that case the driver should send
valid meta descriptor on every Tx packet.

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
4 years agonet/ena: add Tx drops statistic
Michal Krawczyk [Wed, 8 Apr 2020 08:29:12 +0000 (10:29 +0200)]
net/ena: add Tx drops statistic

ENA device can report in the AENQ handler amount of Tx packets that were
dropped and not sent.

This statistic is showing global value for the device and because
rte_eth_stats is missing field that could indicate this value (it
isn't the Tx error), it is being presented as a extended statistic.

As the current design of extended statistics prevents tx_drops from
being an atomic variable and both tx_drops and rx_drops are only updated
from the AENQ handler, both were set as non-atomic for the alignment.

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
4 years agonet/ena: remove memory barriers before doorbells
Michal Krawczyk [Wed, 8 Apr 2020 08:29:11 +0000 (10:29 +0200)]
net/ena: remove memory barriers before doorbells

The doorbell code is already issuing the doorbell by using rte_write.
Because of that, there is no need to do that before calling the
function.

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
4 years agonet/ena: support large LLQ headers
Michal Krawczyk [Wed, 8 Apr 2020 08:29:10 +0000 (10:29 +0200)]
net/ena: support large LLQ headers

Default LLQ (Low-latency queue) maximum header size is 96 bytes and can
be too small for some types of packets - like IPv6 packets with multiple
extension. This can be fixed, by using large LLQ headers.

If the device supports larger LLQ headers, the user can activate them by
using device argument 'large_llq_hdr' with value '1'.

If the device isn't supporting this feature, the default value (96B)
will be used.

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
4 years agonet/ena: refactor getting IO queues capabilities
Michal Krawczyk [Wed, 8 Apr 2020 08:29:09 +0000 (10:29 +0200)]
net/ena: refactor getting IO queues capabilities

Reading values from the device is about the maximum capabilities of the
device. Because of that, the names of the fields storing those values,
functions and temporary variables, should be more descriptive in order
to improve self documentation of the code.

In connection with this, the way of getting maximum queue size could be
simplified - no hardcoded values are needed, as the device is going to
send it's capabilities anyway.

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
4 years agonet/ena: set IO ring size to valid value
Michal Krawczyk [Wed, 8 Apr 2020 08:29:08 +0000 (10:29 +0200)]
net/ena: set IO ring size to valid value

IO rings were configured with the maximum allowed size for the Tx/Rx
rings. However, the application could decide to create smaller rings.

This patch is using value stored in the ring instead of the value from
the adapter which is indicating the maximum allowed value.

Fixes: df238f84c0a2 ("net/ena: recreate HW IO rings on start and stop")
Cc: stable@dpdk.org
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
4 years agonet/ena/base: update generation date and commit
Michal Krawczyk [Wed, 8 Apr 2020 08:29:07 +0000 (10:29 +0200)]
net/ena/base: update generation date and commit

The current ena_com version was generated on 25.09.2019.

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
4 years agonet/ena/base: fix indentation of multiple defines
Michal Krawczyk [Wed, 8 Apr 2020 08:29:06 +0000 (10:29 +0200)]
net/ena/base: fix indentation of multiple defines

As the alignment of the defines wasn't valid, it was removed at all, so
instead of using multiple spaces or tabs, the single space after define
name is being used.

Fixes: 99ecfbf845b3 ("ena: import communication layer")

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
4 years agonet/ena/base: fix types for printing timestamps
Michal Krawczyk [Wed, 8 Apr 2020 08:29:05 +0000 (10:29 +0200)]
net/ena/base: fix types for printing timestamps

Because ena_com is being used by multiple platforms which are using
different C versions, PRIu64 cannot be used directly and must be defined
in the platform file.

Fixes: b2b02edeb0d6 ("net/ena/base: upgrade HAL for new HW features")

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
4 years agonet/ena/base: use 48-bit memory addresses
Michal Krawczyk [Wed, 8 Apr 2020 08:29:04 +0000 (10:29 +0200)]
net/ena/base: use 48-bit memory addresses

ENA device is using 48-bit memory for IO. Because of that, the upper
limit had to be updated.

From the driver perspective, it's just a cosmetic change to make
definition of the structure 'ena_common_mem_addr' more descriptive and
the address value was verified anyway for the valid range in the
function 'ena_com_mem_addr_set()'.

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
4 years agonet/ena/base: add error logs when preparing Tx
Michal Krawczyk [Wed, 8 Apr 2020 08:29:03 +0000 (10:29 +0200)]
net/ena/base: add error logs when preparing Tx

To make the debugging easier, the error logs were added in the Tx path.

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
4 years agonet/ena/base: fix indentation in CQ polling
Michal Krawczyk [Wed, 8 Apr 2020 08:29:02 +0000 (10:29 +0200)]
net/ena/base: fix indentation in CQ polling

The spaces instead of tabs were used for the indent.

Fixes: 3adcba9a8987 ("net/ena: update HAL to the newer version")

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
4 years agonet/ena/base: fix documentation of functions
Michal Krawczyk [Wed, 8 Apr 2020 08:29:01 +0000 (10:29 +0200)]
net/ena/base: fix documentation of functions

The documentation format was aligned and few typos were fixed.

Fixes: 99ecfbf845b3 ("ena: import communication layer")

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
4 years agonet/ena/base: add accelerated LLQ mode
Michal Krawczyk [Wed, 8 Apr 2020 08:29:00 +0000 (10:29 +0200)]
net/ena/base: add accelerated LLQ mode

In order to use the accelerated LLQ (Low-lateny queue) mode, the driver
must limit the Tx burst and be aware that the device has the meta
caching disabled. In that situation, the meta descriptor must be valid
on each Tx packet.

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
4 years agonet/ena/base: remove extra properties strings
Michal Krawczyk [Wed, 8 Apr 2020 08:28:59 +0000 (10:28 +0200)]
net/ena/base: remove extra properties strings

This buffer was never used by the ENA PMD. It could be used for
debugging, but it's presence is redundant now.

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
4 years agonet/ena/base: rework interrupt moderation
Michal Krawczyk [Wed, 8 Apr 2020 08:28:58 +0000 (10:28 +0200)]
net/ena/base: rework interrupt moderation

This feature allows for adaptive interrupt moderation. It's not used by
the DPDK PMD, but is a part of the newest HAL version.

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
4 years agonet/ena/base: remove conversion of indirection table
Michal Krawczyk [Wed, 8 Apr 2020 08:28:57 +0000 (10:28 +0200)]
net/ena/base: remove conversion of indirection table

After the indirection table is being saved in the device, there is no
need to convert it back, as it's already saved in host_rss_ind_tbl
array.

As a result, the call to the ena_com_ind_tbl_convert_from_device() is
not needed.

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
4 years agonet/ena/base: fix testing for supported hash function
Michal Krawczyk [Wed, 8 Apr 2020 08:28:56 +0000 (10:28 +0200)]
net/ena/base: fix testing for supported hash function

There was a bug in ena_com_fill_hash_function(), which was causing bit to
be shifted left one bit too much.

To fix that, the ENA_FFS macro is being used (returning the location of
the first bit set), hash_function value is being subtracted by 1 if any
hash function is supported by the device and BIT macro is used for
shifting for better verbosity.

Fixes: 99ecfbf845b3 ("ena: import communication layer")
Cc: stable@dpdk.org
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
4 years agonet/ena/base: generate default random RSS hash key
Michal Krawczyk [Wed, 8 Apr 2020 08:28:55 +0000 (10:28 +0200)]
net/ena/base: generate default random RSS hash key

Although the RSS key still cannot be set, it is now being generated
every time the driver is being initialized.

Multiple devices can still have the same key if they're used by the same
driver.

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
4 years agonet/ena/base: prevent allocation of zero sized memory
Igor Chauskin [Wed, 8 Apr 2020 08:28:54 +0000 (10:28 +0200)]
net/ena/base: prevent allocation of zero sized memory

rte_memzone_reserve() will reserve the biggest contiguous memzone
available if received 0 as size param.

Fixes: 9ba7981ec992 ("ena: add communication layer for DPDK")
Cc: stable@dpdk.org
Signed-off-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
4 years agonet/ena/base: make allocation macros thread-safe
Igor Chauskin [Wed, 8 Apr 2020 08:28:53 +0000 (10:28 +0200)]
net/ena/base: make allocation macros thread-safe

Memory allocation region id could possibly be non-unique
due to non-atomic increment, causing allocation failure.

Fixes: 9ba7981ec992 ("ena: add communication layer for DPDK")
Cc: stable@dpdk.org
Signed-off-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
4 years agonet/ena: ensure Rx buffer size is at least 1400B
Michal Krawczyk [Wed, 8 Apr 2020 08:28:52 +0000 (10:28 +0200)]
net/ena: ensure Rx buffer size is at least 1400B

Some of the ENA devices can't handle buffers which are smaller than a
1400B. Because of this limitation, size of the buffer is being checked
and limited during the Rx queue setup.

If it's below the allowed value, PMD won't finish it's configuration
successfully..

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
4 years agodoc: update ice guide driver/firmware/package version
Zhaoyan Chen [Fri, 20 Mar 2020 01:58:17 +0000 (09:58 +0800)]
doc: update ice guide driver/firmware/package version

Update driver/firmware/package version for DPDK20.02

Signed-off-by: Zhaoyan Chen <zhaoyan.chen@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agonet/ice/base: remove unused code in switch rule
Qi Zhang [Tue, 7 Apr 2020 00:25:23 +0000 (08:25 +0800)]
net/ice/base: remove unused code in switch rule

Update a switch rule' action from "to VSI" to "to VSI List"
should only happen when the same rule has been programmed with
a different fwd destination. This is already handled by below
code block:

m_entry = ice_find_adv_rule_entry(...)
if (m_entry) {
...
ice_adv_add_update_vsi_list(...)
}

The following ice_update_pkt_fwd_rule is unnecessary and should be
removed due to:
1) If a switch rule's action is still to VSI, which means, it is
   the first time be issued,  we don't need to update it "to VSI
   List."
2) Actually the implementation does not match the comment, it still
   update the rule with "to VSI" action.

Fixes: fed0c5ca5f19 ("net/ice/base: support programming a new switch recipe")
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agonet/iavf: enable port reset
Lunyuan Cui [Wed, 1 Apr 2020 07:12:14 +0000 (07:12 +0000)]
net/iavf: enable port reset

This patch is intended to add iavf_dev_reset ops, enable iavf to support
"port reset all".

Signed-off-by: Lunyuan Cui <lunyuanx.cui@intel.com>
Tested-by: Zhaoyan Chen <zhaoyan.chen@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agonet/i40e: enable MAC address as flow director input set
Lunyuan Cui [Thu, 2 Apr 2020 07:58:47 +0000 (07:58 +0000)]
net/i40e: enable MAC address as flow director input set

Enable source MAC address and destination MAC address as FDIR's
input set for ipv4-other, ipv4-udp and ipv4-tcp. When OVS-DPDK is
working as a pure L2 switch, enable MAC address as FDIR input set
with Mark+RSS action would help the performance speed up. And FVL
FDIR supports to change input set with MAC address.

Signed-off-by: Lunyuan Cui <lunyuanx.cui@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
4 years agonet/ice: fix RSS advanced rule
Junyu Jiang [Tue, 7 Apr 2020 01:48:17 +0000 (01:48 +0000)]
net/ice: fix RSS advanced rule

This patch moved the RSS initialization from dev start to dev configure
to fix RSS advanced rule invalid issue after running port stop and port
start.

Fixes: 5ad3db8d4bdd ("net/ice: enable advanced RSS")
Cc: stable@dpdk.org
Signed-off-by: Junyu Jiang <junyux.jiang@intel.com>
Tested-by: Zhiwei He <zhiwei.he@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
4 years agonet/nfp: fix dangling pointer on probe failure
Yunjian Wang [Tue, 7 Apr 2020 11:37:27 +0000 (19:37 +0800)]
net/nfp: fix dangling pointer on probe failure

When nfp_pf_create_dev() is cleaning up, it does not correctly set
the dev_private variable to NULL, which will lead to a double free.

Fixes: ef28aa96e53b ("net/nfp: support multiprocess")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Heinrich Kuhn <heinrich.kuhn@netronome.com>
4 years agonet/nfp: fix log format specifiers
Ferruh Yigit [Tue, 3 Mar 2020 13:36:46 +0000 (13:36 +0000)]
net/nfp: fix log format specifiers

Changing format specifier for the 'size_t' as '%z' and for 'off_t' as
'%jd'.

Also this fix enables compiling PMD for 32bit architecture.

Fixes: 29a62d1476b6 ("net/nfp: add CPP bridge as service")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Heinrich Kuhn <heinrich.kuhn@netronome.com>
4 years agoexamples/vmdq: fix RSS configuration
Junyu Jiang [Wed, 25 Mar 2020 06:32:48 +0000 (06:32 +0000)]
examples/vmdq: fix RSS configuration

In order that all queues of pools can receive packets,
add enable-rss argument to change RSS configuration.

Fixes: 6bb97df521aa ("examples/vmdq: new app")
Cc: stable@dpdk.org
Signed-off-by: Junyu Jiang <junyux.jiang@intel.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
Tested-by: Yingya Han <yingyax.han@intel.com>
4 years agodoc: add user guide for VMDq example
Junyu Jiang [Wed, 25 Mar 2020 06:32:47 +0000 (06:32 +0000)]
doc: add user guide for VMDq example

Currently, there is no documentation for VMDq example,
this path added the user guide for VMDq.

Signed-off-by: Junyu Jiang <junyux.jiang@intel.com>
Reviewed-by: Jingjing Wu <jingjing.wu@intel.com>
4 years agoethdev: fix build when vtune profiling is on
Eugeny Parshutin [Mon, 6 Apr 2020 18:27:05 +0000 (21:27 +0300)]
ethdev: fix build when vtune profiling is on

Add the previous prototype for the 'profile_hook_rx_burst_cb' function
to fix the compiler warning when the DPDK is built with
'RTE_ETHDEV_PROFILE_WITH_VTUNE' config option enabled:
/home/dpdk/lib/librte_ethdev/ethdev_profile.c:17:1: warning:
no previous prototype for profile_hook_rx_burst_cb [-Wmissing-prototypes]

Fixes: 2c1bbab7f09d ("ethdev: change vtune profiling approach")
Cc: stable@dpdk.org
Signed-off-by: Eugeny Parshutin <eugeny.parshutin@linux.intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet/memif: fix resource leak
Vadim Podovinnikov [Sat, 4 Apr 2020 10:15:57 +0000 (13:15 +0300)]
net/memif: fix resource leak

Fixes: c41a04958b09 ("net/memif: support multi-process")
Cc: stable@dpdk.org
Signed-off-by: Vadim Podovinnikov <podovinnikov@protei.ru>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agoapp/testpmd: support dumping socket memory
Xueming Li [Sun, 5 Apr 2020 02:49:22 +0000 (02:49 +0000)]
app/testpmd: support dumping socket memory

Introduce new command to dump memory statistics of each socket,
summary, also show changes since last call.

Usage:
    dump_socket_mem

Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet/netvsc: avoid possible live lock
Stephen Hemminger [Tue, 31 Mar 2020 17:14:04 +0000 (10:14 -0700)]
net/netvsc: avoid possible live lock

Since the ring buffer with host is shared for both transmit
completions and receive packets, it is possible that transmitter
could get starved if receive ring gets full.

Better to process all outstanding events which frees up transmit
buffer slots, even if means dropping some packets.

Fixes: 7e6c82430702 ("net/netvsc: avoid over filling Rx descriptor ring")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
4 years agobus/vmbus: simplify arguments to need signal function
Stephen Hemminger [Tue, 31 Mar 2020 17:14:03 +0000 (10:14 -0700)]
bus/vmbus: simplify arguments to need signal function

The transmit need signal function can avoid an unnecessary
dereference by passing the right pointer. This also makes
code better match FreeBSD driver.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
4 years agonet/netvsc: handle Tx completions based on burst size
Stephen Hemminger [Tue, 31 Mar 2020 17:14:02 +0000 (10:14 -0700)]
net/netvsc: handle Tx completions based on burst size

If tx_free_thresh is quite low, it is possible that we need to
cleanup based on burst size.

Fixes: fc30efe3a22e ("net/netvsc: change Rx descriptor setup and sizing")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
4 years agonet/netvsc: remove process event optimization
Stephen Hemminger [Tue, 31 Mar 2020 17:14:01 +0000 (10:14 -0700)]
net/netvsc: remove process event optimization

Remove unlocked check for data in receive ring.
This check is not safe because of missing barriers etc.

Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
4 years agonet/netvsc: fix memory free on device close
Stephen Hemminger [Tue, 31 Mar 2020 17:14:00 +0000 (10:14 -0700)]
net/netvsc: fix memory free on device close

The netvsc PMD was putting the mac address in private data but the
core rte_ethdev doesn't allow that it. It has to be in rte_malloc'd
memory or a message will be printed on shutdown/close.
 EAL: Invalid memory

Fixes: f8279f47dd89 ("net/netvsc: fix crash in secondary process")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
4 years agonet/netvsc: split send buffers from Tx descriptors
Stephen Hemminger [Tue, 31 Mar 2020 17:13:59 +0000 (10:13 -0700)]
net/netvsc: split send buffers from Tx descriptors

The VMBus has reserved transmit area (per device) and transmit
descriptors (per queue). The previous code was always having a 1:1
mapping between send buffers and descriptors.
This can lead to one queue starving another and also buffer bloat.

Change to working more like FreeBSD where there is a pool of transmit
descriptors per queue. If send buffer is not available then no
aggregation happens but the queue can still drain.

Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
4 years agonet/netvsc: handle Rx packets during multi-channel setup
Stephen Hemminger [Tue, 31 Mar 2020 17:13:58 +0000 (10:13 -0700)]
net/netvsc: handle Rx packets during multi-channel setup

It is possible for a packet to arrive during the configuration
process when setting up multiple queue mode. This would cause
configure to fail; fix by just ignoring receive packets while
waiting for control commands.

Use the receive ring lock to avoid possible races between
oddly behaved applications doing rx_burst and control operations
concurrently.

Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
4 years agonet/netvsc: propagate descriptor limits from VF
Stephen Hemminger [Tue, 31 Mar 2020 17:13:57 +0000 (10:13 -0700)]
net/netvsc: propagate descriptor limits from VF

If application cares about descriptor limits, the netvsc device
values should reflect those of the VF as well.

Fixes: dc7680e8597c ("net/netvsc: support integrated VF")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
4 years agoapp/testpmd: enhance GTP support
Dekel Peled [Wed, 25 Mar 2020 08:12:31 +0000 (10:12 +0200)]
app/testpmd: enhance GTP support

This patch adds CLI option to enter the v_pt_rsv_flags value for GTP
flow pattern item.
It also adds GTP as valid item in raw_encap and raw_decap setting.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
4 years agonet/ice: redirect switch rule to new VSI
Beilei Xing [Fri, 3 Apr 2020 04:46:09 +0000 (12:46 +0800)]
net/ice: redirect switch rule to new VSI

After VF reset, VF's VSI number may be changed,
the switch rule which forwards packet to the old
VSI number should be redirected to the new VSI
number.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
4 years agonet/ice: enable flow redirect on switch
Beilei Xing [Fri, 3 Apr 2020 04:46:08 +0000 (12:46 +0800)]
net/ice: enable flow redirect on switch

Enable flow redirect on switch, currently only
support VSI redirect.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
4 years agonet/ice: fix input set of VLAN item
Wei Zhao [Fri, 3 Apr 2020 04:46:07 +0000 (12:46 +0800)]
net/ice: fix input set of VLAN item

The input set for inner type of vlan item should
be ICE_INSET_ETHERTYPE, not ICE_INSET_VLAN_OUTER.
This mac vlan filter is also part of DCF switch filter.

Fixes: 47d460d63233 ("net/ice: rework switch filter")
Cc: stable@dpdk.org
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
4 years agonet/ice: add more flow support for permission stage
Wei Zhao [Fri, 3 Apr 2020 04:46:06 +0000 (12:46 +0800)]
net/ice: add more flow support for permission stage

This patch add switch filter permission stage support
for more flow pattern in pf only pipeline mode.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
4 years agonet/ice: support IPv6 NAT-T
Wei Zhao [Fri, 3 Apr 2020 04:46:05 +0000 (12:46 +0800)]
net/ice: support IPv6 NAT-T

This patch add switch filter support for IPv6 NAT-T packets,
it enable switch filter to direct IPv6 packets with
NAT-T payload to specific action.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
4 years agonet/ice: support PFCP
Wei Zhao [Fri, 3 Apr 2020 04:46:04 +0000 (12:46 +0800)]
net/ice: support PFCP

This patch add switch filter support for PFCP packets,
it enable switch filter to direct IPv4/IPv6 packets with
PFCP session or node payload to specific action.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
4 years agonet/ice: support ESP/AH/L2TP
Wei Zhao [Fri, 3 Apr 2020 04:46:03 +0000 (12:46 +0800)]
net/ice: support ESP/AH/L2TP

This patch add support for ESP/AH/L2TP packets,
it enable switch filter to direct IPv6 packets with
ESP/AH/L2TP payload to specific action.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
4 years agonet/ice: add action number check for switch
Wei Zhao [Fri, 3 Apr 2020 04:46:02 +0000 (12:46 +0800)]
net/ice: add action number check for switch

The action number can only be one for DCF or PF
switch filter, not support multiple actions.

Fixes: 47d460d63233 ("net/ice: rework switch filter")
Cc: stable@dpdk.org
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
4 years agonet/ice: change default tunnel type
Wei Zhao [Fri, 3 Apr 2020 04:46:01 +0000 (12:46 +0800)]
net/ice: change default tunnel type

The default tunnel type for switch filter change to new
definition of ICE_SW_TUN_AND_NON_TUN in order that the rule
will be apply to more packet type.

Fixes: 47d460d63233 ("net/ice: rework switch filter")
Cc: stable@dpdk.org
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
4 years agonet/ice: support MAC VLAN rule
Wei Zhao [Fri, 3 Apr 2020 04:46:00 +0000 (12:46 +0800)]
net/ice: support MAC VLAN rule

This patch add support for MAC VLAN rule,
it enable switch filter to direct packet base on
mac address and VLAN id.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
4 years agonet/ice: change switch parser to support flexible mask
Wei Zhao [Fri, 3 Apr 2020 04:45:59 +0000 (12:45 +0800)]
net/ice: change switch parser to support flexible mask

DCF need to make configuration of flexible mask, that is to say
some input set mask may be not 0xFFFF type all one bit. In order
to direct L2/IP multicast packets, the mask for source IP maybe
0xF0000000, this patch enable switch filter parser for it.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
4 years agonet/ice: support more PPPoE input set
Wei Zhao [Fri, 3 Apr 2020 04:45:58 +0000 (12:45 +0800)]
net/ice: support more PPPoE input set

This patch add more support for PPPoE packet,
it enable switch filter to direct PPPoE packet base on
session id and PPP protocol type.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
4 years agonet/ice: enable switch flow on DCF
Wei Zhao [Fri, 3 Apr 2020 04:45:57 +0000 (12:45 +0800)]
net/ice: enable switch flow on DCF

DCF on CVL is a control plane VF which take the responsibility to
configure all the PF/global resources, this patch add support DCF
on to program forward rule to direct packets to VFs.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
4 years agonet/octeontx2: support custom L2 header
Satheesh Paul [Mon, 6 Apr 2020 06:43:03 +0000 (12:13 +0530)]
net/octeontx2: support custom L2 header

This patch adds SDP packet parsing support with custom L2 header,
adds support to include a field from custom header for flow tag
generation.

Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
4 years agonet/octeontx2: fix device configuration sequence
Pavan Nikhilesh [Sat, 4 Apr 2020 15:19:50 +0000 (20:49 +0530)]
net/octeontx2: fix device configuration sequence

When an application invokes rte_eth_dev_configure consecutively without
setting up Rx/Tx queues, it will incorrectly return error while trying
to restore Rx/Tx queue configuration.

Fix configuration sequence by checking if any Rx/Tx queues are
previously configured before trying to restore them.

Fixes: 548b5839a32b ("net/octeontx2: add device configure operation")
Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
4 years agonet/octeontx2: add TM capability
Krzysztof Kanas [Sun, 5 Apr 2020 21:16:57 +0000 (02:46 +0530)]
net/octeontx2: add TM capability

Add Traffic Management capability callbacks to provide
global, level and node capabilities. This patch also
adds documentation on Traffic Management Support.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Krzysztof Kanas <kkanas@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
4 years agonet/octeontx2: add Tx queue rate limit
Krzysztof Kanas [Fri, 3 Apr 2020 08:52:15 +0000 (14:22 +0530)]
net/octeontx2: add Tx queue rate limit

Add Tx queue ratelimiting support. This support is mutually
exclusive with TM support i.e when TM is configured, tx queue
ratelimiting config is no more valid.

Signed-off-by: Krzysztof Kanas <kkanas@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
4 years agonet/octeontx2: support TM debug
Nithin Dabilpuram [Fri, 3 Apr 2020 08:52:14 +0000 (14:22 +0530)]
net/octeontx2: support TM debug

Add debug support to TM to dump configured topology
and registers. Also enable debug dump when sq flush fails.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Krzysztof Kanas <kkanas@marvell.com>
4 years agonet/octeontx2: add TM dynamic topology update
Nithin Dabilpuram [Fri, 3 Apr 2020 08:52:13 +0000 (14:22 +0530)]
net/octeontx2: add TM dynamic topology update

Add dynamic parent and shaper update callbacks that
can be used to change RR Quantum or PIR/CIR rate dynamically
post hierarchy commit. Dynamic parent update callback only
supports updating RR quantum of a given child with respect to
its parent. There is no support yet to change priority or parent
itself.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Krzysztof Kanas <kkanas@marvell.com>
4 years agonet/octeontx2: add TM stats and shaper profile
Nithin Dabilpuram [Fri, 3 Apr 2020 08:52:12 +0000 (14:22 +0530)]
net/octeontx2: add TM stats and shaper profile

Add TM support for stats read and private shaper
profile addition or deletion.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Krzysztof Kanas <kkanas@marvell.com>
4 years agonet/octeontx2: add TM hierarchy commit
Nithin Dabilpuram [Fri, 3 Apr 2020 08:52:11 +0000 (14:22 +0530)]
net/octeontx2: add TM hierarchy commit

Add TM hierarchy commit callback to support enabling
newly created topology.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Krzysztof Kanas <kkanas@marvell.com>
4 years agonet/octeontx2: add TM node suspend/resume
Krzysztof Kanas [Fri, 3 Apr 2020 08:52:10 +0000 (14:22 +0530)]
net/octeontx2: add TM node suspend/resume

Add TM support to suspend and resume nodes post hierarchy
commit.

Signed-off-by: Krzysztof Kanas <kkanas@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
4 years agonet/octeontx2: support TM node add/delete
Nithin Dabilpuram [Fri, 3 Apr 2020 08:52:09 +0000 (14:22 +0530)]
net/octeontx2: support TM node add/delete

Adds support to Traffic Management callbacks "node_add"
and "node_delete". These callbacks doesn't support
dynamic node addition or deletion post hierarchy commit.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Krzysztof Kanas <kkanas@marvell.com>
4 years agonet/octeontx2: support dynamic topology update
Nithin Dabilpuram [Fri, 3 Apr 2020 08:52:08 +0000 (14:22 +0530)]
net/octeontx2: support dynamic topology update

Modify resource allocation and freeing logic to support
dynamic topology commit while to traffic is flowing.
This patch also modifies SQ flush to timeout based on minimum shaper
rate configured. SQ flush is further split to pre/post
functions to adhere to HW spec of 96XX C0.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Krzysztof Kanas <kkanas@marvell.com>
4 years agonet/octeontx2: restructure TM helper functions
Nithin Dabilpuram [Fri, 3 Apr 2020 08:52:07 +0000 (14:22 +0530)]
net/octeontx2: restructure TM helper functions

Restructure traffic manager helper function by splitting to
multiple sets of register configurations like shaping, scheduling
and topology config.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Krzysztof Kanas <kkanas@marvell.com>
4 years agonet/octeontx2: setup link config based on BP level
Nithin Dabilpuram [Fri, 3 Apr 2020 08:52:06 +0000 (14:22 +0530)]
net/octeontx2: setup link config based on BP level

Configure NIX_AF_TL3_TL2X_LINKX_CFG using schq at
level based on NIX_AF_PSE_CHANNEL_LEVEL[BP_LEVEL].

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
4 years agonet/octeontx2: support configuring link attributes
Harman Kalra [Tue, 31 Mar 2020 16:24:24 +0000 (21:54 +0530)]
net/octeontx2: support configuring link attributes

Adding support to configure link attributes like speed,
duplex, negotiation.

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
4 years agonet/octeontx2: enable error and RAS interrupt in configure
Vamsi Attunuru [Fri, 3 Apr 2020 02:20:16 +0000 (07:50 +0530)]
net/octeontx2: enable error and RAS interrupt in configure

Patch adds routines to set/clear nix lf error & ras interrupt enable
registers. These nix lf error interrupts get triggered if there are
any failures during nix lf configuration. This interrupts are enabled
before any hardware configurations initiated on the allocated nix lf.

Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Acked-by: Andrzej Ostruszka <aostruszka@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
4 years agonet/octeontx: support Rx/Tx checksum offload
Harman Kalra [Mon, 16 Mar 2020 09:33:44 +0000 (15:03 +0530)]
net/octeontx: support Rx/Tx checksum offload

This patch implements rx/tx checksum offload. In case of
wrong checksum received (inner/outer l3/l4) it reports the
corresponding layer which has bad checksum and also corrects
it if hw checksum is enabled on tx side.

Signed-off-by: Harman Kalra <hkalra@marvell.com>
4 years agonet/octeontx: support flow control
Vamsi Attunuru [Mon, 16 Mar 2020 09:33:43 +0000 (15:03 +0530)]
net/octeontx: support flow control

Patch adds ethdev flow control set/get callback ops,
pmd enables modifying flow control attributes like
rx_pause, tx_pause, high & low water mark.

Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Acked-by: Harman Kalra <hkalra@marvell.com>
4 years agonet/octeontx: support set link up/down
Harman Kalra [Mon, 16 Mar 2020 09:33:42 +0000 (15:03 +0530)]
net/octeontx: support set link up/down

Adding support for setting link up/down eth operation.
It is used to enable disable lmac.  Also implemented a
poll function for getting the link status at regular
intervals.

Signed-off-by: Harman Kalra <hkalra@marvell.com>
4 years agonet/octeontx: support VLAN filter offload
Vamsi Attunuru [Mon, 16 Mar 2020 09:33:41 +0000 (15:03 +0530)]
net/octeontx: support VLAN filter offload

Patch adds support for vlan filter offload support.
MBOX messages for vlan filter on/off and vlan filter
entry add/rm are added to configure PCAM entries to
filter out the vlan traffic on a given port.

Patch also defines rx_offload_flag for vlan filtering.

Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Acked-by: Harman Kalra <hkalra@marvell.com>
4 years agonet/octeontx: support MTU
Harman Kalra [Mon, 16 Mar 2020 09:33:40 +0000 (15:03 +0530)]
net/octeontx: support MTU

Adding support for mtu eth operation which configures mtu based
on max pkt len.

Signed-off-by: Harman Kalra <hkalra@marvell.com>
4 years agonet/octeontx: support fast mbuf free
Harman Kalra [Mon, 16 Mar 2020 09:33:39 +0000 (15:03 +0530)]
net/octeontx: support fast mbuf free

This patch adds capability to fast release of mbuf
following successful transmission.

Signed-off-by: Harman Kalra <hkalra@marvell.com>
4 years agonet/octeontx: add framework for Rx/Tx offloads
Harman Kalra [Mon, 16 Mar 2020 09:33:38 +0000 (15:03 +0530)]
net/octeontx: add framework for Rx/Tx offloads

Adding macro based framework to hook rx/tx burst function
pointers to the appropriate function based on rx/tx offloads.

Signed-off-by: Harman Kalra <hkalra@marvell.com>
4 years agonet/octeontx: support multi segment
Harman Kalra [Mon, 16 Mar 2020 09:33:37 +0000 (15:03 +0530)]
net/octeontx: support multi segment

Adding multi segment support to the octeontx PMD. Also
adding the logic to share rx/tx ofloads with the eventdev
code.

Signed-off-by: Harman Kalra <hkalra@marvell.com>
4 years agonet/octeontx2: offload bad L2/L3/L4 UDP lengths detection
Kiran Kumar K [Sat, 7 Mar 2020 09:56:53 +0000 (15:26 +0530)]
net/octeontx2: offload bad L2/L3/L4 UDP lengths detection

Octeontx2 HW has support for detecting the bad L2/L3/L4 UDP lengths.
Since DPDK does not have specific error flag for this, exposing it
as bad checksum failure in mbuff:ol_flags to leverage this feature.

These errors will be propagated to the ol_flags as follows.

L2 length error ==> (PKT_RX_IP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD).
Both Outer and Inner L3 length error ==> PKT_RX_IP_CKSUM_BAD.
Outer L4 UDP length/port error ==> PKT_RX_OUTER_L4_CKSUM_BAD.
Inner L4 UDP length/port error ==> PKT_RX_L4_CKSUM_BAD.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
4 years agonet/octeontx: fix meson build for disabled drivers
Amit Gupta [Wed, 4 Mar 2020 05:47:04 +0000 (11:17 +0530)]
net/octeontx: fix meson build for disabled drivers

Add a condition to check if octeontx drivers are disabled.
octeontx drivers are built only if dependent drivers i.e.
ethdev, mempool and common/octeontx are enabled.

Bugzilla ID: 387
Fixes: 7f615033d64f ("drivers/net: build Cavium NIC PMDs with meson")
Cc: stable@dpdk.org
Signed-off-by: Amit Gupta <agupta3@marvell.com>
Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Harman Kalra <hkalra@marvell.com>
4 years agocommon/octeontx2: upgrade mbox definition to version 5
Nithin Dabilpuram [Fri, 6 Mar 2020 13:44:05 +0000 (19:14 +0530)]
common/octeontx2: upgrade mbox definition to version 5

Sync mail box data structures to version 0x0005 to
that of kernel AF driver.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
4 years agonet/tap: remove unused assert
Yunjian Wang [Wed, 25 Mar 2020 03:04:56 +0000 (11:04 +0800)]
net/tap: remove unused assert

The assert checks is not necessary, the gso_ctx is always non-NULL.

Fixes: 050316a88313 ("net/tap: support TSO (TCP Segment Offload)")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet/sfc: add Xilinx copyright
Andrew Rybchenko [Mon, 30 Mar 2020 10:27:26 +0000 (11:27 +0100)]
net/sfc: add Xilinx copyright

Xilinx acquired Solarflare in 2019.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: James Fox <jamesfox@xilinx.com>
4 years agonet/sfc: check actual all multicast unknown unicast filters
Igor Romanov [Mon, 30 Mar 2020 10:25:45 +0000 (11:25 +0100)]
net/sfc: check actual all multicast unknown unicast filters

Check that unknown unicast and unknown multicast filters are
applied and return an error if they are not applied. The error
is used in promiscuous and all multicast mode enable and disable
callbacks.

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
4 years agonet/sfc/base: add API to get currently operating filters
Igor Romanov [Mon, 30 Mar 2020 10:25:44 +0000 (11:25 +0100)]
net/sfc/base: add API to get currently operating filters

Unknown unicast filter creation may fail because of insufficient
permissions on VF. This failure is handled internally in libefx MAC
reconfiguration without any way for a user to know if it happened.
Making the MAC reconfiguration forward error code of filter
reconfiguration would be too destructive to the existing code
that may rely on the function never returning that error.

Add an API for getting the status of current unknown unicast and
all multicast filters since user must know that requested
filters are actually applied.

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
4 years agonet/sfc/base: refactor multicast filters reconfiguration
Igor Romanov [Mon, 30 Mar 2020 10:25:43 +0000 (11:25 +0100)]
net/sfc/base: refactor multicast filters reconfiguration

Refactor the multicast filter reconfiguration stage of the reconfigure
function to make it clearer and allow for more convenient further
changes.

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
4 years agonet/sfc/base: refactor unicast filters reconfiguration
Igor Romanov [Mon, 30 Mar 2020 10:25:42 +0000 (11:25 +0100)]
net/sfc/base: refactor unicast filters reconfiguration

Refactor the unicast filter reconfiguration stage of the reconfigure
function to make it clearer and allow for more convenient further
changes.

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
4 years agonet/sfc/base: refactor filters mark in reconfigure
Igor Romanov [Mon, 30 Mar 2020 10:25:41 +0000 (11:25 +0100)]
net/sfc/base: refactor filters mark in reconfigure

Refactor the filters mark stage of the reconfigure function
to make it clearer and allow for more convenient further changes.

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
4 years agonet/sfc/base: refactor filters cleanup in reconfigure
Igor Romanov [Mon, 30 Mar 2020 10:25:40 +0000 (11:25 +0100)]
net/sfc/base: refactor filters cleanup in reconfigure

Refactor the filters cleanup stage of the reconfigure function
to make it clearer and allow for more convenient further changes.

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
4 years agonet/nfb: check array size before access
Martin Spinler [Wed, 1 Apr 2020 06:38:01 +0000 (08:38 +0200)]
net/nfb: check array size before access

The driver wrongly assumed the presence of at least one rxmac in every
firmware and accessed to non-existing unit

Signed-off-by: Martin Spinler <spinler@cesnet.cz>
Acked-by: Jakub Neruda <neruda@netcope.com>
4 years agonet/vmxnet3: support MTU set
Eduard Serra [Wed, 25 Mar 2020 19:18:51 +0000 (12:18 -0700)]
net/vmxnet3: support MTU set

(Picked up from @Charles Myers patch
https://patchwork.dpdk.org/patch/57771/)

When the mtu_set() function is not implemented, rte_eth_dev_set_mtu()
fails with -ENOTSUP and mtu is not stored in the mtu field in the
rte_eth_dev_data.  This causes the mtu in Vmxnet3_MiscConf which is
shared with hypervisor to always be set to 1500.

This may cause issues receiving jumbo frames on Enhanced Data Path
N-VDS.

Signed-off-by: Eduard Serra <eserra@vmware.com>
Acked-by: Yong Wang <yongwang@vmware.com>
4 years agonet/i40e: enable VF to program MAC address
Guinan Sun [Tue, 24 Mar 2020 04:36:46 +0000 (04:36 +0000)]
net/i40e: enable VF to program MAC address

Due to the restriction of the flag I40E_FLAG_VF_MAC_BY_PF,
VF cannot program the MAC address.
In order to solve this inflexibility, the use of I40E_FLAG_VF_MAC_BY_PF
has been deleted in the code implementation to ensure that
VF can flexibly program the MAC address.

Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agonet/ice/base: check memory pointer before copying
Haiyue Wang [Tue, 31 Mar 2020 06:50:34 +0000 (14:50 +0800)]
net/ice/base: check memory pointer before copying

The ice_memdup doesn't check the new allocated memory pointer, it calls
the rte_memcpy directly. It should check it.

Fixes: 5f0978e96220 ("net/ice/base: add OS specific implementation")
Cc: stable@dpdk.org
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agodoc: update ixgbe features list
Qi Zhang [Mon, 23 Mar 2020 10:54:31 +0000 (18:54 +0800)]
doc: update ixgbe features list

Remove vector path feature list, if a feature only be supported
in non-vector path, use "P" to represent.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agodoc: update iavf features list
Qi Zhang [Mon, 23 Mar 2020 10:54:30 +0000 (18:54 +0800)]
doc: update iavf features list

Remove vector path feature list, if a feature only be supported
in non-vector path, use "P" to represent.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agodoc: update ice features list
Qi Zhang [Mon, 23 Mar 2020 10:54:29 +0000 (18:54 +0800)]
doc: update ice features list

Remove vector path feature list, if a feature only be supported
in non-vector path, use "P" to represent.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>