Commit Graph

17019 Commits

Author SHA1 Message Date
Stephen Hemminger
a7aef386be net/bnxt: change PTP message to debug level
This message doesn't need to be at INFO level, it is a normal
situation and only useful for debugging.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2019-03-20 18:15:42 +01:00
Shahaf Shuler
57c0e2494c net/mlx5: fix packet inline on Tx queue wraparound
Inlining a packet to WQE that cross the WQ wraparound, i.e. the WQE
starts on the end of the ring and ends on the beginning, is not
supported and blocked by the data path logic.

However, in case of TSO, an extra inline header is required before
inlining. This inline header is not taken into account when checking if
there is enough room left for the required inline size.
On some corner cases were
(ring_tailroom - inline header) < inline size < ring_tailroom ,
this can lead to WQE being written outsize of the ring buffer.

Fixing it by always assuming the worse case that inline of packet will
require the inline header.

Fixes: 3f13f8c23a ("net/mlx5: support hardware TSO")
Cc: stable@dpdk.org

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2019-03-20 18:15:42 +01:00
Kevin Traynor
7aac5899df net/qede: support IOVA VA mode
Set RTE_PCI_DRV_IOVA_AS_VA in drv_flags. This allows initializing qede
PMD as non-root also on Linux v4.x, where /proc/self/pagemap can't be
acccessed without CAP_SYS_ADMIN privileges.

The flag was introduced generically but not in pmds in:
commit 815c7deaed ("pci: get IOMMU class on Linux")

Cc: stable@dpdk.org

Acked-by: Shahed Shaikh <shshaikh@marvell.com>
Acked-by: Rasesh Mody <rmody@marvell.com>
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
2019-03-20 18:15:42 +01:00
Stephen Hemminger
ddf5a9c6d7 ethdev: replace snprintf with strlcpy on init
Don't need to use snprintf for simple name copy.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Rami Rosen <ramirose@gmail.com>
2019-03-20 18:15:42 +01:00
Stephen Hemminger
e97f83e452 ethdev: replace snprintf with strlcpy for owner
The set_port_owner was copying a string between structures of the
same type, therefore the name could never be truncated (unless source
string was not null terminated).  Use strlcpy which does it better.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
2019-03-20 18:15:42 +01:00
Qi Zhang
d9263ab138 net/i40e: fix time sync for 25G
Time sync increment value is not configured for 25G device.

The patch fix this issue by setting the same value as 40G, this
aligned with kernel driver's behaviour.

Fixes: 75d133dd32 ("net/i40e: enable 25G device")
Cc: stable@dpdk.org

Reported-by: Michael Luo <michael.luo@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Tested-by: Michael Luo <michael.luo@intel.com>
2019-03-20 18:15:42 +01:00
Pablo Cascón
027412fe94 net/nfp: fix setting MAC address
Some firmwares, mostly for VFs, do not advertise the feature /
capability of changing the MAC address while the interface is up. With
such firmware a request to change the MAC address that at the same
time also tries to enable the not available feature will be denied by
the firmware resulting in an error message like:

nfp_net_reconfig(): Error nfp_net reconfig for ctrl: 80000000 update: 800

Fix set_mac_addr by not trying to enable a feature if it is not
advertised by the firmware.

Fixes: 2fe669f4bc ("net/nfp: support MAC address change")
Cc: stable@dpdk.org

Signed-off-by: Pablo Cascón <pablo.cascon@netronome.com>
Acked-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2019-03-20 18:15:42 +01:00
Kevin Traynor
b89f6deb86 net/i40e: update queue number check for rounding
Since rounding up the requested queue pairs to allow the VF to
request a non-aligned number was added, it may happen that the
requested number is less than the available num of queues but the
rounded up number is greater. In this case, it is not caught with
the usual checks but later when there is a reset and failed setup.

By rounding earlier the checks can be done before a failed reset
occurs, and a rounded max amount of available queues can be returned
to the VF.

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-03-20 18:15:42 +01:00
Tomasz Jozwiak
a7cece2ead malloc: add NUMA-aware realloc function
Currently, rte_realloc will not respect original allocation's
NUMA node when memory cannot be resized, and there is no
NUMA-aware equivalent of rte_realloc. This patch adds such a function.

