Commit Graph

6494 Commits

Author SHA1 Message Date
Michal Krawczyk
baeed5f404 net/ena: fix errno to positive value
The rte_errno shouldn't have assigned negative error codes, so it has
to be fixed.

Fixes: b3fc5a1ae1 ("net/ena: add Tx preparation")
Cc: stable@dpdk.org

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
2019-01-27 23:38:37 +01:00
Michal Krawczyk
fd97689058 net/ena: fix dev init with multi-process
The check for proc type in eth_ena_dev_init() should appear before
modyfing adapter structure.

Calling memset on ena_adapter from secondary process context, was
erasing all structure information, and it was causing the crash of the
main process.

Fixes: 1173fca25a ("ena: add polling-mode driver")
Cc: stable@dpdk.org

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
2019-01-27 23:38:37 +01:00
Michal Krawczyk
43d9610e4f net/ena: remove lcore constraint from max queue number
The number of queues was limited by number of lcores in the recent ENAv2
patch. However, some apps like symmetric_mp, are configuring multiple
queues although there is only single lcore used.

To prevent failure in that case, the lcore number constraint was
removed.

Fixes: ea93d37eb4 ("net/ena: add HW queues depth setup")

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
2019-01-27 23:38:37 +01:00
Viacheslav Ovsiienko
a9c94cc050 net/mlx5: fix VXLAN without decap action for E-Switch
There is an intention to support VXLAN tunnel match without
hardware offloaded decapsulation, just to redirect ingress
tunnelled frame untouched. This small fix allows to specify
Flows with VXLAN VNI pattern and with or without following
decapsulation action.

Fixes: 251e8d02cf ("net/mlx5: add VXLAN to flow translate routine")
Cc: stable@dpdk.org

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-01-27 12:33:47 +01:00
Ivan Malov
5a88b9b3f0 net/sfc: fix port ID log
Log port ID as 16-bit unsigned integer.

Fixes: f8244c6399 ("ethdev: increase port id range")
Cc: stable@dpdk.org

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2019-01-24 19:14:33 +01:00
Chenmin Sun
866000d949 net/i40e: fix statistics
1. Fix the lldp stop condition check - for firmware
versions 6.01(for X710)/3.33(for X722) or later we need stop the lldp
2. deferred stats reset in dev_init to avoid some noise be counted.
3. Document known issue for tx bytes decreasing due to link status change

Fixes: 044846f071 ("net/i40e: stop LLDP before setting local LLDP MIB")
Cc: stable@dpdk.org

Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-01-24 18:18:10 +01:00
Viacheslav Ovsiienko
71ab2d6472 net/mlx5: fix VXLAN port registration race condition
E-Switch VXLAN tunneling rules require virtual VXLAN network
devices be created. These devices are managed by MLX5 PMD and
created/deleted dynamically.

Kernel creates the VXLAN devices and registers VXLAN UDP ports
to be hardware offloaded within the NIC kernel drivers. The
registration process is being performed into context of working
kernel thread and the race conditions might happen.

The VXLAN device is created and success code is returned to calling
application, but the UDP port registration process is not completed
yet and the next applied rule might be rejected by the driver with
ENOSUP code. This patch adds some timeout for new created devices,
allowing port registration process to be completed. The waiting
is performed once after device been created and first rule is being
applied.

Fixes: 95a464cecc ("net/mlx5: add E-switch VXLAN tunnel devices management")
Cc: stable@dpdk.org

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-01-24 14:53:10 +01:00
Viacheslav Ovsiienko
0deb984fd7 net/mlx5: fix TC rule handle assignment
When tc rule is created via Netlink message application
can provide the unique rule value which can be accepted
by the kernel. Than rule is managed with this assigned
handle. It was found that kernel can reject the proposed
handle and assign its own handle value, the rule control
is lost, because application uses its initially prorosed
rule handle and knows nothing about handle been repleced.

The kernel can assign handle automatically, the application
can get the assigned handle value by specifying NLM_F_ECHO
flag in Netlink message when rule is being created. The
kernel sends back the full descriptor of rule and handle
can be retrieved from and stored by application for further
rule management.

