Add a help to the existing application cli. This will enable users to
display the usage help with descriptions within the cli.
Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
On gcc 5.4.0 / native aarch64 from Ubuntu 16.04:
In function '__rte_ring_do_dequeue':
rte_ring.h: 385:35: warning:
conversion to 'int' from 'unsigned int' may change
the sign of the result [-Wsign-conversion]
n = __rte_ring_move_cons_head(r, is_sc, n, behavior,
^
Fixes: e8ed5056c8 ("ring: remove signed type flip-flopping")
Cc: stable@dpdk.org
Signed-off-by: Andy Green <andy@warmcat.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
I will no longer be maintaining szedata2 PMD.
Jan will take over this role.
Signed-off-by: Matej Vido <matejvido@gmail.com>
Acked-by: Jan Remes <remes@netcope.com>
This patch reverts the testpmd CLI prompt routine modifications done
in order to support softnic.
The reason of doing so is due to testpmd abnormal exit observed on
several setups caused by the softnic modifications to this routine,
for example: When running testpmd with tap interface
(testpmd
-n 4 --vdev=net_tap0,iface=tap0,remote=eth1 -- --burst=64
--mbcache=512 -i --nb-cores=7 --rxq=2 --txq=2 --txd=512
--rxd=512 --port-topology=chained --forward-mode=rxonly)
testpmd crashes seconds after presenting its prompt with the following
error:
testpmd> PANIC in prompt():
CLI poll error (-1)
Thread 1 "testpmd" received signal SIGABRT, Aborted.
0x00007ffff668e0d0 in raise () from /lib64/libc.so.6
(gdb) bt
#0 0x00007ffff668e0d0 in raise () from /lib64/libc.so.6
#1 0x00007ffff668f6b1 in abort () from /lib64/libc.so.6
#2 0x0000000000468027 in __rte_panic ()
#3 0x00000000004876ed in prompt ()
#4 0x000000000046dffc in main ()
When running testpmd with bare-metal device
(testpmd -n 4 --socket-mem=1024,1024 -w 04:00.0 --
--burst=64 --mbcache=512 -i --nb-cores=7
--rxq=64 --txq=4 --txd=16 --rxd=16)
and pressing CTRL+D right after testpmd prompt is presented then
the program crashes while presenting the same messages as above.
Needless to say that this behavior is not observed when using the
previous CLI prompt routine.
Fixes: 0ad778b398 ("app/testpmd: rework softnic forward mode")
Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Calling rte_eth_dev_info_get() on secondary process cause a crash
because eth_dev->device is not set properly.
Fixes: ee27edbe0c ("drivers/net: share vdev data to secondary process")
Cc: stable@dpdk.org
Reported-by: Vipin Varghese <vipin.varghese@intel.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
The shadow used ring's size is the same as the vq's size,
so we shouldn't try more than "vq size" times. Besides,
the element pointed by avail->idx isn't available to the
device, so we will return error when try "vq size" times.
Fixes: 24e4844048 ("vhost: unify Rx mergeable and non-mergeable paths")
Fixes: a922401f35 ("vhost: add Rx support for packed ring")
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Jens Freimann <jfreimann@redhat.com>
This patch fixes the incorrect return value for rte_vhost_dequeue_burst()
when virtqueue is not enabled or virtqueue address translation fails.
Fixes: 62250c1d09 ("vhost: extract split ring handling from Rx and Tx functions")
Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Reviewed-by: Jens Freimann <jfreimann@redhat.com>
Acked-by: Tiwei Bie <tiwei.bie@intel.com>
addressing a gcc 4.7.2 bug that cannot be reproduced with latter
versions:
"bin/ld: Warning: alignment 8 of symbol `mlx5_glue' in
src/dpdk/drivers/net/mlx5/mlx5_glue.c.21.o is smaller than 16 in
src/dpdk/drivers/net/mlx5/mlx5_rxq.c.21.o"
Fix it be forcing the alignment of the glue lib.
Fixes: 0e83b8e536 ("net/mlx5: move rdma-core calls to separate file")
Cc: stable@dpdk.org
Signed-off-by: Yaroslav Brustinov <ybrustin@cisco.com>
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Network interface indices being unsigned, an invalid index or error is
normally expressed through a zero value (see if_nametoindex()).
mlx5_ifindex() has a signed return type for negative values in case of
error. Since mlx5_nl.c does not check for errors, these may be fed back as
invalid interfaces indices to subsequent system calls. This usage would
have been correct if mlx5_ifindex() returned a zero value instead.
This patch makes mlx5_ifindex() unsigned for convenience.
Fixes: ccdcba53a3 ("net/mlx5: use Netlink to add/remove MAC addresses")
Cc: stable@dpdk.org
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Querying a counters on a flow without counter is ending with a
segmentation fault.
Fixes: 60bd8c9747 ("net/mlx5: add count flow action")
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Ori Kam <orika@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
If one of (*priv->rxqs)[] is null, the for loop can iterate infinitely as
idx can't be increased.
Fixes: cd24d52639 ("net/mlx5: add mark/flag flow action")
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Route Netlink message socket is wrongly initialized by registering to
the route link group. This causes the socket to receive all link
message related to routes whereas the PMD do not expect to receive such
information. In some situation it ends by filling the socket at a point
that any new message cannot be exchanged.
As the PMD is not expected to process such broadcast messages, the
parameter in the nl_group in the function is also remove.
Fixes: ccdcba53a3 ("net/mlx5: use Netlink to add/remove MAC addresses")
Cc: stable@dpdk.org
Signed-off-by: Zijie Pan <zijie.pan@6wind.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
There should be at least one Tx CQE remained if Tx WQ and txq->elts[] have
available slots to send a packet because the size of Tx CQ is exactly
calculated from the size of other resources. As it is guaranteed, it is
checked by an assertion.
max_elts is checked after the assertion for Tx CQ. If no slot is available
in txq->elts[], the assertion would be wrong.
Fixes: 2eefbec531 ("net/mlx5: add missing sanity checks for Tx completion queue")
Fixes: 6ce84bd889 ("net/mlx5: add enhanced multi-packet send for ConnectX-5")
Cc: stable@dpdk.org
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Xueming Li <xuemingl@mellanox.com>
On systems where the required Netlink commands are not supported but
Mellanox OFED is installed, representors information must be retrieved
through sysfs.
Fixes: 26c08b979d ("net/mlx5: add port representor awareness")
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
In mlx5_traffic_enable() the TCI mask for the VLAN is wrong causing the
sub flow engine to reject the rule.
Fixes: 272733b5eb ("net/mlx5: use flow to enable unicast traffic")
Cc: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
This commit fixes compilation errors due to missing definitions
found when compiling mlx5 PMD from DPDK 17.11-LTS on Ubuntu 12.4
with kernel 3.15.
Fixes: 75ef62a943 ("net/mlx5: fix link speed capability information")
Fixes: 5bfc9fc112 ("net/mlx5: use static assert for compile-time sanity checks")
Cc: stable@dpdk.org
Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
This enables flow rules to match traffic coming from a different DPDK port
ID associated with the device (PORT_ID pattern item), mainly for the
convenience of applications that want to deal with a single port ID for all
flow rules associated with some physical device.
Testpmd example:
- Creating a flow rule on port ID 1 to consume all traffic from port ID 0
and direct it to port ID 2:
flow create 1 ingress transfer pattern port_id id is 0 / end actions
port_id id 2 / end
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
This enables flow rules to explicitly match VLAN traffic (VLAN pattern
item) and perform various operations on VLAN headers at the switch level
(OF_POP_VLAN, OF_PUSH_VLAN, OF_SET_VLAN_VID and OF_SET_VLAN_PCP actions).
Testpmd examples:
- Directing all VLAN traffic received on port ID 1 to port ID 0:
flow create 1 ingress transfer pattern eth / vlan / end actions
port_id id 0 / end
- Adding a VLAN header to IPv6 traffic received on port ID 1 and directing
it to port ID 0:
flow create 1 ingress transfer pattern eth / ipv6 / end actions
of_push_vlan ethertype 0x8100 / of_set_vlan_vid vlan_vid 42 /
port_id id 0 / end
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
This enables flow rules to explicitly match supported combinations of
Ethernet, IPv4, IPv6, TCP and UDP headers at the switch level.
Testpmd example:
- Dropping TCPv4 traffic with a specific destination on port ID 2:
flow create 2 ingress transfer pattern eth / ipv4 / tcp dst is 42 / end
actions drop / end
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
This patch enables creation of rte_flow rules that direct matching traffic
to a different port (e.g. another VF representor) or drop it directly at
the switch level (PORT_ID and DROP actions).
Testpmd examples:
- Directing all traffic to port ID 0:
flow create 1 ingress transfer pattern end actions port_id id 0 / end
- Dropping all traffic normally received by port ID 1:
flow create 1 ingress transfer pattern end actions drop / end
Note the presence of the transfer attribute, which requests them to be
applied at the switch level. All traffic is matched due to empty pattern.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Because mlx5 switch flow rules are configured through Netlink (TC
interface) and have little in common with Verbs, this patch adds a separate
parser function to handle them.
- mlx5_nl_flow_transpose() converts a rte_flow rule to its TC equivalent
and stores the result in a buffer.
- mlx5_nl_flow_brand() gives a unique handle to a flow rule buffer.
- mlx5_nl_flow_create() instantiates a flow rule on the device based on
such a buffer.
- mlx5_nl_flow_destroy() performs the reverse operation.
These functions are called by the existing implementation when encountering
flow rules which must be offloaded to the switch (currently relying on the
transfer attribute).
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
With mlx5, unlike normal flow rules implemented through Verbs for traffic
emitted and received by the application, those targeting different logical
ports of the device (VF representors for instance) are offloaded at the
switch level and must be configured through Netlink (TC interface).
This patch adds preliminary support to manage such flow rules through the
flow API (rte_flow).
Instead of rewriting tons of Netlink helpers and as previously suggested by
Stephen [1], this patch introduces a new dependency to libmnl [2]
(LGPL-2.1) when compiling mlx5.
[1] https://mails.dpdk.org/archives/dev/2018-March/092676.html
[2] https://netfilter.org/projects/libmnl/
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
While deleting the elements from the linked list, TAILQ_FOREACH causes
read from the freed pointer. Fixes the issue by using TAILQ_FOREACH_SAFE
instead.
Coverity issue: 302867
Fixes: bef50bcb1c ("net/softnic: implement start and stop")
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Setting up the bonding options before calling rte_eth_dev_probing_finish
triggers an invalid port id error because of port state not set, or set
unused
Fixes: fbe90cdd77 ("ethdev: add probing finish function")
Cc: stable@dpdk.org
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Chas Williams <chas3@att.com>
Add missing NULL point check inside ixgbe_pf_host_uninit, or it may cause
segment fault when detaching a device.
Fixes: cf80ba6e20 ("net/ixgbe: add support for representor ports")
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Remy Horton <remy.horton@intel.com>
remove queue id checks from dev_ops
ixgbe_dev_[rx/tx]_queue_[start/stop]
queue id checks already done by ethdev APIs that are calling these
dev_ops
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
remove queue id checks from dev_ops
fm10k_dev_[rx/tx]_queue_[start/stop]
queue id checks already done by ethdev APIs that are calling these
dev_ops
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
remove queue id checks from dev_ops
i40e_dev_[rx/tx]_queue_[start/stop]
i40evf_dev_[rx/tx]_queue_[start/stop]
queue id checks already done by ethdev APIs that are calling these
dev_ops
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Return value equal to zero means success and really expected.
Fixes: 0fa0070e43 ("net/sfc: support multicast addresses list controls")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
This feature is used to offload stripping of VLAN header from received
packets and update vlan_tci field in mbuf when
DEV_RX_OFFLOAD_VLAN_STRIP & ETH_VLAN_STRIP_MASK flag is set.
Signed-off-by: Rakesh Kudurumalla <rkudurumalla@caviumnetworks.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Improve description of api used to get port name from port id or
vice-versa.
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Set the rx and tx queue state appropriately when the queues or device are
started or stopped. This enables usage of the ethdev rx/tx queue start/stop
functions with the PCAP PMD.
Signed-off-by: Gage Eads <gage.eads@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Set the rx and tx queue state appropriately when the queues or device
are started or stopped.
Signed-off-by: Gage Eads <gage.eads@intel.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
Fixes: fd68b4739d ("vhost: use buffer vectors in dequeue path")
Reported-by: Yinan Wang <yinan.wang@intel.com>
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Acked-by: Zhihong Wang <zhihong.wang@intel.com>
Tested-by: Yinan Wang <yinan.wang@intel.com>
CRC_STRIP offload is always enabled, but lost here.
It is more robust to use device level offloads directly to
compose returned value.
Fixes: ff6a1197c3 ("net/sfc: convert to new Rx offload API")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Rx checksum offloads are on device level and should be checked and
enforced on device level.
Avoid logging of Rx checksum offloads enforced for each Rx queue.
Fixes: ff6a1197c3 ("net/sfc: convert to new Rx offload API")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
enic_set_mtu always reverts to the default Rx handler after changing
MTU. Try to use the simpler, non-scatter handler in this case as well.
Fixes: 35e2cb6a17 ("net/enic: add simple Rx handler")
Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
Fallback to filter with VLAN=0 if match without VLAN is not supported
Strictly speaking it is not 100% equivalent, but good tradeoff -
untagged and priority only tagged frames will match.
Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Now exception logic handles these cases:
When FW variant does not support filters with transport ports, but
IP protocol filters are supported, TCP/UDP protocol filters may be
used. When FW variant does not support filters with IPv4/6 addresses
or IP protocol, but filters with EtherType are supported, IPv4 and
IPv6 EtherTypes may be used
Fixes: 096dba799b ("net/sfc: avoid creation of ineffective flow rules")
Cc: stable@dpdk.org
Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>