The new API will ensure that reallocated memory stays on
requested NUMA node, as well as allow moving allocated memory
to a different NUMA node.

Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
2019-03-23 16:54:50 +01:00
Pavan Nikhilesh
1534cc6ab1 doc: add notes about eventdev producer/consumer dependency
EventDev i.e consumer needs to be started before starting the
event producers.
Update documentation of EventDev and EventDev adapters.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Reviewed-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
2019-03-15 06:46:50 +01:00
Pavan Nikhilesh
66af142f2a examples/eventdev: start ethdev after adapter setup
Start ethdev after the Rx/Tx adapter setup is complete as in some
architectures it might lead to undefined behaviour or events being
dropped.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Nikhil Rao <nikhil.rao@intel.com>
2019-03-15 06:46:50 +01:00
Pavan Nikhilesh
66b82db2ef app/eventdev: start event producers after eventdev
Start event producers after eventdev i.e. consumer is started as in some
architectures it might lead to undefined behaviour or events being
dropped.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2019-03-15 06:46:50 +01:00
Pallantla Poornima
57362ddf42 event/opdl: replace sprintf with snprintf
sprintf function is not secure as it doesn't check the length of string.
More secure function snprintf is used.

Fixes: 3c7f3dcfb0 ("event/opdl: add PMD main body and helper function")
Cc: stable@dpdk.org

Signed-off-by: Pallantla Poornima <pallantlax.poornima@intel.com>
2019-03-15 06:46:50 +01:00
Pavan Nikhilesh
c13b1ad719 app/eventdev: configure optimum timers per adapter
Previously, the total number of event timers per adapter was set to an
arbitrary value, set it to mempool size instead as it defines the max
event timers that can be armed.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2019-03-15 06:46:50 +01:00
Pavan Nikhilesh
8f7bc65cef app/eventdev: follow proper teardown sequence
Stop eventdev before closing it.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2019-03-15 06:46:50 +01:00
Pavan Nikhilesh
586a6fc6f3 examples/eventdev: follow proper teardown sequence
Stop eventdev before closing it.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2019-03-15 06:46:50 +01:00
Pavan Nikhilesh
84f4c73f7d examples/eventdev: probe max events
Some eventdevs support configuring max events to be -1 (open system).
Check eventdev and event port configuration with eventdev info before
configuring them.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2019-03-15 06:46:50 +01:00
Bruce Richardson
239912fa79 git: ignore build directories
test-meson-build.sh generates multiple build directories for various
targets. As these follow a known pattern, and since they don't need
to be tracked in git, we can add them to the gitignore file,
along with the default build directory "build".

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Rami Rosen <ramirose@gmail.com>
2019-03-13 11:57:05 +01:00
Bruce Richardson
64ab56632f git: ignore hidden files
Generally hidden files are hidden for good reason and we don't want to
track them in git. They can always be manually added to git tracking
individually if needed.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2019-03-13 11:55:53 +01:00
Bruce Richardson
5957cda7af git: ignore python bytecode files
After you run a python script, a .pyc file is often left behind,
which we don't want to track in git.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2019-03-13 11:53:20 +01:00
Bruce Richardson
48e16ad260 git: add comments for ignored files
Split the ignored file list into section based on logical groups of files,
putting a comment at the top of each section clarifying what it is.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2019-03-13 11:52:03 +01:00
Bruce Richardson
5d91766730 devtools: fix meson build test to exit on failure
When piping the ninja command through cat, we lose the error value from
the call to ninja in the case of failure. This prevents the script from
exiting at the first broken build. Fix this by setting the "pipefail"
shell option.

