Commit Graph

9978 Commits

Author SHA1 Message Date
Zhiyong Yang
492ab60445 app/testpmd: remove unnecessary cast
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-10-12 01:52:50 +01:00
Yong Wang
457ea93fda net/ixgbe: fix uninitialized variable
In func ixgbe_dev_link_update(), "link.link_autoneg" is used in func
call rte_ixgbe_dev_atomic_write_link_status(), but is uninitialized.

Fixes: 82113036e4 ("ethdev: redesign link speed config")
Cc: stable@dpdk.org

Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-10-12 01:52:50 +01:00
Ferruh Yigit
72e3efb149 ethdev: revert use port name from device structure
This reverts commit a1e7c17555.

Original commit assumes there is 1:1 mapping between physical device and
ethdev port, so that device name can be used per port instead of ethdev
name field.

But one physical device may have multiple ethdev ports and each port
needs its own unique name.

One issue reported here:
http://dpdk.org/ml/archives/users/2017-September/002484.html

So reverting back the commit to continue using ethdev name field per
port.

Fixes: a1e7c17555 ("ethdev: use device name from device structure")
Cc: stable@dpdk.org

Reported-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2017-10-12 01:52:50 +01:00
Wei Zhao
3c272b280a app/testpmd: add commands for RSS queue region
This patch add a API configuration of queue region in rss.
It can parse the parameters of region index, queue number,
queue start index, user priority, traffic classes and so on.
According to commands from command line, it will call i40e
private API and start the process of set or flush queue region
configure. As this feature is specific for i40e, so private API
will be used. Aslo add a document for these new commands.
Queue region only support PF by now, so this document is
only for configuration of queue region on PF port.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
2017-10-12 01:52:50 +01:00
Wei Zhao
7cbecc2f74 net/i40e: support queue region set and flush
This feature enable queue regions configuration for RSS in PF,
so that different traffic classes or different packet
classification types can be separated to different queues in
different queue regions.This patch can set queue region range,
it include queue number in a region and the index of first queue.
This patch enable mapping between different priorities (UP) and
different traffic classes.It also enable mapping between a region
index and a sepcific flowtype(PCTYPE).It also provide the solution
of flush all configuration about queue region the above described.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
2017-10-12 01:52:50 +01:00
Intiyaz Basha
91f0c71eb5 net/liquidio: support promiscuous mode
Signed-off-by: Intiyaz Basha <intiyaz.basha@caviumnetworks.com>
Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
2017-10-12 01:52:50 +01:00
Wei Dai
0693877018 net/ixgbe: fix VFIO interrupt mapping in VF
When a VF port is bound to VFIO-PIC, only miscellaneous interrupt
is mapped to VFIO vector 0 in eth_ixgbevf_dev_init( ).
In ixgbevf_dev_start(), if previous VFIO interrupt mapping set in
eth_ixgbevf_dev_init( ) is not cleard, it will fail when calling
rte_intr_enable( ) tries to map Rx queue interrupt to other VFIO
vectors. This patch clears the VFIO interrupt mappings before
setting both miscellaneous and Rx queue interrupt mappings again
to avoid failure.

Fixes: 77234603fb ("net/ixgbe: support VF mailbox interrupt for link up/down")
Cc: stable@dpdk.org

Signed-off-by: Wei Dai <wei.dai@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Tested-by: Jianwei Ma <jianwei.ma@intel.com>
2017-10-12 01:52:50 +01:00
Wei Dai
ca9d659718 net/ixgbe: fix Rx queue interrupt mapping in VF
When a VF port is bound to VFIO-PCI, miscellaneous interrupt is
mapped to MSI-X vector 0 and Rx queues interrupt are mapped to
other vectors in vfio_enable_msix( ). To simplify implementation,
all VFIO-PCI bound ixgbe VF Rx queue interrupts can be mapped in
vector 1. And as current igb_uio only support only one vector,
ixgbe VF PMD should use vector 0 for igb_uio and vector 1 for
VFIO-PCI. Without this patch, VF Rx queue interrupt is mapped
to vector 0 in register settings and mapped to VFIO vector 1
in vfio_enable_msix( ), and then all Rx queue interrupts will
be missed.

Fixes: b13bfab4cd ("eal: reserve VFIO vector zero for misc interrupt")
Cc: stable@dpdk.org