Fixes: 57123c00c1 ("net/mlx5: add Linux TC flower driver for E-Switch flow")
Cc: stable@dpdk.org

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-01-24 14:53:10 +01:00
Dekel Peled
15c8015587 net/mlx5: block RSS action without Rx queue
This patch modifies function mlx5_flow_validate_action_rss(), to
prevent the setting of rule with rss action, but without specifying
any queues.
For example:
flow create 0 ingress pattern end actions rss queues end / end

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-01-24 14:53:10 +01:00
Dekel Peled
ff160dbcba net/mlx5: allow port start with zero Rx queue
During port start, function mlx5_ctrl_flow_vlan() is called to create
default ingress flow rules.
For specific use-cases, a port can be used for Tx only.
In such case, number of Rx queues can be set to 0 to save resources,
hence the default ingress rules are irrelevant.

This patch modifies function mlx5_ctrl_flow_vlan() to avoid the
creation of the default ingress rules when number of Rx queues is 0.
It also includes update of validation functions for relevant actions,
mlx5_flow_validate_action_queue() and mlx5_flow_validate_action_rss(),
to prevent creation of flow rules with these actions when number of Rx
queues is 0.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-01-24 14:53:10 +01:00
Tiwei Bie
0403e37a46 net/virtio-user: fix used ring in cvq handling
When updating used ring, the id in used element should be the
index of the first desc in the desc chain.

Fixes: f9b9d1a557 ("net/virtio-user: add multiple queues in device emulation")
Cc: stable@dpdk.org

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2019-01-24 10:08:31 +01:00
Tiwei Bie
18f42d7886 net/virtio: use virtio barrier in packed ring
Always use the virtio variants which support the platform
memory ordering.

Fixes: 9230ab8d79 ("net/virtio: support platform memory ordering")

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Acked-by: Ilya Maximets <i.maximets@samsung.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2019-01-24 10:08:31 +01:00
Tiwei Bie
45c224e73a net/virtio-user: fix control VQ
This patch fixed below issues in the packed ring based control
vq support in virtio user:

1. The idx_hdr should be used_idx instead of the id in the desc;
2. We just need to write out a single used descriptor for each
   descriptor list;
3. The avail/used bits should be initialized to 0;

Meanwhile, make the function name consistent with other parts.

Fixes: 48a4464029 ("net/virtio-user: support control VQ for packed")

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2019-01-24 10:08:31 +01:00
Tiwei Bie
2923b8f9c4 net/virtio: fix control VQ
This patch mainly fixed below issues in the packed ring based
control vq support in virtio driver:

1. When parsing the used descriptors, we have to track the
   number of descs that we need to skip;
2. vq->vq_free_cnt was decreased twice for a same desc;

Meanwhile, make the function name consistent with other parts.

Fixes: ec194c2f18 ("net/virtio: support packed queue in send command")
Fixes: a4270ea4ff ("net/virtio: check head desc with correct wrap counter")

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2019-01-24 10:08:31 +01:00
Igor Romanov
c2303617e6 net/sfc: fix crash in EF10 TSO if no payload
Fixes: 6bc985e411 ("net/sfc: support TSO in EF10 Tx datapath")
Cc: stable@dpdk.org

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2019-01-24 10:08:31 +01:00
Wenzhuo Lu
91c7b92061 net/ice: fix link speed
Fix the issue that the link speed is unknown.

Fixes: 690175ee51 ("net/ice: support getting device information")
Fixes: cf911d90e3 ("net/ice: support link update")

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-01-24 10:08:31 +01:00
Wenzhuo Lu
c945e4bf90 net/ice: support promiscuous mode
Enable the APIs for unicast and multicast promiscuous
mode setting.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-01-24 10:08:31 +01:00
Dekel Peled
105add6bc3 net/mlx4: fix creation of flow rule w/o ETH spec
The original commit enabled the creation of flow rule with empty
ETH address and with specific VLAN.
It works fine on PF, but such flow rule is still rejected on VF due
to kernel limitation, which blocks MAC address of all zeroes.

This patch complements the original commit.
It sets byte 0 of MAC address to 0xFF.

