Verbs specification doesn't help to distinguish between packets having an
VLAN and those which do not have, this ends by having flow rule which does
not react as the user expects e.g.
flow create 0 ingress pattern eth / vlan / end action queue index 0 / end
flow create 0 ingress pattern eth / end action queue index 1 / end
are colliding in Verbs definition as in both rule are matching packets with
or without VLAN.
For this reason, the VLAN specification must not be empty, otherwise the
PMD has to refuse it.
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Fill the error context in conversion function to provide a better reason on
why it cannot be done to the user.
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Packet matching inner and outer flow rules are caught by the first one
added in the device as both flows are configured with the same priority.
To avoid such situation, the inner flow can have an higher priority than
the outer ones as their pattern matching will otherwise collide.
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Wait to complete is present to let the application get a correct status
when it requires it, it should not be ignored.
Fixes: e313ef4c2f ("net/mlx5: fix link state on device start")
Fixes: cb8faed7dd ("mlx5: support link status update")
Cc: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
This behavior is mixed between what should be handled by the application
and what is under PMD responsibility.
According to DPDK API:
- link_update() should only query the link status [1]
- link_set_{up,down}() should only set the link to the according status [1]
- dev_{start,stop}() should enable/disable traffic reception/emission [2]
On this PMD, the link status is retrieved from the net device associated
owned by the Linux Kernel, it does not means that even when this interface
is down, the PMD cannot send/receive traffic from the NIC those two
information are unrelated, until the physical port is active and has a
link, the PMD can receive/send traffic on the wire.
According to DPDK API, calling the rte_eth_dev_start() even when the Linux
interface link is down is then possible and allowed, as the traffic will
flow between the DPDK application and the Physical port.
This also means that a synchronization between the Linux interface and the
DPDK application remains under the DPDK application responsibility.
To handle such synchronization the application should behave as the
following scheme, to start:
rte_eth_get_link(port_id, &link);
if (link.link_status == ETH_DOWN)
rte_eth_dev_set_link_up(port_id);
rte_eth_dev_start(port_id);
Taking in account the possible returned values for each function.
and to stop:
rte_eth_dev_stop(port_id);
rte_eth_dev_set_link_down(port_id);
The application should also set the LSC interrupt callbacks to catch and
behave accordingly when the administrator set the Linux device down/up.
The same callbacks are called when the link on the medium falls/raise.
[1] https://dpdk.org/browse/dpdk/tree/lib/librte_ether/rte_ethdev_core.h
[2] https://dpdk.org/browse/dpdk/tree/lib/librte_ether/rte_ethdev.h#n1677
Fixes: c7bf62255e ("net/mlx5: fix handling link status event")
Fixes: e313ef4c2f ("net/mlx5: fix link state on device start")
Cc: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Kernel version check was introduced in
commit 3a49ffe38a ("net/mlx5: fix link status query")
due to a bug fixed by
commit ef09a7fc76 ("net/mlx5: fix inconsistent link status query")
This patch restore the previous behavior as described in Linux API.
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
rdma-core v16 has a bug. The following compilation error occurs on ARM
hosts.
In file included
from drivers/net/mlx5/mlx5_glue.h:16:0,
from drivers/net/mlx5/mlx5_glue.c:11:
/usr/include/infiniband/mlx5dv.h:144:2: error: unknown type name 'off_t'
off_t uar_mmap_offset;
^
As a temporary fix, sys/types.h is included in PMD. This has been fixed in
rdma-core v17. This can be removed when all the Linux distros are shipped
with rdma-core v17 or back-ported fix. As of now, RedHat 7.5 is known to
have rdma-core v16.
Cc: stable@dpdk.org
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
There is no guarantee that the file won't be removed by external
user/application between the stat() and remove() syscalls, remove() will
fail if the file no longer exists.
Fixes: f8b9a3bad4 ("net/mlx5: install a socket to exchange a file descriptor")
Cc: stable@dpdk.org
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
These functions return int although they are not supposed to fail,
resulting in unnecessary checks in their callers.
Some are returning error where is should be a boolean.
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
This change removes the need to distinguish unlocked priv_*() functions
which are therefore renamed using a mlx5_*() prefix for consistency.
At the same time, all functions from mlx5 uses a pointer to the ETH device
instead of the one to the PMD private data.
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
In priv struct only the memory region needs to be protected against
concurrent access between the control plane and the data plane.
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Some empty lines have been added in the middle of the code without any
reason. This commit removes them.
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Replaces all (void)foo; by __rte_unused macro except when variables are
under #if statements.
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
priv_get_num_vfs() was used to help the PMD in prefetching the mbuf in
datapath when the PMD was behaving in VF mode.
This knowledge is no more used.
Fixes: 528a9fbec6 ("net/mlx5: support ConnectX-5 devices")
Cc: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Since filling hardware buffer pool (bpool) is Rx related
constant describing maximum number of rx descriptors
instead of maximum number of Tx descriptors should be used.
Fixes: 0ddc9b815b ("net/mrvl: add net PMD skeleton")
Cc: stable@dpdk.org
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Show appropriate log message in case Tx offloads are either
not supported or missing.
Fixes: 7d8f6c20cc ("net/mrvl: switch to the new Tx offload API")
Cc: stable@dpdk.org
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Allow TAP PMD to pass user desired MAC address as argument.
The argument value is processed as string delimited by ':',
is parsed and converted to HEX MAC address after validation.
Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
Previously all null devices were getting MAC address "00:00:00:00:00:00"
After attaching two Null device to OVS, seeing "00.00.00.00.00.00" mac
address for both null devices.
Fix this issue, by setting different mac address.
Signed-off-by: Mallesh Koujalagi <malleshx.koujalagi@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
When a slave is configured make sure that the slave's MTU
matches the bonding's idea of the MTU.
Signed-off-by: Chas Williams <chas3@att.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
Use new rte_eth_linkstatus_get/set helper functions to handle link
status update.
This driver was not doing atomic update of link status information.
And the return value was different than others.
The hardware also does not do autonegotiation (at least on Linux).
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Use new rte_eth_linkstatus_get/set helper functions to handle link
status update.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Yet another driver which was not returing correct value on
link change.
Use new rte_eth_linkstatus_get/set helper functions to handle link
status update.
Since this driver can't be built on x86 could not even
do a compile test.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Use new rte_eth_linkstatus_get/set helper functions to handle link
status update.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Use new rte_eth_linkstatus_get/set helper functions to handle link
status update.
And cleanup the logic in the the link update routine.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Tested-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Use new rte_eth_linkstatus_get/set helper functions to handle link
status update.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Use new rte_eth_linkstatus_get/set helper functions to handle link
status update.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Use new rte_eth_linkstatus_get/set helper functions to handle link
status update.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Use new rte_eth_linkstatus_get/set helper functions to handle link
status update.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Use new rte_eth_linkstatus_get/set helper functions to handle link
status update.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Use new rte_eth_linkstatus_get/set helper functions to handle link
status update.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Use new rte_eth_linkstatus_get/set helper functions to handle link
status update.
Also remove no longer necessary include of rte_atomic.h
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Use new rte_eth_linkstatus_get/set helper functions to handle link
status update.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Many drivers are all doing copy/paste of the same code to atomically
update the link status. Reduce duplication, and allow for future
changes by having common function for this.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
To handle atomic update of link status (64 bit), every driver
was doing its own version using cmpset.
Atomic exchange is a useful primitive in its own right;
therefore make it a EAL routine.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Add classifier configuration support via rte_flow api.
Signed-off-by: Natalie Samsonov <nsamsono@marvell.com>
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Add documentation and example for ingress policer, egress scheduler
and egress rate limiter.
Signed-off-by: Natalie Samsonov <nsamsono@marvell.com>
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>