Signed-off-by: Wei Dai <wei.dai@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Tested-by: Jianwei Ma <jianwei.ma@intel.com>
2017-10-12 01:52:50 +01:00
Hemant Agrawal
eb6d5a0af9 doc: update the SDK version for DPAA2
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-10-12 01:52:50 +01:00
Hemant Agrawal
f4be2da052 doc: minor corrections in DPAA NIC guide
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-10-12 01:52:49 +01:00
Matan Azrad
d5b0924ba6 ethdev: add return value to stats get dev op
The stats_get dev op API doesn't include return value, so PMD cannot
return an error in case of failure at stats getting process time.

Since PCI devices can be removed and there is a time between the
physical removal to the RMV interrupt, the user may get invalid stats
without any indication.

This patch changes the stats_get API return value to be int instead of
void.

All the net PMDs stats_get dev ops are adjusted by this patch.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-10-12 01:52:49 +01:00
Ajit Khaparde
75cd6fb1d9 net/bnxt: fix the association of a MACVLAN per VNIC
We were not associating a MAC+VLAN per VNIC filter correctly.
This patch fixes that. Also set the VLAN type appropriately.

Fixes: f92735db1e ("net/bnxt: add L2 filter alloc/init/free")
Cc: stable@dpdk.org

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-10-12 01:52:49 +01:00
Ajit Khaparde
2d64da097a net/bnxt: support FDIR
This patch brings support for Flow Director.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-10-12 01:52:49 +01:00
Ajit Khaparde
18b54a7e88 net/bnxt: prevent programming a duplicate flow
Match a flow against existing flows programmed in the HW
and prevent overlapping entries. Also change log level of
some logs to DEBUG.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-10-12 01:52:49 +01:00
Ajit Khaparde
dc0bdeb4fa net/bnxt: fix cleanup if a filter allocation fails
We are not checking if a filter allocation succeeded.
And we end up accessing a null pointer after that.
Also invalidate the fw_l2_filter_id to prevent unnecessary
HW access and hence HWRM command failures during exit.

Fixes: 5ef3b79fdf ("net/bnxt: support flow filter ops")
Cc: stable@dpdk.org

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-10-12 01:52:49 +01:00
Ori Kam
9a761de8ea net/mlx5: flow counter support
Example for setting rule for counting packets with dest
ip = 192.168.3.1 in testpmd:

testpmd: flow create 0 ingress pattern eth / ipv4 dst is 192.168.3.1
/ end actions queue index 0 / count / end

Reading the number of packets and bytes for the rule:

testpmd: flow query 0 0 count

Note: This feature is only supported starting Mellanox OFED 4.2

Signed-off-by: Ori Kam <orika@mellanox.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2017-10-12 01:52:49 +01:00
Raslan Darawsheh
78c7406b7b net/mlx5: add Rx HW timestamp
Expose Rx HW timestamp to packet mbufs.

Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2017-10-12 01:52:49 +01:00
Raslan Darawsheh
912267a33e app/testpmd: add Rx HW timestamp
Add enabling/disabling Rx HW timestamp from
command line and parameter.

Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2017-10-12 01:52:49 +01:00
Raslan Darawsheh
42ffc45aa3 ethdev: add Rx HW timestamp capability
Add a new offload capability flag for Rx HW
timestamp and enabling/disabling this via rte_eth_rxmode.

Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
Reviewed-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2017-10-12 01:52:49 +01:00
Yongseok Koh
03e0868b4c net/mlx5: fix deadlock due to buffered slots in Rx SW ring
When replenishing Rx ring, there're always buffered slots reserved
between consumed entries and HW owned entries. These have to be filled
with fake mbufs to protect from possible overflow rather than
optimistically expecting successful replenishment which can cause
deadlock with small-sized queue.

Fixes: fc048bd52c ("net/mlx5: fix overflow of Rx SW ring")
Cc: stable@dpdk.org

Reported-by: Martin Weiser <martin.weiser@allegro-packets.com>
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Tested-by: Martin Weiser <martin.weiser@allegro-packets.com>
2017-10-12 01:52:49 +01:00
Yong Wang
47cf8373a1 net/i40e: fix uninitialized variable
In func i40evf_dev_link_update(), "new_link.link_autoneg" is used in
func call i40evf_dev_atomic_write_link_status(), but is uninitialized.

Fixes: 2a73125b70 ("i40evf: fix link info update")
Cc: stable@dpdk.org

Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-10-12 01:52:49 +01:00
Aaron Conole
61789822ac net/enic: remove ancillary assignment
The assignment at initialization is overwritten immediately.  Drop the
assignment.