Fixes: c0d2392631 ("net/mlx4: support flow w/o ETH spec and with VLAN")

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-01-24 10:08:31 +01:00
Wei Zhao
991a2e812f net/i40e: fix queue region DCB configure
DCB is not necessary to be configured if no user priority of
queue region is requested.

Unexpected configuration of DCB will cause unexpected behavior, like
FDIR does not work on those queues, but could cause more issues.

Fixes: 7cbecc2f74 ("net/i40e: support queue region set and flush")
Cc: stable@dpdk.org

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Tested-by: Yuan Peng <yuan.peng@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-01-24 10:08:31 +01:00
Shahed Shaikh
d6ddd17fb1 net/qede: remove prefetch in Tx path
Incorrect placement of prefetch in Tx path is causing
a performance drop of around ~2% on AMD platform.

Fixes: 2ea6f76aff ("qede: add core driver")
Cc: stable@dpdk.org

Signed-off-by: Shahed Shaikh <shshaikh@marvell.com>
Acked-by: Rasesh Mody <rmody@marvell.com>
2019-01-19 00:37:45 +01:00
Shahed Shaikh
8f23124745 net/qede: fix performance bottleneck in Rx path
Allocating replacement buffer per received packet is expensive.
Instead, process received packets first and allocate
replacement buffers in bulk later.

This improves performance by ~25% in terms of PPS on AMD
platforms.

Fixes: 2ea6f76aff ("qede: add core driver")
Cc: stable@dpdk.org

Signed-off-by: Shahed Shaikh <shshaikh@marvell.com>
Acked-by: Rasesh Mody <rmody@marvell.com>
2019-01-19 00:36:17 +01:00
Andrew Rybchenko
ab77a0013a net/sfc: fix Rx packets counter
Errors, missed and pauses should not be included in delivered
good Rx packets reported by ipackets.

Fixes: 1caab2f1e6 ("net/sfc: add basic statistics")
Cc: stable@dpdk.org

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2019-01-18 09:47:26 +01:00
Qi Zhang
329054ed1d net/ice/base: free flow profile entries
Free flow profile entries when free HW tables.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2019-01-18 09:47:26 +01:00
Qi Zhang
aa1cd410fa net/ice/base: add flow module
Add the module that implemented flow abstraction that base on
flexible pipeline.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2019-01-18 09:47:26 +01:00
Qi Zhang
51d04e4933 net/ice/base: add flexible pipeline module
The flexible pipeline module provide the infrastructure for ice's
flexible packet processing feature.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2019-01-18 09:47:26 +01:00
Qi Zhang
8dfe55a29d net/ice/base: add some helper macros
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2019-01-18 09:47:26 +01:00
Qi Zhang
894cfceb88 net/ice/base: add package download related data structure
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2019-01-18 09:47:26 +01:00
Qi Zhang
e844d501df net/ice/base: support resource allocation
Added API ice_alloc_hw_res and ice_free_hw_res.
Added resource type macro.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2019-01-18 09:47:26 +01:00
Qi Zhang
71a685136b net/ice/base: clean up
Remove some unnecessary code.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2019-01-18 09:47:26 +01:00
Ivan Malov
7f7bdb5987 net/sfc: fix datapath name references in logs
Rx and Tx datapath references were mixed up in a couple
of log statements and commentary blocks in the original
commit. Correct datapath name references in said places.

Fixes: f28ede500c ("net/sfc: support multi-process")
Cc: stable@dpdk.org

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2019-01-18 09:47:26 +01:00
Andrew Rybchenko
24f8a95917 net/sfc: fix VF error/missed stats mapping
VADAPTER_RX_OVERFLOW means Rx statistics overflow, not a missed
packet because of overflow.

VADAPTER_RX_BAD_PACKETS accumulates a number of error conditions,
but mainly impossibility to deliver because of no descriptors
available, so it is better to classify it as imissed.

Fixes: 1caab2f1e6 ("net/sfc: add basic statistics")
Cc: stable@dpdk.org

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2019-01-18 09:47:26 +01:00
Yongseok Koh
2014a7fbae net/mlx5: fix deprecated library API for Rx padding
In rdma-core library IBV_WQ_FLAG_RX_END_PADDING is renamed to
IBV_WQ_FLAGS_PCI_WRITE_END_PADDING. Way to query the capability is also
changed.

