Commit Graph

21882 Commits

Author SHA1 Message Date
Michal Krawczyk
14f3f532a1 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>
2020-04-21 13:57:07 +02:00
Michal Krawczyk
6a5283bbad net/ena/base: fix indentation in CQ polling
The spaces instead of tabs were used for the indent.

Fixes: 3adcba9a89 ("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>
2020-04-21 13:57:07 +02:00
Michal Krawczyk
b118993abd net/ena/base: fix documentation of functions
The documentation format was aligned and few typos were fixed.

Fixes: 99ecfbf845 ("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>
2020-04-21 13:57:06 +02:00
Michal Krawczyk
f145360455 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>
2020-04-21 13:57:06 +02:00
Michal Krawczyk
c06c51d16c 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>
2020-04-21 13:57:06 +02:00
Michal Krawczyk
d2138b2302 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>
2020-04-21 13:57:06 +02:00
Michal Krawczyk
585cacc67f 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>
2020-04-21 13:57:06 +02:00
Michal Krawczyk
6e585db689 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: 99ecfbf845 ("ena: import communication layer")
Cc: stable@dpdk.org

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
2020-04-21 13:57:06 +02:00
Michal Krawczyk
086c6b66e8 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>
2020-04-21 13:57:06 +02:00
Igor Chauskin
29dc10d942 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: 9ba7981ec9 ("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>
2020-04-21 13:57:06 +02:00
Igor Chauskin
b14fcac035 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: 9ba7981ec9 ("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>
2020-04-21 13:57:06 +02:00
Michal Krawczyk
38364c2687 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>
2020-04-21 13:57:06 +02:00
Zhaoyan Chen
fd5cbded9e 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>
2020-04-21 13:57:06 +02:00
Qi Zhang
3e1374f201 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: fed0c5ca5f ("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>
2020-04-21 13:57:06 +02:00
Lunyuan Cui
e74e1bb628 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>
2020-04-21 13:57:06 +02:00
Lunyuan Cui
ea0c22fd82 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>
2020-04-21 13:57:06 +02:00
Junyu Jiang
2aa55b4135 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: 5ad3db8d4b ("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>
2020-04-21 13:57:06 +02:00
Yunjian Wang
9d5996c01d 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: ef28aa96e5 ("net/nfp: support multiprocess")
Cc: stable@dpdk.org

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Heinrich Kuhn <heinrich.kuhn@netronome.com>
2020-04-21 13:57:06 +02:00
Ferruh Yigit
735d826e6c 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: 29a62d1476 ("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>
2020-04-21 13:57:06 +02:00
Junyu Jiang
8f5b4af736 examples/vmdq: fix RSS configuration
In order that all queues of pools can receive packets,
add enable-rss argument to change RSS configuration.

Fixes: 6bb97df521 ("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>
2020-04-21 13:57:06 +02:00
Junyu Jiang
9a82259d5d 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>
2020-04-21 13:57:06 +02:00
Eugeny Parshutin
5dd45467b4 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: 2c1bbab7f0 ("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>
2020-04-21 13:57:06 +02:00
Vadim Podovinnikov
321908b6e3 net/memif: fix resource leak
Fixes: c41a04958b ("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>
2020-04-21 13:57:06 +02:00
Xueming Li
9b1249d9ff 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>
2020-04-21 13:57:06 +02:00
Stephen Hemminger
36274f2871 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: 7e6c824307 ("net/netvsc: avoid over filling Rx descriptor ring")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2020-04-21 13:57:06 +02:00
Stephen Hemminger
99c67a0ae7 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>
2020-04-21 13:57:06 +02:00
Stephen Hemminger
56edef9906 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: fc30efe3a2 ("net/netvsc: change Rx descriptor setup and sizing")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2020-04-21 13:57:06 +02:00
Stephen Hemminger
dfd3f0fce8 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: 4e9c73e96e ("net/netvsc: add Hyper-V network device")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2020-04-21 13:57:06 +02:00
Stephen Hemminger
30408aab2d 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: f8279f47dd ("net/netvsc: fix crash in secondary process")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2020-04-21 13:57:06 +02:00
Stephen Hemminger
cc02518132 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: 4e9c73e96e ("net/netvsc: add Hyper-V network device")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2020-04-21 13:57:06 +02:00
Stephen Hemminger
107f3cf310 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: 4e9c73e96e ("net/netvsc: add Hyper-V network device")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2020-04-21 13:57:06 +02:00
Stephen Hemminger
4bc7dc1110 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: dc7680e859 ("net/netvsc: support integrated VF")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2020-04-21 13:57:06 +02:00
Dekel Peled
2fdf502242 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>
2020-04-21 13:57:06 +02:00
Beilei Xing
c8183dd8e0 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>
2020-04-21 13:57:06 +02:00
Beilei Xing
397b4b3c50 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>
2020-04-21 13:57:06 +02:00
Wei Zhao
5d83492603 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: 47d460d632 ("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>
2020-04-21 13:57:06 +02:00
Wei Zhao
5f164249f9 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>
2020-04-21 13:57:06 +02:00
Wei Zhao
45b53ed370 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>
2020-04-21 13:57:06 +02:00
Wei Zhao
277f125f00 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>
2020-04-21 13:57:06 +02:00
Wei Zhao
66ff885179 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>
2020-04-21 13:57:06 +02:00
Wei Zhao
3428c6b6ec 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: 47d460d632 ("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>
2020-04-21 13:57:06 +02:00
Wei Zhao
6bc7628c5e 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: 47d460d632 ("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>
2020-04-21 13:57:06 +02:00
Wei Zhao
187e7244ad 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>
2020-04-21 13:57:06 +02:00
Wei Zhao
edbd1e921f 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>
2020-04-21 13:57:06 +02:00
Wei Zhao
e6c0f28f3f 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>
2020-04-21 13:57:06 +02:00
Wei Zhao
829c310681 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>
2020-04-21 13:57:06 +02:00
Satheesh Paul
0342232aa4 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>
2020-04-21 13:57:06 +02:00
Pavan Nikhilesh
b372fff7d4 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: 548b5839a3 ("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>
2020-04-21 13:57:06 +02:00
Krzysztof Kanas
3912fbde15 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>
2020-04-21 13:57:06 +02:00
Krzysztof Kanas
a3147ae9af 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>
2020-04-21 13:57:06 +02:00