Fixes: 4bcb9b7686 ("devtools: add verbose option to meson build test")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2019-03-13 11:09:55 +01:00
Bruce Richardson
218c4e68c1 mk: use linux and freebsd in config names
Rather than using linuxapp and bsdapp everywhere, we can change things to
use the, more readable, terms "linux" and "freebsd" in our build configs.
Rather than renaming the configs we can just duplicate the existing ones
with the new names using symlinks, and use the new names exclusively
internally. ["make showconfigs" also only shows the new names to keep the
list short] The result is that backward compatibility is kept fully but any
new builds or development can be done using the newer names, i.e.  both
"make config T=x86_64-native-linuxapp-gcc" and "T=x86_64-native-linux-gcc"
work.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2019-03-12 23:05:06 +01:00
Bruce Richardson
ae2f2fee24 build: rename linuxapp to linux in meson cross files
Rename the cross files for meson compilation from having linuxapp
in the name to just linux in the name.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2019-03-12 23:03:34 +01:00
Bruce Richardson
5fbc1d498f build/freebsd: rename macro BSDPAPP to FREEBSD
Rename the macro and all instances in DPDK code, but keep a copy of
the old macro defined for legacy code linking against DPDK

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2019-03-12 23:01:14 +01:00
Bruce Richardson
742bde12f3 build/linux: rename macro from LINUXAPP to LINUX
Rename the macro to make things shorter and more comprehensible. For
both meson and make builds, keep the old macro around for backward
compatibility.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2019-03-12 17:31:22 +01:00
Bruce Richardson
91d7846ce6 eal/linux: rename linuxapp to linux
The term "linuxapp" is a legacy one, but just calling the subdirectory
"linux" is just clearer for all concerned.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2019-03-12 17:31:13 +01:00
Bruce Richardson
25c99fbd68 eal/bsd: rename bsdapp to freebsd
The term "bsdapp" is a legacy one, but just calling the subdirectory
"freebsd" is just clearer for all concerned.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2019-03-12 17:30:20 +01:00
Hemant Agrawal
610e235a11 test/crypto: fix duplicate id used by CCP device
These duplicate device id is causing incorrect mapping
for DPAA_SEC for test case execution on the basis of
capabilities.

Fixes: e155ca055e ("test/crypto: add tests for AMD CCP")
Cc: stable@dpdk.org

Reported-by: Anoob Joseph <anoobj@marvell.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2019-03-06 17:41:37 +01:00
Arek Kusztal
9f9d23d428 cryptodev: rework modexp and modinv comments
This patch changes modular exponentiation and modular multiplicative
inverse API comments to make it more precise.

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Shally Verma <shallyv@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2019-03-06 17:30:43 +01:00
Arek Kusztal
27323f5385 crypto/openssl: fix modexp
Fixes bad reference of modinv struct in openssl pmd

Fixes: 3e9d6bd447 ("crypto/openssl: add RSA and mod asym operations")
Cc: stable@dpdk.org

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Shally Verma <shallyv@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2019-03-06 17:30:43 +01:00
Arek Kusztal
990b180290 crypto/openssl: fix big numbers after computations
After performing mod exp and mod inv big numbers (BIGNUM) should
be cleared as data already is copied into op fields and this BNs would
very likely contain private information for unspecified amount of time
(duration of the session).

Fixes: 3e9d6bd447 ("crypto/openssl: add RSA and mod asym operations")
Cc: stable@dpdk.org

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Shally Verma <shallyv@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2019-03-06 17:30:43 +01:00
Fiona Trahe
ab3dec55a5 doc: fix table of kernel drivers in qat guide
Added missing line informing which kernel driver can
be used for device DH895xcc for compression service.
Moved service columns to start of table for better visibility
and to prepare for future asymmetric crypto service.

Fixes: e2e35849ea ("compress/qat: add compression on DH895x")
Cc: stable@dpdk.org

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
2019-03-06 17:28:35 +01:00
Anoob Joseph
3ca687a4a0 common/cpt: fix null auth only
Fixes: 351fbee219 ("common/cpt: support hash")
Cc: stable@dpdk.org

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
2019-03-06 17:28:35 +01:00
Wei Zhao
0355c379b7 net/ixgbe: support VF promiscuous by PF driver
The patch adds the PF counterpart changes to support VF promiscuous
mode by DPDK PF driver.

For ixgbe, in order to support VF VLAN promiscuous or unicast
promiscuous, PF need to set register PFVML2FLT of bit UPE and VPE.
The patch aligned to kernel driver's implementation.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-03-08 17:52:22 +01:00
Wei Zhao
1f4564ed76 net/ixgbevf: enable promiscuous mode
Add promiscuous mode support on VF

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
2019-03-08 17:52:22 +01:00
Dekel Peled
fd350d3c9a net/mlx5: fix sync when handling Tx completions
Function mlx5_tx_complete() reads completion entry information
from Tx queue.
For some processors not having strongly-ordered memory model,
there has to be a memory barrier between reading the entry index
and the entry fields, in order to guarantee data is valid.