Fixes: 43e9d9794c ("net/mlx5: support upstream rdma-core")
Cc: stable@dpdk.org

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Reviewed-by: Erez Ferber <erezf@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-01-18 09:47:26 +01:00
Yongseok Koh
78c7a16daa net/mlx5: fix Rx packet padding
Rx packet padding is supposed to be set by an environment variable -
MLX5_PMD_ENABLE_PADDING, but it has been missing for some time by mistake.
Rather than using such a variable, a PMD parameter (rxq_pkt_pad_en) is
added instead.

Fixes: a1366b1a2b ("net/mlx5: add reference counter on DPDK Rx queues")
Cc: stable@dpdk.org

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Reviewed-by: Erez Ferber <erezf@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-01-18 09:47:26 +01:00
Zhirun Yan
76469c0631 net/i40e: support request any number of queues
Before this patch, VF must request a specific queues(1/2/4/8/16) with
DPDK PF. This patch align the number of requested queues to next power
of 2. So VF can request any number queues from 1 to 16.

Signed-off-by: Zhirun Yan <zhirun.yan@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-01-18 09:47:26 +01:00
Yanglong Wu
1d4b2b4966 net/i40e: fix VF overwrite PF RSS LUT for X722
i40e_aq_set_rss_lut should set register according
to the vsi->type. if not, VF may overwrite the rigister
of PF.
Note, only X722 is impacted, since flag I40E_FLAG_RSS_AQ_CAPABLE
is only enabled on X722.

Fixes: d0a349409b ("i40e: support AQ based RSS config")
Cc: stable@dpdk.org

Signed-off-by: Yanglong Wu <yanglong.wu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-01-18 09:47:26 +01:00
Yongseok Koh
12d468a62b net/mlx5: fix instruction hotspot on replenishing Rx buffer
On replenishing Rx buffers for vectorized Rx, mbuf->buf_addr isn't needed
to be accessed as it is static and easily calculated from the mbuf address.
Accessing the mbuf content causes unnecessary load stall and it is worsened
on ARM.

Fixes: 545b884b1d ("net/mlx5: fix buffer address posting in SSE Rx")
Cc: stable@dpdk.org

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-01-15 02:40:40 +01:00
Alejandro Lucero
29a62d1476 net/nfp: add CPP bridge as service
The Netronome's Network Flow Processor chip is highly programmable
with the goal of processing packets at high speed. Processing units
and other chip components are available from the host through the
PCIe CPP(Command Push Pull bus) interface. The NFP PF PMD configures
a CPP handler for setting up and working with vNICs, perform actions
like link up or down, or accessing extended stats from the MAC component.

There exist NFP host tools which access the NFP components for
programming and debugging but they require the CPP interface. When the
PMD is bound to the PF, the DPDK app owns the CPP interface, so these
host tools can not access the NFP through other means like NFP kernel
drivers.

This patch adds a CPP bridge using the rte_service API which can be
enabled by a DPDK app. Interestingly, DPDK clients like OVS will not
enable specific service cores, but this can be performed with a
secondary process specifically enabling this CPP bridge service and
therefore giving access to the NFP to those host tools.

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2019-01-14 22:57:33 +01:00
Hyong Youb Kim
9bd48e2d30 net/enic: remove redundant log level check
Fixes: 8d49699534 ("net/enic: support multicast filtering")
Cc: stable@dpdk.org

Suggested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
2019-01-14 17:44:30 +01:00
Hyong Youb Kim
a1c40a3a3b net/enic: remove useless include
libgen.h is not used, so do not include it.

Fixes: fefed3d1e6 ("enic: new driver")
Cc: stable@dpdk.org

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
2019-01-14 17:44:30 +01:00
Viacheslav Ovsiienko
55c61fa714 net/mlx5: validate TOS and TTL on E-Switch
This patch adds the type-of-service and time-to-live IP header
fields validation on E-Switch, both for match pattern and
VXLAN encapsulation action IP header itesm. The E-Switch flows
will use the common mlx5_flow_validate_item_ipv4/6 routines
with added extra parameter, specifying the supported fields
mask.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-01-14 17:44:30 +01:00
Viacheslav Ovsiienko
363fa2f296 net/mlx5: support TOS and TTL fields on E-Switch
This patch adds the type-of-service and time-to-live IP header
fields support on E-Switch. There match pattern for both fields
with masking is added. Also these fields can be set for VXLAN
tunnel encapsulation header.

