Anatoly Burakov [Fri, 27 Apr 2018 16:38:21 +0000 (17:38 +0100)]
mem: fix page fault trigger
Coverity reports these lines as having no effect. Technically, we do
want for those lines to have no effect, however they would've likely
been optimized out. Add volatile qualifiers to ensure the code has
effects.
Coverity issue: 272608
Fixes:
582bed1e1d1d ("mem: support mapping hugepages at runtime")
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Anatoly Burakov [Mon, 16 Apr 2018 14:37:30 +0000 (15:37 +0100)]
mem: fix potential bad unmap on map failure
Previously, if mmap failed to map page address at requested
address, we were attempting to unmap the wrong address. Fix it
by unmapping our actual mapped address, and jump further to
avoid unmapping memory that is not allocated.
Coverity issue: 272602
Fixes:
582bed1e1d1d ("mem: support mapping hugepages at runtime")
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Anatoly Burakov [Mon, 16 Apr 2018 16:18:55 +0000 (17:18 +0100)]
mem: fix comparison of old policy
Previous code had an old rebase leftover from the time when
oldpolicy was an actual int, instead of a pointer. Fix it to
do comparison with dereferencing the pointer.
Coverity issue: 272589
Fixes:
582bed1e1d1d ("mem: support mapping hugepages at runtime")
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Anatoly Burakov [Mon, 16 Apr 2018 15:37:03 +0000 (16:37 +0100)]
mem: fix potential resource leak on alloc
Normally, tailq entry should have a valid fd by the time we attempt
to map the segment. However, in case it doesn't, we're leaking fd,
so fix it.
Coverity issue: 272570
Fixes:
2a04139f66b4 ("eal: add single file segments option")
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Mon, 16 Apr 2018 15:31:08 +0000 (16:31 +0100)]
mem: fix potential resource leak on freeing
We close fd if we managed to find it in the list of allocated
segment lists (which should always be the case under normal
conditions), but if we didn't, the fd was leaking. Close it if
we couldn't find it in the segment list. This is not an issue
as if the segment is zero length, we're getting rid of it
anyway, so there's no harm in not storing the fd anywhere.
Coverity issue: 272568
Fixes:
2a04139f66b4 ("eal: add single file segments option")
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Anatoly Burakov [Mon, 16 Apr 2018 15:11:55 +0000 (16:11 +0100)]
mem: fix potential double close on map failure
We were closing descriptor before checking if mapping has
failed, but if it did, we did a second close afterwards. Fix
it by moving closing descriptor to after we've done all error
checks.
Coverity issue: 272560
Fixes:
2a04139f66b4 ("eal: add single file segments option")
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Mon, 16 Apr 2018 14:40:02 +0000 (15:40 +0100)]
mem: fix resource leak on map failure
Coverity issue: 272601
Fixes:
66cc45e293ed ("mem: replace memseg with memseg lists")
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Anatoly Burakov [Tue, 17 Apr 2018 13:42:27 +0000 (14:42 +0100)]
mem: use strlcpy instead of snprintf
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Jianfeng Tan [Thu, 26 Apr 2018 08:06:53 +0000 (08:06 +0000)]
mem: fix resize return handling for --single-file-segments
resize_hugefile() returns either 0 (which indicates success) or -1
(which indicates failure). We failed to check the success as we
use --single-file-segments option.
Fixes:
2a04139f66b4 ("eal: add single file segments option")
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Jianfeng Tan [Fri, 27 Apr 2018 16:41:42 +0000 (16:41 +0000)]
eal: fix threads block on barrier
Below commit introduced pthread barrier for synchronization.
But two IPC threads block on the barrier, and never wake up.
(gdb) bt
#0 futex_wait (private=0, expected=0, futex_word=0x7fffffffcff4)
at ../sysdeps/unix/sysv/linux/futex-internal.h:61
#1 futex_wait_simple (private=0, expected=0, futex_word=0x7fffffffcff4)
at ../sysdeps/nptl/futex-internal.h:135
#2 __pthread_barrier_wait (barrier=0x7fffffffcff0) at pthread_barrier_wait.c:184
#3 rte_thread_init (arg=0x7fffffffcfe0)
at ../dpdk/lib/librte_eal/common/eal_common_thread.c:160
#4 start_thread (arg=0x7ffff6ecf700) at pthread_create.c:333
#5 clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
Through analysis, we find the barrier defined on the stack could be the
root cause. This patch will change to use heap memory as the barrier.
Fixes:
d651ee4919cd ("eal: set affinity for control threads")
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Shreyansh Jain [Fri, 27 Apr 2018 17:20:58 +0000 (22:50 +0530)]
bus/dpaa: optimize physical to virtual address search
With Hotplugging memory support, the order of memseg has been changed
from physically contiguous to virtual contiguous. DPAA bus and drivers
depend on PA to VA address conversion for I/O.
This patch creates a list of blocks requested to be pinned to the
DPAA mempool. For searching physical addresses, it is expected that
it would belong to this list (from hardware pool) and hence it is
less expensive than memseg walks. Though, there is a marginal drop
in performance vis-a-vis the legacy mode with physically contiguous
memsegs.
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Shreyansh Jain [Fri, 27 Apr 2018 17:20:57 +0000 (22:50 +0530)]
bus/fslmc: optimize physical to virtual address search
With Hotplugging memory support, the order of memseg has been changed
from physically contiguous to virtual contiguous. FSLMC bus and dpaa2
drivers depend on PA to VA address conversion when in Physical
addressing mode.
This patch creates a list of blocks requested to be pinned to the
DPAA2 mempool. For searching physical addresses, it is expected that
it would belong to this list (from hardware pool) and hence it is
less expensive than memseg walks. Though, this has marginal impact on
performance vis-a-vis legacy mode with physically contiguous memsegs.
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Shreyansh Jain [Fri, 27 Apr 2018 17:20:56 +0000 (22:50 +0530)]
crypto/dpaa_sec: remove ctx based offset for PA-VA conversion
Crypto requires physical to virtual address conversion for
descriptors. Prior to memory hotplugging this was based on memseg
iteration assuming memsegs are all physical contiguous and using
cached start address fast calculations can be done. This
assumption now stands invalid with memory hotplugging support.
In preparation for supporting hotplugging change to memory,
this patchset removes the optimized pool context stored physical
address offset based PA-VA conversion.
This adversely affects the performance as complete memsegs now need
to be parsed, but a rework containing necessary optimization would be
posted over this.
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Yongseok Koh [Fri, 27 Apr 2018 17:22:52 +0000 (10:22 -0700)]
app/testpmd: conserve offload flags of mbuf
This patch is to accommodate an experimental feature of mbuf - external
buffer attachment. If mbuf is attached to an external buffer, its ol_flags
will have EXT_ATTACHED_MBUF set. Without enabling/using the feature,
everything remains same.
If PMD delivers Rx packets with non-direct mbuf, ol_flags should not be
overwritten. For mlx5 PMD, if Multi-Packet RQ is enabled, Rx packets could
be carried with externally attached mbufs.
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Yongseok Koh [Fri, 27 Apr 2018 17:22:51 +0000 (10:22 -0700)]
mbuf: support attaching external buffer
This patch introduces a new way of attaching an external buffer to a mbuf.
Attaching an external buffer is quite similar to mbuf indirection in
replacing buffer addresses and length of a mbuf, but a few differences:
- When an indirect mbuf is attached, refcnt of the direct mbuf would be
2 as long as the direct mbuf itself isn't freed after the attachment.
In such cases, the buffer area of a direct mbuf must be read-only. But
external buffer has its own refcnt and it starts from 1. Unless
multiple mbufs are attached to a mbuf having an external buffer, the
external buffer is writable.
- There's no need to allocate buffer from a mempool. Any buffer can be
attached with appropriate free callback.
- Smaller metadata is required to maintain shared data such as refcnt.
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Fan Zhang [Fri, 27 Apr 2018 14:06:08 +0000 (15:06 +0100)]
vhost/crypto: fix checks while moving descriptors
This patch fix final condition check while moving virtqueue
descriptors.
Fixes:
3bb595ecd682 ("vhost/crypto: add request handler")
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Fan Zhang [Fri, 27 Apr 2018 13:52:33 +0000 (14:52 +0100)]
vhost/crypto: fix missing head correction
This patch fixes the missing head descriptor correction for
indirect descriptors.
Fixes:
0aee2428419f ("vhost/crypto: move to safe GPA translation API")
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Xiao Wang [Wed, 25 Apr 2018 02:18:27 +0000 (10:18 +0800)]
vhost: fix vDPA set features
We should call set_features callback after setting features in virtio_net
structure, otherwise vDPA driver cannot get the right features.
Fixes:
07718b4f87aa ("vhost: adapt library for selective datapath")
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Zhihong Wang <zhihong.wang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Maxime Coquelin [Fri, 20 Apr 2018 08:39:21 +0000 (10:39 +0200)]
vhost: revert avoid concurrency when logging dirty pages
This reverts commit
394313fff39d0f994325c47f7eab39daf5dc9e11.
While the patch did solve concurrency issue, it induces more
pages copies as some clean pages are marked as dirty for
performance reasons. Moreover, as there is no more contention
doing the logging, the rate of packets than can be processed is
higher, leading to even more pages to be dirtied.
It has been reported that with more than one queue pair, and
with a relatively low packet rate (1Mpps), the live migration
never converges until the flow is stopped.
While a better solution is found, it is better to reset to the
old behaviour, i.e. using atomic operation for dirty pages
logging.
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Matej Vido [Fri, 27 Apr 2018 08:57:05 +0000 (10:57 +0200)]
doc: update doc and release notes for szedata2 driver
New version of the packages with dependencies for the szedata2
driver is needed due to the new API of the libsze2 library which
is used in the driver.
The documentation and the release notes are updated to contain
the information about the required versions.
Signed-off-by: Matej Vido <vido@cesnet.cz>
Acked-by: Jan Remes <remes@netcope.com>
Yanglong Wu [Fri, 27 Apr 2018 08:14:07 +0000 (16:14 +0800)]
net/i40e: fix checking offload
Missing "return -ENOTSUP" will always lead to illegal offload
passing through offload checking.
Fixes:
7497d3e2f777 ("net/i40e: convert to new Tx offloads API")
Signed-off-by: Yanglong Wu <yanglong.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Yanglong Wu [Wed, 18 Apr 2018 01:42:04 +0000 (09:42 +0800)]
net/i40e: fix missing jumbo frame offload capability
JUMBO_FRAME offload capability should be exposed since i40e
does support it
Fixes:
c3ac7c5b0b8a ("net/i40e: convert to new Rx offloads API")
Signed-off-by: Yanglong Wu <yanglong.wu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Ferruh Yigit [Thu, 26 Apr 2018 21:25:59 +0000 (22:25 +0100)]
ethdev: rename folder to library name
Library folder name and output library name are same except a few flaws
including librte_ether.
This library is network device abstraction layer, the name "ethdev" fits
better than "ether", and library & header files already named as ethdev.
Also there is a rte_ether.h in the net library which can cause confusion.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Stephen Hemminger [Wed, 25 Apr 2018 15:56:46 +0000 (08:56 -0700)]
net/bonding: convert to dynamic logging
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Stephen Hemminger [Wed, 25 Apr 2018 15:56:45 +0000 (08:56 -0700)]
net/vhost: implement dynamic logging
Use dynamic log type (instead of PMD) in vhost.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Stephen Hemminger [Wed, 25 Apr 2018 15:56:44 +0000 (08:56 -0700)]
net/pcap: support dynamic logging
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Stephen Hemminger [Wed, 25 Apr 2018 15:56:43 +0000 (08:56 -0700)]
net/kni: support dynamic logging
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Stephen Hemminger [Wed, 25 Apr 2018 15:56:42 +0000 (08:56 -0700)]
net/failsafe: convert to dynamic logging
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Stephen Hemminger [Wed, 25 Apr 2018 15:56:41 +0000 (08:56 -0700)]
net/softnic: convert to dynamic logging
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Stephen Hemminger [Wed, 25 Apr 2018 15:56:40 +0000 (08:56 -0700)]
net/ring: convert to dynamic logging
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Stephen Hemminger [Wed, 25 Apr 2018 15:56:39 +0000 (08:56 -0700)]
net/null: convert to dynamic logging
Convert null device to use dynamic logging.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Stephen Hemminger [Wed, 25 Apr 2018 15:56:38 +0000 (08:56 -0700)]
net/af_packet: convert to dynamic log level
Convert this driver to use dynamic log level support.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Stephen Hemminger [Wed, 25 Apr 2018 15:56:37 +0000 (08:56 -0700)]
net/tap: convert to dynamic logging
Use new logging macro to convert all calls to RTE_LOG() into
new dynamic log type.
Also fix whitespace.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Andrew Rybchenko [Thu, 19 Apr 2018 11:37:06 +0000 (12:37 +0100)]
doc: advertise equal stride super-buffer Rx mode in net/sfc
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Roman Zhukov [Thu, 19 Apr 2018 11:37:05 +0000 (12:37 +0100)]
net/sfc: support MARK and FLAG actions in flow API
Signed-off-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Roman Zhukov [Thu, 19 Apr 2018 11:37:04 +0000 (12:37 +0100)]
net/sfc: make processing of flow rule actions more uniform
Prepare function that parse flow rule actions to support not
fate-deciding actions.
Signed-off-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Roman Zhukov [Thu, 19 Apr 2018 11:37:03 +0000 (12:37 +0100)]
net/sfc/base: get max supported value for action MARK
The mark value for MATCH_ACTION_MARK has a maximum value.
Requesting a value larger than the maximum will cause the
filter insertion to fail with EINVAL. This patch allows the
driver to check the value at the filter validation.
Signed-off-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Roman Zhukov [Thu, 19 Apr 2018 11:37:02 +0000 (12:37 +0100)]
net/sfc/base: support MARK and FLAG actions in filters
This patch adds support for DPDK rte_flow "MARK" and "FLAG" filter
actions to filters on EF10 family NICs.
Signed-off-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Roman Zhukov [Thu, 19 Apr 2018 11:37:01 +0000 (12:37 +0100)]
net/sfc/base: get actions MARK and FLAG support
Filter actions MARK and FLAG are supported on Medford2 by DPDK
firmware variant.
Signed-off-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andrew Rybchenko [Thu, 19 Apr 2018 11:37:00 +0000 (12:37 +0100)]
net/sfc: support flow marks in equal stride super-buffer Rx
Equal stride super-buffer Rx mode allows to mark packets in HW
using filters. Process the data on datapath and advertise
corresponding features to allow flow API support to implement it.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andrew Rybchenko [Thu, 19 Apr 2018 11:36:59 +0000 (12:36 +0100)]
net/sfc: add Rx descriptor wait timeout
Add device argument to customize Rx descriptor wait timeout which
is supported in DPDK firmware variant only in equal stride super-buffer
Rx mode only.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Andrew Rybchenko [Thu, 19 Apr 2018 11:36:58 +0000 (12:36 +0100)]
net/sfc: support DPDK firmware variant
DPDK firmware variant supports equal stride super-buffer Rx mode which
provides higher packet rate and packet marks but requires dedicated
mempool manager with contiguous object block allocation (e.g. bucket).
Also the firmware supports subvariant without checksumming on Tx which
allows to reach higher packet rates on transmit if checksumming is not
required.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Andrew Rybchenko [Thu, 19 Apr 2018 11:36:57 +0000 (12:36 +0100)]
net/sfc: check mempool when equal stride super-buffer used
Equal stride super-buffer requires mempool with contiguous object
block allocation mechanism. Bucket mempool is the only which provides it.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Andrew Rybchenko [Thu, 19 Apr 2018 11:36:56 +0000 (12:36 +0100)]
net/sfc: support callback to check if mempool is supported
The callback is a dummy yet since no Rx datapath provides its own
callback, so all pools are supported.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Andrew Rybchenko [Thu, 19 Apr 2018 11:36:55 +0000 (12:36 +0100)]
net/sfc: support equal stride super-buffer Rx mode
HW Rx descriptor represents many contiguous packet buffers which
follow each other. Number of buffers, stride and maximum DMA
length are setup-time configurable per Rx queue based on provided
mempool. The mempool must support contiguous block allocation and
get info API to retrieve number of objects in the block.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Andrew Rybchenko [Thu, 19 Apr 2018 11:36:54 +0000 (12:36 +0100)]
net/sfc: allow to take mbuf pool into account when sizing
The new argument will be used by the equal stride super-buffer
Rx datapath.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Andrew Rybchenko [Thu, 19 Apr 2018 11:36:53 +0000 (12:36 +0100)]
net/sfc: allow one Rx queue entry carry many packet buffers
One HW Rx descriptor has many packet buffers in the case of equal
stride super-buffer Rx modes. Each packet buffer is still treated
as separate SW Rx descriptor. rxq_entries is the size of HW Rx ring
whereas nb_rx_desc is the number of SW Rx descriptors.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Andrew Rybchenko [Thu, 19 Apr 2018 11:36:52 +0000 (12:36 +0100)]
net/sfc: conditionally compile support for tunnel packets
Equal stride super-buffer Rx datapath does not support tunnels, code to
parse tunnel packet types and inner checksum offload is not required and
it is important to be able to compile it out on build time to avoid
extra CPU load.
Cutting of tunnels support relies on compiler optimizaitons to
be able to drop extra checks and branches if tun_ptype is always 0.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Andrew Rybchenko [Thu, 19 Apr 2018 11:36:51 +0000 (12:36 +0100)]
net/sfc: move EF10 Rx event parser to shared header
Equal stride super-buffer Rx datapath will use it as well.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Andrew Rybchenko [Thu, 19 Apr 2018 11:36:50 +0000 (12:36 +0100)]
net/sfc: prepare EF10 Rx event parser to be reused
Equal stride super-buffer Rx mode will be handled by the dedicated
Rx datapath and the mode has almost the same Rx event structure as
single packet Rx mode.
Restructure the code to allow the common parts to be shared.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Andrew Rybchenko [Thu, 19 Apr 2018 11:36:49 +0000 (12:36 +0100)]
net/sfc: factor out function to push Rx doorbell
The function may be shared by different Rx datapath implementations.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Andrew Rybchenko [Thu, 19 Apr 2018 11:36:48 +0000 (12:36 +0100)]
net/sfc/base: add equal stride super-buffer prefix layout
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andrew Rybchenko [Thu, 19 Apr 2018 11:36:47 +0000 (12:36 +0100)]
net/sfc/base: support equal stride super-buffer Rx mode
Equal stride super-buffer Rx mode is supported by DPDK firmware
variant. One Rx descriptor provides many Rx buffers to firmware.
Rx buffers follow each other with specified stride.
Also it supports head of line blocking with timeout to address
drops when no Rx descriptors are available. So it gives extra time
to the driver to provide Rx descriptors before drop.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andrew Rybchenko [Thu, 19 Apr 2018 11:36:46 +0000 (12:36 +0100)]
net/sfc/base: detect equal stride super-buffer support
Equal stride super-buffer Rx mode is supported on Medford2 by
DPDK firmware variant.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andrew Rybchenko [Thu, 19 Apr 2018 11:36:45 +0000 (12:36 +0100)]
net/sfc/base: make RxQ type data an union
The type is an internal interface. Single integer is insufficient
to carry RxQ type-specific information in the case of equal stride
super-buffer Rx mode (packet buffers per bucket, maximum DMA length,
packet stride, head of line block timeout).
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andrew Rybchenko [Thu, 19 Apr 2018 11:36:44 +0000 (12:36 +0100)]
net/sfc/base: update autogenerated MCDI and TLV headers
Equal stride super-buffer is a new name instead of deprecated equal
stride packed stream to avoid confusion with previous packed stream.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Stephen Hemminger [Wed, 25 Apr 2018 15:45:51 +0000 (08:45 -0700)]
net/nfp: use dynamic logging everywhere
Drivers should only log with their assigned logtype, not with the
generic PMD log type.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Stephen Hemminger [Wed, 25 Apr 2018 15:45:50 +0000 (08:45 -0700)]
net/nfp: add newline in PMD_RX/TX_LOG macros
Be consistent with usage in other drivers.
No need for snowflake drivers.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Stephen Hemminger [Wed, 25 Apr 2018 15:45:49 +0000 (08:45 -0700)]
net/nfp: fix double space in init log
Shouldn't pass extra newline.
Fixes:
7dcb19d78f27 ("net/nfp: fix Rx interrupt when multiqueue")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Stephen Hemminger [Wed, 25 Apr 2018 15:45:48 +0000 (08:45 -0700)]
net/nfp: add implied new line to log macro
The PMD_INIT_LOG macro always adds a newline, and other drivers version
of PMD_DRV_LOG always adds a newline. Therefore change nfp driver
to be consitent with others.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Stephen Hemminger [Wed, 25 Apr 2018 15:45:47 +0000 (08:45 -0700)]
net/nfp: use correct logtype for init messages
The NFP driver init messages would come out under PMD not net.pmd.nfp.init.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Declan Doherty [Thu, 26 Apr 2018 17:29:19 +0000 (18:29 +0100)]
ethdev: add shared counter to flow API
Add rte_flow_action_count action data structure to enable shared
counters across multiple flows on a single port or across multiple
flows on multiple ports within the same switch domain. Also this enables
multiple count actions to be specified in a single flow action.
This patch also modifies the existing rte_flow_query API to take the
rte_flow_action structure as an input parameter instead of the
rte_flow_action_type enumeration to allow querying a specific action
from a flow rule when multiple actions of the same type are specified.
This patch also contains updates for the bonding, failsafe and mlx5 PMDs
and testpmd application which are affected by this API change.
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Declan Doherty [Thu, 26 Apr 2018 17:29:18 +0000 (18:29 +0100)]
ethdev: add mark flow item
Introduces a new action type RTE_FLOW_ITEM_TYPE_MARK which enables
flow patterns to specify arbitrary integer values to match aginst
set by the RTE_FLOW_ACTION_TYPE_MARK action in previously matched
flows.
Add support for specification of new MARK flow item in testpmd's cli.
Update testpmd documentation to describe new MARK flow item support.
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Declan Doherty [Thu, 26 Apr 2018 17:29:17 +0000 (18:29 +0100)]
ethdev: add group jump action
Add jump action type which defines an action which allows a matched
flow to be redirect to the specified group. This allows physical and
logical flow table/group hierarchies to be defined through rte_flow.
This breaks ABI compatibility for the following public functions (as it
modifes the ordering of the rte_flow_action_type enumeration):
- rte_flow_copy()
- rte_flow_create()
- rte_flow_query()
- rte_flow_validate()
Add support for specification of new JUMP action to testpmd's flow
cli, and update the testpmd documentation to describe this new
action.
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Declan Doherty [Thu, 26 Apr 2018 17:29:16 +0000 (18:29 +0100)]
ethdev: add tunnel encap/decap actions
Add new flow action types and associated action data structures to
support the encapsulation and decapsulation of VXLAN and NVGRE tunnel
endpoints.
The RTE_FLOW_ACTION_TYPE_[VXLAN/NVGRE]_ENCAP action will cause the
matching flow to be encapsulated in the tunnel endpoint overlay
defined in the [vxlan/nvgre]_encap action data.
The RTE_FLOW_ACTION_TYPE_[VXLAN/NVGRE]_DECAP action will cause all
headers associated with the outer most tunnel endpoint of the specified
type for the matching flows.
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Andrew Rybchenko [Thu, 26 Apr 2018 16:48:57 +0000 (17:48 +0100)]
net/sfc: do not use RSS context if it is not required
RSS action with only one destination queue and no specific settings
for hash types and key does not require dedicated RSS context and
may be simplified to QUEUE action.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Ophir Munk [Thu, 26 Apr 2018 11:13:02 +0000 (11:13 +0000)]
net/tap: return empty port offload capabilities
Fix internal report on port specific offload capabilities to be 0 (no
capabilities). Before this commit port capabilities were a clone of queue
capabilities, however the current TAP offload capabilities (e.g.
checksum calculation) are per queue and are not specific per port.
This commit fixes an internal validation check for new configured
queue offloads.
The port capability API keeps reporting all queue capabilities as port
capabilities.
Fixes:
95ae196ae10b ("net/tap: use new Rx offloads API")
Fixes:
818fe14a9891 ("net/tap: use new Tx offloads API")
Cc: stable@dpdk.org
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Andrew Rybchenko [Wed, 25 Apr 2018 17:18:34 +0000 (18:18 +0100)]
net/sfc: ignore spec bits not covered by mask
mask is a simple bit-mask applied before interpreting the contents
of spec and last.
Fixes:
a9825ccf5bb8 ("net/sfc: support flow API filters")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Declan Doherty [Thu, 26 Apr 2018 10:41:05 +0000 (11:41 +0100)]
net/ixgbe: add support for representor ports
Add support for virtual function representor ports to the ixgbe PF
driver. When SR-IOV virtual functions devices are enabled a
corresponding representor port for each VF can be enabled in the
process in which the ixgbe PMD is running within, by specifying the
representor devargs with the list of VF ports that representors
are to be created for.
An example of the devargs which would create VF representor for virtual
functions 0,2,4,5,6 and 7 is:
-w DBDF,representor=[0,2,4-7]
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Signed-off-by: Mohammad Abdul Awal <mohammad.abdul.awal@intel.com>
Signed-off-by: Remy Horton <remy.horton@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Declan Doherty [Thu, 26 Apr 2018 10:41:04 +0000 (11:41 +0100)]
net/i40e: add support for representor ports
Add support for virtual function representor ports to the i40e PF
driver. When SR-IOV virtual functions devices are enabled a
corresponding representor port for each VF can be enabled, in the
process in which the i40e PMD is running, by specifying the
representor devargs with the list of VF ports that representors
are to be created for.
An example of the devargs which would create VF representor for virtual
functions 0,2,4,5,6 and 7 is:
-w DBDF,representor=[0,2,4-7]
and to just specify a single representor on virtual function 3 (switch
port id):
-w DBDF,representor=3
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Signed-off-by: Mohammad Abdul Awal <mohammad.abdul.awal@intel.com>
Signed-off-by: Remy Horton <remy.horton@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Declan Doherty [Thu, 26 Apr 2018 10:41:03 +0000 (11:41 +0100)]
ethdev: add switch domain allocator
Add switch domain allocate and free API to enable NET devices to
synchronise switch domain allocation.
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Remy Horton [Thu, 26 Apr 2018 10:41:02 +0000 (11:41 +0100)]
ethdev: add common devargs parser
Introduces a new structure, rte_eth_devargs, to support generic
ethdev arguments common across NET PMDs, with a new API
rte_eth_devargs_parse API to support PMD parsing these arguments. The
patch add support for a representor argument passed with passed with
the EAL -w option. The representor parameter allows the user to specify
which representor ports to initialise on a device.
The argument supports passing a single representor port, a list of
port values or a range of port values.
-w BDF,representor=1 # create representor port 1 on pci device BDF
-w BDF,representor=[1,2,5,6,10] # create representor ports in list
-w BDF,representor=[0-31] # create representor ports in range
Signed-off-by: Remy Horton <remy.horton@intel.com>
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Declan Doherty [Thu, 26 Apr 2018 10:41:01 +0000 (11:41 +0100)]
app/testpmd: add port name to device info
Add the port name to information printed by show port info <port_id>
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Declan Doherty [Thu, 26 Apr 2018 10:41:00 +0000 (11:41 +0100)]
ethdev: add port representor device flag
Add new device flag to specify that an ethdev port is a port
representor. Extend rte_eth_dev_info structure to expose device flags
to the user which enables applications to discover if a port is a
representor port.
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Declan Doherty [Thu, 26 Apr 2018 10:40:59 +0000 (11:40 +0100)]
ethdev: add generic create/destroy ethdev APIs
Add new bus generic ethdev create/destroy APIs which are bus independent
and provide hooks for bus specific initialisation.
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Declan Doherty [Thu, 26 Apr 2018 10:40:58 +0000 (11:40 +0100)]
ethdev: add switch identifier parameter to port
Introduces a new port attribute to ethdev port's which denotes the
switch domain a port belongs to. By default all port's switch
identifiers are set to RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID. Ports
which supported the concept of switch domains can be configured with
the same switch domain id.
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Declan Doherty [Thu, 26 Apr 2018 10:40:57 +0000 (11:40 +0100)]
doc: add switch representation documentation
Add document to describe the model for representing switching capable
devices in DPDK, using a general ethdev port model and through port
representors. This document also details the port model and the
rte_flow semantics required for flow programming, as well as listing
some example use cases.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Reviewed-by: Marko Kovacevic <marko.kovacevic@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Xueming Li [Mon, 23 Apr 2018 12:33:10 +0000 (20:33 +0800)]
doc: update mlx5 guide on tunnel offloading
Remove tunnel limitations, add new hardware tunnel offload features.
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Xueming Li [Mon, 23 Apr 2018 12:33:09 +0000 (20:33 +0800)]
net/mlx5: allow flow tunnel ID 0 with outer pattern
Tunnel w/o tunnel id pattern could match any non-tunneled packet,
this patch allowed tunnel w/o tunnel id pattern after proper outer spec.
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Xueming Li [Mon, 23 Apr 2018 12:33:08 +0000 (20:33 +0800)]
net/mlx5: introduce VXLAN-GPE tunnel type
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Xueming Li [Mon, 23 Apr 2018 12:33:07 +0000 (20:33 +0800)]
net/mlx5: add hardware flow debug dump
Dump verb flow detail including flow spec type and size for debugging
purpose.
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Xueming Li [Mon, 23 Apr 2018 12:33:06 +0000 (20:33 +0800)]
net/mlx5: support tunnel RSS level
Tunnel RSS level of flow RSS action offers user a choice to do RSS hash
calculation on inner or outer RSS fields. Testpmd flow command examples:
GRE flow inner RSS:
flow create 0 ingress pattern eth / ipv4 proto is 47 / gre / end
actions rss queues 1 2 end level 1 / end
GRE tunnel flow outer RSS:
flow create 0 ingress pattern eth / ipv4 proto is 47 / gre / end
actions rss queues 1 2 end level 0 / end
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Xueming Li [Mon, 23 Apr 2018 12:33:05 +0000 (20:33 +0800)]
net/mlx5: split flow RSS handling logic
This patch split out flow RSS hash field handling logic to dedicate
function.
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Xueming Li [Mon, 23 Apr 2018 12:33:04 +0000 (20:33 +0800)]
net/mlx5: cleanup tunnel checksum offloads
Once tunnel packet type(RTE_PTYPE_TUNNEL_xxx) identified,
PKT_RX_IP_CKSUM_XXX and PKT_RX_L4_CKSUM_XXX represent checksum result of
inner headers, outer L3 and L4 header checksum are always valid as soon
as tunnel identified. If no tunnel identified, PKT_RX_IP_CKSUM_XXX and
PKT_RX_L4_CKSUM_XXX represent checksum result of outer L3 and L4
headers.
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Xueming Li [Mon, 23 Apr 2018 12:33:03 +0000 (20:33 +0800)]
net/mlx5: support Rx tunnel type identification
This patch introduced tunnel type identification based on flow rules.
If flows of multiple tunnel types built on same queue, no tunnel type
will be returned. User application could use bits in flow mark as tunnel
type identifier.
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Xueming Li [Mon, 23 Apr 2018 12:33:02 +0000 (20:33 +0800)]
net/mlx5: support L3 VXLAN flow
This patch support L3 VXLAN, no inner L2 header comparing to standard
VXLAN protocol. L3 VXLAN using specific overlay UDP destination port to
discriminate against standard VXLAN, device parameter and FW has to be
configured to support it:
sudo mlxconfig -d <device> -y s IP_OVER_VXLAN_EN=1
sudo mlxconfig -d <device> -y s IP_OVER_VXLAN_PORT=<port>
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Xueming Li [Mon, 23 Apr 2018 12:33:01 +0000 (20:33 +0800)]
net/mlx5: support GRE tunnel flow
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Xueming Li [Mon, 23 Apr 2018 12:33:00 +0000 (20:33 +0800)]
net/mlx5: support 16 hardware priorities
This patch supports new 16 Verbs flow priorities by trying to create a
simple flow of priority 15. If 16 priorities not available, fallback to
traditional 8 priorities.
Verb priority mapping:
8 priorities >=16 priorities
Control flow: 4-7 8-15
User normal flow: 1-3 4-7
User tunnel flow: 0-2 0-3
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Qi Zhang [Wed, 25 Apr 2018 13:38:16 +0000 (21:38 +0800)]
app/testpmd: fix config due to RSS offload check
After add RSS hash offload check, default rss_hf will fail on
devices that not support all bits, the patch take rss_hf as
a suggest value and only set bits that device supported base on
rte_eth_dev_get_info, also rss_hf will only be updated when new
rss offload is successfully updated on all ports by
"port config all rss [!default]" command.
Fixes:
8863a1fbfc66 ("ethdev: add supported hash function check")
Fixes:
d9aa619c60b6 ("app/testpmd: new parameter for port config all RSS command")
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Tested-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Ivan Malov [Wed, 25 Apr 2018 17:51:44 +0000 (18:51 +0100)]
net/sfc: convert to the advanced EFX RSS interface
The current code has the following drawbacks:
- It is assumed that TCP 4-tuple hash is
always supported, which is untrue in
the case of packed stream FW variant.
- The driver is unaware of UDP hash support
available with latest firmware.
In order to cope with the mentioned issues, this
patch implements the new approach to handle hash
settings using the advanced EFX RSS interface.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Ivan Malov [Wed, 25 Apr 2018 17:51:43 +0000 (18:51 +0100)]
net/sfc: factor out RSS fields from adapter info
RSS handling will need more sophisticated fields
in the adapter context storage in future patches.
This patch groups existing fields in a dedicated
structure and updates the rest of the code.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Ivan Malov [Wed, 25 Apr 2018 17:51:42 +0000 (18:51 +0100)]
net/sfc: remove conditional compilation for RSS
RSS is one of the most valuable features in the
driver, and one would hardly need to disable it
at build time. This patch withdraws unnecessary
conditionals for RSS snippets.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Ivan Malov [Wed, 25 Apr 2018 17:51:41 +0000 (18:51 +0100)]
net/sfc: process RSS settings on Rx configure step
One may submit advanced RSS settings as part of
rte_eth_conf to customise RSS configuration from
the very beginning. Currently the driver does not
check that piece of settings and proceeds with
default choices for RSS hash functions and RSS key.
This patch implements the required processing.
Fixes:
4ec1fc3ba881 ("net/sfc: add basic stubs for RSS support on driver attach")
Cc: stable@dpdk.org
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Ivan Malov [Wed, 25 Apr 2018 17:51:40 +0000 (18:51 +0100)]
net/sfc/base: honour packed stream RSS restriction
Packed stream firmware variant on EF10 adapters has a
number of properties which must be taken into account:
- Only one exclusive RSS context is available per port.
- Only IP addresses can contribute to the hash value.
Huntington and Medford have one more limitation which
is important for the drivers capable of packed stream:
- Hash algorithm is non-standard (i.e. non-Toeplitz).
This implies XORing together source + destination
IP addresses (or last four bytes in the case of IPv6)
and using the result as the input to a Toeplitz hash.
This patch provides a number of improvements in order
to treat the mentioned limitations in the common code.
If the firmware variant is packed stream, the list of
supported hash tuples will include less variants, and
the maximum number of RSS contexts will be set to one.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Ivan Malov [Wed, 25 Apr 2018 17:51:39 +0000 (18:51 +0100)]
net/sfc/base: support more RSS hash configurations
Modern firmwares on EF10 adapters have support for
more traffic classes eligible for hash computation.
Also, it has become possible to adjust hashing per
individual class and select distinct packet fields
which will be able to contribute to the hash value.
This patch adds support for the mentioned features.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Ivan Malov [Wed, 25 Apr 2018 17:51:38 +0000 (18:51 +0100)]
net/sfc/base: add a new means to control RSS hash
Currently, libefx has no support for additional RSS modes
available with later controllers. In order to support this,
libefx should be able to list available hash configurations.
This patch provides basic infrastructure for the new interface.
The client drivers will be able to query the list of supported
hash configurations for a particular hash algorithm. Also, it
will be possible to configure hashing by means of new definitions.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andrew Rybchenko [Wed, 25 Apr 2018 17:51:37 +0000 (18:51 +0100)]
net/sfc/base: cope with clang warning on negative shift
clang 4.0.1-6 on Ubuntu generates false positive warning that shift
is negative. It is done regardless of the fact that the branch is
not taken because of previous check.
The warning is generate in EFX_INSERT_NATIVE32 used by
EFX_INSERT_FIELD_NATIVE32. All similar cases are fixed as well.
It is undesirable to suppress the warning completely.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Qi Zhang [Tue, 24 Apr 2018 15:59:02 +0000 (17:59 +0200)]
ethdev: add VLAN and MPLS actions to flow API
Add support for the following OpenFlow-defined actions:
- RTE_FLOW_ACTION_OF_POP_VLAN: pop the outer VLAN tag.
- RTE_FLOW_ACTION_OF_PUSH_VLAN: push a new VLAN tag.
- RTE_FLOW_ACTION_OF_SET_VLAN_VID: set the 802.1q VLAN id.
- RTE_FLOW_ACTION_OF_SET_VLAN_PCP: set the 802.1q priority.
- RTE_FLOW_ACTION_OF_POP_MPLS: pop the outer MPLS tag.
- RTE_FLOW_ACTION_OF_PUSH_MPLS: push a new MPLS tag.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Qi Zhang [Tue, 24 Apr 2018 15:59:00 +0000 (17:59 +0200)]
ethdev: add TTL change actions to flow API
Add support for the following OpenFlow-defined actions:
- RTE_FLOW_ACTION_OF_SET_MPLS_TTL: MPLS TTL.
- RTE_FLOW_ACTION_OF_DEC_MPLS_TTL: decrement MPLS TTL.
- RTE_FLOW_ACTION_OF_SET_NW_TTL: IP TTL.
- RTE_FLOW_ACTION_OF_DEC_NW_TTL: decrement IP TTL.
- RTE_FLOW_ACTION_OF_COPY_TTL_OUT: copy TTL "outwards".
- RTE_FLOW_ACTION_OF_COPY_TTL_IN: copy TTL "inwards".
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Qi Zhang [Tue, 24 Apr 2018 15:58:58 +0000 (17:58 +0200)]
ethdev: add neighbor discovery to flow API
- RTE_FLOW_ITEM_TYPE_ARP_ETH_IPV4: matches an ARP header for Ethernet/IPv4.
- RTE_FLOW_ITEM_TYPE_IPV6_EXT: matches the presence of any IPv6 extension
header.
- RTE_FLOW_ITEM_TYPE_ICMP6: matches any ICMPv6 header.
- RTE_FLOW_ITEM_TYPE_ICMP6_ND_NS: matches an ICMPv6 neighbor discovery
solicitation.
- RTE_FLOW_ITEM_TYPE_ICMP6_ND_NA: matches an ICMPv6 neighbor discovery
advertisement.
- RTE_FLOW_ITEM_TYPE_ICMP6_ND_OPT: matches the presence of any ICMPv6
neighbor discovery option.
- RTE_FLOW_ITEM_TYPE_ICMP6_ND_OPT_ETH_SLA: matches an ICMPv6 neighbor
discovery source Ethernet link-layer address option.
- RTE_FLOW_ITEM_TYPE_ICMP6_ND_OPT_ETH_TLA: matches an ICMPv6 neighbor
discovery target Ethernet link-layer address option.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>