Fixes: 54d3fe948d ("net/mlx5: poll completion queue once per a call")
Cc: stable@dpdk.org

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-03-08 17:52:22 +01:00
Dekel Peled
38f0a160b5 net/mlx5: fix hex dump of error completion
struct mlx5_cqe is defined in MLX5 PMD code (mlx5_prm.h).
It includes 64 bytes padding in case of (RTE_CACHE_LINE_SIZE == 128).

struct mlx5_err_cqe is defined in kernel, and doesn't include padding.

When running in debug mode, in case an error CQE is detected
it is printed using rte_hexdump().

The size of data to print should be sizeof(*cqe) instead of
sizeof(*err_cqe), to handle the case of (RTE_CACHE_LINE_SIZE == 128),
and print the full data in any case.

Fixes: c771499209 ("net/mlx5: extend debug logs verbosity")
Cc: stable@dpdk.org

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-03-08 17:52:22 +01:00
Thomas Monjalon
09c9c4d23d net/mlx5: call generic strlcpy
The call to strlcpy uses either libc, libbsd or internal rte_strlcpy.
No need to call the DPDK flavor explicitly.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Rami Rosen <ramirose@gmail.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-03-08 17:52:22 +01:00
Dekel Peled
efad0db1ff net/mlx4: fix default flow rule create
Original patch changed logic of function mlx4_flow_merge_eth().
The setting of flow->promisc was wrongly removed.
This patch adds the removed setting of flow->promisc, to restore
the required behavior.

Fixes: c0d2392631 ("net/mlx4: support flow w/o ETH spec and with VLAN")
Cc: stable@dpdk.org

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2019-03-08 17:52:22 +01:00
Viacheslav Ovsiienko
4fb27c1dfe net/mlx5: fix flow priorities probing error path
The mlx5 PMD probes the Verbs flow priorities supported with
ibv_create_flow() function. If rdma-core or kernel fails for
some reason, the returned error causes the drop queue is not
destroyed, and pd is locked by not freed resource.

Also the mlx5_flow_discover_priorities() returned negative value
as error, and this code was reported "as is", without sign
changing (eventually causing assert(err > 0)).

Fixes: 2815702bae ("net/mlx5: replace verbs priorities by flow")
Cc: stable@dpdk.org

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-03-08 17:52:22 +01:00
Kevin Traynor
82a9eab70d net/i40e: fix negative check on unsigned queue pairs
Fix the check and associated log. Also, fix a typo in other log.

Fixes: 03d478e960 ("net/i40e: support PF respond VF request more queues")
Cc: stable@dpdk.org

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-03-08 17:52:22 +01:00
Yunjian Wang
ce66e35140 net/ixgbe: fix crash on remove
The NIC's interrupt source has some active handler when the
port removed. We should cancel the delay handler before removing
dev to prevent executing the delay handler.

Call Trace:
  #0  ixgbe_disable_intr (hw=0x0, hw=0x0)
      at /usr/src/debug/dpdk-18.11/drivers/net/ixgbe/ixgbe_ethdev.c:852
  #1  ixgbe_dev_interrupt_delayed_handler (param=0xadb9c0
      <rte_eth_devices@@DPDK_2.2+33024>)
      at /usr/src/debug/dpdk-18.11/drivers/net/ixgbe/ixgbe_ethdev.c:4386
  #2  0x00007f05782147af in eal_alarm_callback (arg=<optimized out>)
      at /usr/src/debug/dpdk-18.11/lib/librte_eal/linuxapp/eal/
      eal_alarm.c:90
  #3  0x00007f057821320a in eal_intr_process_interrupts (nfds=1,
      events=0x7f056cbf3e88) at /usr/src/debug/dpdk-18.11/lib/
      librte_eal/linuxapp/eal/eal_interrupts.c:838
  #4  eal_intr_handle_interrupts (totalfds=<optimized out>, pfd=18)
      at /usr/src/debug/dpdk-18.11/lib/librte_eal/linuxapp/eal/
      eal_interrupts.c:885
  #5  eal_intr_thread_main (arg=<optimized out>)
      at /usr/src/debug/dpdk-18.11/lib/librte_eal/linuxapp/eal/
      eal_interrupts.c:965
  #6  0x00007f05708a0e45 in start_thread () from /usr/lib64/libpthread.so.0
  #7  0x00007f056eb4ab5d in clone () from /usr/lib64/libc.so.6