Signed-off-by: Aaron Conole <aconole@redhat.com>
Reviewed-by: John Daley <johndale@cisco.com>
2017-10-12 01:52:49 +01:00
Aaron Conole
d15ae1c372 net/enic: remove unused code
The functions here aren't called anywhere in code, at least according to
both the compiler, and some greps.

Signed-off-by: Aaron Conole <aconole@redhat.com>
Reviewed-by: John Daley <johndale@cisco.com>
2017-10-12 01:52:49 +01:00
Aaron Conole
e735c8e20b net/enic: fix assignment
As it stands, the existing assignment to mbuf has no effect outside of
the function.  Prior to this change, the mbuf argument would contain
an invalid address, but it would not be null.  After this change, the
caller gets a null mbuf back.

Fixes: 947d860c82 ("enic: improve Rx performance")
Cc: stable@dpdk.org

Signed-off-by: Aaron Conole <aconole@redhat.com>
Reviewed-by: John Daley <johndale@cisco.com>
2017-10-12 01:52:49 +01:00
Aaron Conole
32d1206e3c net/enic: update format string to match arg types
The argument `index` (and unique_id) is unsigned, but the format
string type used was for signed types.

Signed-off-by: Aaron Conole <aconole@redhat.com>
Reviewed-by: John Daley <johndale@cisco.com>
2017-10-12 01:52:49 +01:00
Ganghui Zeng
ae61e47209 net/bonding: strengthen the judgment of LACP packets
When the NIC does not support VLAN Rx offload may be wrong, resulting in
LACP packets will not be processed.

Signed-off-by: Ganghui Zeng <zengganghui@huawei.com>
Reviewed-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
2017-10-12 01:52:48 +01:00
Jasvinder Singh
5b590fbe09 app/testpmd: add traffic management forwarding mode
This commit extends the testpmd application with new forwarding engine
that demonstrates the use of ethdev traffic management APIs and softnic
PMD for QoS traffic management.

In this mode, 5-level hierarchical tree of the QoS scheduler is built
with the help of ethdev TM APIs such as shaper profile add/delete,
shared shaper add/update, node add/delete, hierarchy commit, etc.
The hierarchical tree has following nodes; root node(x1, level 0),
subport node(x1, level 1), pipe node(x4096, level 2),
tc node(x16348, level 3), queue node(x65536, level 4).

During runtime, each received packet is first classified by mapping the
packet fields information to 5-tuples (HQoS subport, pipe, traffic class,
queue within traffic class, and color) and storing it in the packet mbuf
sched field. After classification, each packet is sent to softnic port
which prioritizes the transmission of the received packets, and
accordingly sends them on to the output interface.

To enable traffic management mode, following testpmd command is used;

$ ./testpmd -c c -n 4 --vdev
	'net_softnic0,hard_name=0000:06:00.1,soft_tm=on' -- -i
	--forward-mode=tm

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2017-10-12 01:52:48 +01:00
Jasvinder Singh
3011b7d890 net/softnic: add TM hierarchy related ops
Implement ethdev TM hierarchy related APIs in SoftNIC PMD.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2017-10-12 01:52:48 +01:00
Jasvinder Singh
299a89de91 net/softnic: add TM capabilities ops
Implement ethdev TM capability APIs in SoftNIC PMD.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2017-10-12 01:52:48 +01:00
Jasvinder Singh
8316b9816b net/softnic: support traffic management
Add ethdev Traffic Management API support to SoftNIC PMD.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2017-10-12 01:52:48 +01:00
Jasvinder Singh
cc6d421574 net/softnic: add softnic PMD
Add SoftNIC PMD to provide SW fall-back for ethdev APIs.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2017-10-12 01:52:38 +01:00
David Harton
80d0ff81e8 ethdev: add return code to stats reset function
Some devices do not support reset of eth stats.  An application may
need to know not to clear shadow stats if the device cannot.

rte_eth_stats_reset is updated to provide a return code to share
whether the device supports reset or not.

Signed-off-by: David Harton <dharton@cisco.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-10-12 01:36:58 +01:00
Stephen Hemminger
2cb43002af ethdev: increase device internal name length
Allow sufficient space for UUID in string form (36+1).
Needed to use UUID with Hyper-V.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-10-12 01:36:58 +01:00
Tonghao Zhang
e087d4cd3a ethdev: fix a comment for config struct
We have change the type of rx_adv_conf, so change the comment for it.