This issue is critical for some Open VSwitch configuration
on overlayed (tunneled) networks, where the tos field can be
inherited from outer header to inner header.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-01-14 17:44:30 +01:00
Viacheslav Ovsiienko
9d6d159a3f net/mlx5: add TOS and TTL flower match and tunnel keys
This patch is a preparation for adding the type-of-service and
time-to-live IP header fields support on E-Switch. There are
two types of keys added - one for match pattern, other for
tunnel encapsulation header.

This issue is critical for some Open VSwitch configuration
on overlayed (tunneled) networks, where the tos field can be
inherited from outer header to inner header.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-01-14 17:44:30 +01:00
Viacheslav Ovsiienko
01925b8c64 net/mlx5: add RHEL-7.2 VXLAN device metadata workaround
RH7.2 with kernel 3.10.0-327 does not support VXLAN
devices metadata and IFLA_VXLAN_COLLECT_METADATA
key is neither defined nor supported. We must specify
VNI parameter, which will be actually ignored by kernel,
applied rules will be processed by mlx5 kernel driver
and the actual VNI from rules will be used.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-01-14 17:44:30 +01:00
Viacheslav Ovsiienko
8ba325b051 net/mlx5: switch to detached VXLAN network devices
Current design uses the VXLAN virtual devices attached
to outer network interface for decapsulation. Kernel
allows to use non-attached devices, so now we can create
not attached device and use it both for encapsulation
and decapsulation. Devices management becomes simpler,
less VXLAN devices are created and used.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-01-14 17:44:30 +01:00
Viacheslav Ovsiienko
80712ab8e9 net/mlx5: switch encap rules to use container
The VXLAN encapsulation neigh/local rules will use
the new introduced structure, which keeps the
rules lists, related to specified outer interface,
instead of attached VTEP structure. It allows us to
unbind VTEP structure from keeping the rules for
interface.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-01-14 17:44:30 +01:00
Viacheslav Ovsiienko
18c3e6c90b net/mlx5: introduce encapsulation rules container
Currently the VXLAN encapsulation neigh/local rules
are stored in the list contained in the VTEP device
structure. Encapsulation VTEP device is attached to
outer interface and stored rules are related to this
underlying interface. We are going to use unattached
VXLAN devices for encapsulation (kernel does not use
attached interface to find egress one), so we should
introduce the structure to keep interface related
neigh/local rules instead of VTEP structure. This
patch introduces internal tcf_irule structure, and
its create/delete methods.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-01-14 17:44:30 +01:00
Viacheslav Ovsiienko
4b837fe90e net/mlx5: optimize neigh and local encap rules search
This patch removes unnecessary local varialbles and optimizes
local and neigh encapsulation rules search.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-01-14 17:44:30 +01:00
Viacheslav Ovsiienko
2398106073 net/mlx5: fix typos and code style
This patch fixes typos and codestyle issues in mlx5_flow_tcf.c file

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-01-14 17:44:30 +01:00
Viacheslav Ovsiienko
3d14ad9be3 net/mlx5: support ethernet type for tunnels on E-Switch
This patch add support for inner and outer ethernet types for the
E-Switch Flows with tunnels. Inner and outer ethernet type match
can be specified with ethernet items, vlan items, or implicitly
deduced from IP address items. The tcm_info field in Netlink message
tcm structure is filled always with outer protocol.

Cc: stable@dpdk.org

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-01-14 17:44:30 +01:00
Viacheslav Ovsiienko
ea952e0273 net/mlx5: validate ethernet type on E-Switch
This patch updates the validation routine for the E-Switch Flows.
The ethernet type field can be specified within inner and outer
tunnel ethernet items, by vlan item or implicitly deduced from
IP address items. The validation routine checks all these items
and their combinations for mutual compatibility issues and possible
conflicts.

Cc: stable@dpdk.org

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-01-14 17:44:30 +01:00