Fixes: 2866c5f1b8 ("ixgbe: support port hotplug")
Cc: stable@dpdk.org

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-03-08 17:52:22 +01:00
Rami Rosen
1b01d0589d doc: fix tag for inner RSS feature
This patch fixes a wrong tag in guides/nics/features.rst.
The features tags should be, according to the
"Features Overview" section in this doc, one of the following:
"uses", "implements", "provides", or "related".
Hence in Inner RSS section, it should be "uses"
instead of "users".

Fixes: d0a87d9aa8 ("doc: update mlx5 guide on tunnel offloading")
Cc: stable@dpdk.org

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-03-08 17:52:22 +01:00
Hyong Youb Kim
4445a0f4c7 net/enic: fix inner packet matching
Inner packet matching is currently buggy in many cases.

1. Mishandling null spec ("match any").
The copy_item functions do nothing if spec is null. This is incorrect,
as all patterns should be appended to the L5 pattern buffer even for
null spec (treated as all zeros).

2. Accessing null spec causing segfault.

3. Not setting protocol fields.
The NIC filter API currently has no flags for "match inner IPv4, IPv6,
UDP, TCP, and so on". So, the driver needs to explicitly set EtherType
and IP protocol fields in the L5 pattern buffer to avoid false
positives (e.g. reporting IPv6 as IPv4).

Instead of keep adding "if inner, do something differently" cases to
the existing copy_item functions, introduce separate functions for
inner packet patterns and address the above issues in those
functions. The changes to the previous outer-packet copy_item
functions are mechanical, due to reduced indentation.

Fixes: 6ced137607 ("net/enic: flow API for NICs with advanced filters enabled")
Cc: stable@dpdk.org

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
2019-03-08 17:52:22 +01:00
Hyong Youb Kim
593f17668f net/enic: fix endianness in VLAN match
The VLAN fields in the NIC filter use little endian. The VLAN item is
in big endian, so swap bytes.

Fixes: 6ced137607 ("net/enic: flow API for NICs with advanced filters enabled")
Cc: stable@dpdk.org

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
2019-03-08 17:52:22 +01:00
Hyong Youb Kim
d7316eae1a net/enic: fix VXLAN match
The filter API does not have flags for "match VXLAN". Explicitly set
the UDP destination port and mask in the L4 pattern. Otherwise, UDP
packets with non-VXLAN ports may be falsely reported as VXLAN.

1400 series VIC adapters have hardware VXLAN parsing. The L5 buffer on
the NIC starts with the inner Ethernet header, and the VXLAN header is
now in the L4 buffer following the UDP header. So the VXLAN spec/mask
needs to be in the L4 pattern, not L5. Older models still expect the
VXLAN spec/mask in the L5 pattern. Fix up the L4/L5 patterns
accordingly.

Fixes: 6ced137607 ("net/enic: flow API for NICs with advanced filters enabled")
Cc: stable@dpdk.org

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
2019-03-08 17:52:22 +01:00
Hyong Youb Kim
af3a16282a net/enic: reset VXLAN port regardless of overlay offload
Currently, the driver resets the vxlan port register only if overlay
offload is enabled. But, the register is actually tied to hardware
vxlan parsing, which is an independent feature and is always enabled
even if overlay offload is disabled. If left uninitialized, it can
affect flow rules that match vxlan. So always reset the port number
when HW vxlan parsing is available.

Fixes: 8a4efd1741 ("net/enic: add handlers to add/delete vxlan port number")
Cc: stable@dpdk.org

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
2019-03-08 17:52:22 +01:00
Hyong Youb Kim
477959e6ee net/enic: enable limited support for raw flow item
Some apps like VPP use a raw item to match UDP tunnel headers like
VXLAN or GENEVE. The NIC hardware supports such usage via L5 match,
which does pattern match on packet data immediately following the
outer L4 header. Accept raw items for these limited use cases.

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
2019-03-08 17:52:22 +01:00
Hyong Youb Kim
60c6acb43d net/enic: move arguments into struct
There are many copy_item functions, all with the same arguments, which
makes it difficult to add/change arguments. Move the arguments into a
struct to help subsequent commits that will add/fix features. Also
remove self-explanatory verbose comments for these local functions.

These changes are purely mechanical and have no impact on
functionalities.

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
2019-03-08 17:52:22 +01:00