Fixes: 4bdefaade6 ("ethdev: VMDQ enhancements")
Cc: stable@dpdk.org

Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-10-12 01:36:58 +01:00
Tomasz Duszynski
1a286a1139 doc: add mrvl NIC guide
Add documentation for the MRVL NET PMD driver.

Signed-off-by: Jacek Siuda <jck@semihalf.com>
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
2017-10-12 01:36:58 +01:00
Tomasz Duszynski
bdffe0c70a net/mrvl: support basic stats
Add support for both per queue and overall basic statistics.

Signed-off-by: Jacek Siuda <jck@semihalf.com>
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
2017-10-12 01:36:58 +01:00
Tomasz Duszynski
f3f0d77db6 net/mrvl: support packet type parsing
Add packet type parsing support.

Signed-off-by: Jacek Siuda <jck@semihalf.com>
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
2017-10-12 01:36:58 +01:00
Tomasz Duszynski
6ba75e403c net/mrvl: support CRC and L3/L4 offloads
Add support for crc offload and l3/l4 checksum offloads.

Signed-off-by: Jacek Siuda <jck@semihalf.com>
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
2017-10-12 01:36:58 +01:00
Tomasz Duszynski
a8f3d6783a net/mrvl: support VLAN filtering
Add support for vlan filtering.

Signed-off-by: Jacek Siuda <jck@semihalf.com>
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
2017-10-12 01:36:58 +01:00
Tomasz Duszynski
a20e0cd897 net/mrvl: support RSS hashing
Add support for rss hashing on rx.

Signed-off-by: Jacek Siuda <jck@semihalf.com>
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
2017-10-12 01:36:58 +01:00
Tomasz Duszynski
079bd31749 net/mrvl: support MAC filtering
Add support for unicast and multicast mac filters.

Signed-off-by: Jacek Siuda <jck@semihalf.com>
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
2017-10-12 01:36:58 +01:00
Tomasz Duszynski
b8b8c9962e net/mrvl: support for promiscuous and allmulticast
Add support for promiscuous and allmulticast modes.

Signed-off-by: Jacek Siuda <jck@semihalf.com>
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
2017-10-12 01:36:58 +01:00
Tomasz Duszynski
9b6924e957 net/mrvl: support jumbo frame
Add jumbo frame support.

Signed-off-by: Jacek Siuda <jck@semihalf.com>
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
2017-10-12 01:36:58 +01:00
Tomasz Duszynski
e53f0eb532 net/mrvl: support updating MTU
Add support for updating mtu.

Signed-off-by: Jacek Siuda <jck@semihalf.com>
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
2017-10-12 01:36:58 +01:00
Tomasz Duszynski
d9e7317e1b net/mrvl: add link speed capabilities
Return supported link speed capabilities via rte_dev_info_get().

Signed-off-by: Jacek Siuda <jck@semihalf.com>
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
2017-10-12 01:36:58 +01:00
Tomasz Duszynski
b684847a33 net/mrvl: add link update
Add support for retrieving physical link information i.e:
speed, duplex and link status.

Signed-off-by: Jacek Siuda <jck@semihalf.com>
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
2017-10-12 01:36:58 +01:00
Tomasz Duszynski
afb4d0d0bf net/mrvl: add Rx/Tx support
Add rx/tx support.

Signed-off-by: Jacek Siuda <jck@semihalf.com>
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
2017-10-12 01:36:58 +01:00
Tomasz Duszynski
0ddc9b815b net/mrvl: add net PMD skeleton
Add mrvl net pmd driver skeleton providing base for the further
development. Besides the basic functionality QoS configuration is
introduced as well.

Signed-off-by: Jacek Siuda <jck@semihalf.com>
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
2017-10-12 01:36:58 +01:00
Tomasz Duszynski
f98d403bc1 mk: link the whole cfgfile library
MRVL net pmd needs rte_cfgfile to parse QoS configuration file thus
librte_pmd_mrvl.a contains undefined symbols from librte_cfgfile.a.

As a result linking applications under app/ directory will fail
because librte_cfgfile.a comes before librte_pmd_mrvl.a during
the linking stage.

Linking the whole librte_cfgfile.a solves the issue.

Signed-off-by: Jacek Siuda <jck@semihalf.com>
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
2017-10-12 01:36:58 +01:00
Yongseok Koh
570acdb1da net/mlx5: add vectorized Rx/Tx burst for ARM
Brings vectorization through NEON instructions.

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-10-12 01:36:58 +01:00