Commit Graph

8291 Commits

Author SHA1 Message Date
Hemant Agrawal
5c6942fdb9 net/dpaa2: support parallel Rx
Typically when the PMD issues a Rx command to DPAA2 hardware,
the HW writes the available descriptors into the given memory.
The RX function then processes the frames and prepare them as
mbufs.

This patch adds support to issue another pull request to hardware
in another memory location, before we start processing the output
of the first request. This help in controlling the CPU cycles
wasted during the wait for the hardware to write the descriptors.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-06-12 10:41:26 +01:00
Hemant Agrawal
312b82f275 bus/fslmc: support for parallel Rx DQ requests
DPAA2 hardware support the option to configure
multiple memories for Rx recv buffer (DPAA2-DQRR).
Each Rx request executing is called as 'DQ' request.
This patch adds routines to get information w.r.t each DQ request.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-06-12 10:41:26 +01:00
Hemant Agrawal
d4984046b5 net/dpaa2: improve the error handling in dev init
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-06-12 10:41:26 +01:00
Hemant Agrawal
9464dbe9c9 net/dpaa2: stop using software annotation
The DPAA2 driver is not using the DPAA2 frame descriptor
software annotation area. This patch reduces the
PTA length to zero and adjust the RX Buffer Layout
accordingly.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-06-12 10:41:26 +01:00
Hemant Agrawal
19b7dc6a26 net/dpaa2: remove port level buffer layout definition
This code in device init is not required, as the buffer
layout setting is also being programmed during queue configuration.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-06-12 10:41:26 +01:00
Hemant Agrawal
63acdb33bc mk: change dpaa2 machine flag to cortex-a72
DPAA2 devices now support cortex-a72. They no longer support a57.
Also fp and simd is no more required to be stated explicitly for
standard a72 core.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-06-12 10:41:26 +01:00
Andrew Rybchenko
e71ec16bbb net/sfc: advertise that device is detachable
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-06-12 10:41:26 +01:00
Shijith Thotton
37ba0b9001 net/liquidio: set device speed capability info
Add subsystem device id of CN23xx cards and expose speed capability of
devices. Update liquidio feature file to mark support.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
2017-06-12 10:41:26 +01:00
Markus Theil
167e7b9ae5 net/igb: fix add/delete of flex filters
Before this patch, flex_filter->index was always zero when it was read
and used after rte_zmalloc. The corresponding code was therefore moved
into the add and delete parts of the if/else statement.

Fixes: 231d43909a ("igb: migrate flex filter to new API")
Cc: stable@dpdk.org

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-06-12 10:41:26 +01:00
Markus Theil
2764556a84 net/igb: support flex filters on i210/i211
i210/i211 also support flex filters. Tested on i210.

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-06-12 10:41:26 +01:00
Shahaf Shuler
626e8bfb84 net/mlx5: fix completion buffer size
Completion buffer size was computed wrongly, causing
completion polling to wraparound too early and miss entries.

Fixing it by using Direct Verbs to query the CQ info.

Fixes: 6218063b39 ("net/mlx5: refactor Rx data path")
Fixes: 1d88ba1719 ("net/mlx5: refactor Tx data path")
Cc: stable@dpdk.org

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-06-12 10:41:26 +01:00
Chas Williams
74b7fc0a0f net/af_packet: fix packet bytes counting
On error, we also need to zero the bytes transmitted.

Fixes: f4ff17a465 ("net/af_packet: guard against buffer overruns in Tx path")
Cc: stable@dpdk.org

Signed-off-by: Chas Williams <ciwillia@brocade.com>
2017-06-12 10:41:26 +01:00
Chas Williams
92656e96dd net/af_packet: handle possible null pointer
Fixes: 1b93c2aa81 ("net/af_packet: add interface name to internals")
Cc: stable@dpdk.org

Signed-off-by: Chas Williams <ciwillia@brocade.com>
2017-06-12 10:41:26 +01:00
Andrew Rybchenko
f28ede500c net/sfc: support multi-process
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
2017-06-12 10:41:26 +01:00
Andrew Rybchenko
b7be9f4349 net/sfc: use locally stored data for logging
Required to be able to use logging in the secondary process
where Ethernet device pointer stored in sfc_adapter is invalid.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
2017-06-12 10:41:26 +01:00
Andrew Rybchenko
35870e506d net/sfc: carefully cleanup on init failure and shutdown
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
2017-06-12 10:41:26 +01:00
John Daley
0543f9d24a net/enic: flow API documentation
Update enic NIC guide, release notes and add flow API to the
supported features list.

Signed-off-by: John Daley <johndale@cisco.com>
Reviewed-by: Nelson Escobar <neescoba@cisco.com>
2017-06-12 10:41:26 +01:00
John Daley
936a9b9975 net/enic: flow API debug
Added a debug function to print enic filters and actions when
rte_validate_flow is called. Compiled in CONFIG_RTE_LIBRTE_ENIC_DEBUG_FLOW
is enabled and log level is INFO.

Signed-off-by: John Daley <johndale@cisco.com>
Reviewed-by: Nelson Escobar <neescoba@cisco.com>
2017-06-12 10:41:26 +01:00
John Daley
aa3d2ff821 net/enic: flow API for Legacy NICs
5-tuple exact Flow support for 1200 series adapters. This allows:
Attributes: ingress
Items: ipv4, ipv6, udp, tcp (must exactly match src/dst IP
       addresses and ports and all must be specified).
Actions: queue and void
Selectors: 'is'

Signed-off-by: John Daley <johndale@cisco.com>
Reviewed-by: Nelson Escobar <neescoba@cisco.com>
2017-06-12 10:41:26 +01:00
John Daley
26faa126d8 net/enic: flow API for NICs with advanced filters disabled
Flow support for 1300 series adapters with the 'Advanced Filter'
mode disabled via the UCS management interface. This allows:
Attributes: ingress
Items: Outer eth, ipv4, ipv6, udp, sctp, tcp, vxlan. Inner eth, ipv4,
       ipv6, udp, tcp.
Actions: queue and void
Selectors: 'is', 'spec' and 'mask'. 'last' is not supported

With advanced filters disabled, an IPv4 or IPv6 item must be specified
in the pattern.

Signed-off-by: John Daley <johndale@cisco.com>
Reviewed-by: Nelson Escobar <neescoba@cisco.com>
2017-06-12 10:41:26 +01:00
John Daley
2bbfbd48b7 net/enic: flow API mark and flag support
For VICs with filter tagging, support the MARK and FLAG actions
by setting appropriate mbuf ol_flags if there is a filter match.

Signed-off-by: John Daley <johndale@cisco.com>
Reviewed-by: Nelson Escobar <neescoba@cisco.com>
2017-06-12 10:41:26 +01:00
John Daley
6ced137607 net/enic: flow API for NICs with advanced filters enabled
Flow support for 1300 series adapters with the 'Advanced Filter'
mode enabled via the UCS management interface. This enables:
Attributes: ingress
Items: Outer eth, ipv4, ipv6, udp, sctp, tcp, vxlan. Inner eth, ipv4,
       ipv6, udp, tcp.
Actions: queue, and void
Selectors: 'is', 'spec' and 'mask'. 'last' is not supported

Signed-off-by: John Daley <johndale@cisco.com>
Reviewed-by: Nelson Escobar <neescoba@cisco.com>
2017-06-12 10:41:26 +01:00
John Daley
0f76668039 net/enic: flow API skeleton
Stub callbacks for the generic flow API and a new FLOW debug define.

Signed-off-by: John Daley <johndale@cisco.com>
Reviewed-by: Nelson Escobar <neescoba@cisco.com>
2017-06-12 10:41:26 +01:00
John Daley
322b355f21 net/enic/base: bring NIC interface functions up to date
Update the base functions for the Cisco VIC. These files are mostly
common with other VIC drivers so are left alone is as much as possible.
Includes in a new filter/action interface which is needed for Generic
Flow API PMD support. Update FDIR code to use the new interface.

Signed-off-by: John Daley <johndale@cisco.com>
Reviewed-by: Nelson Escobar <neescoba@cisco.com>
2017-06-12 10:41:25 +01:00
Wenzhuo Lu
bc9ee862ba net/i40e/base: fix Tx error stats on VF
Unfortunately the datasheet has a mistake. The
address of the TX error counter is wrong.

Fixes: 8db9e2a1b2 ("i40e: base driver")
CC: stable@dpdk.org

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-06-12 10:41:25 +01:00
Markus Theil
3d8ae69732 net/igb: support MAC filters for i210 and i211 chips
i210 and i211 also support unicast MAC filters.
The patch was tested on i210 based hw, for i211
support was looked up in the specs.

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-06-12 10:41:25 +01:00
Michael Lilja
68d19b480e net/i40e: improve FDIR programming times
Previously, the FDIR programming time is +11ms on i40e.
This patch will result in an average programming time of
22usec with a max of 60usec .

Signed-off-by: Michael Lilja <ml@napatech.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2017-06-12 10:41:25 +01:00
John Miller
2f3b88fbab net/ark: fix return value of null not checked
Coverity issue: 144517
Fixes: 1131cbf0fb ("net/ark: stub PMD for Atomic Rules Arkville")
Cc: stable@dpdk.org

Signed-off-by: John Miller <john.miller@atomicrules.com>
2017-06-12 10:41:25 +01:00
John Miller
bc10f22b6d net/ark: fix null pointer dereference
Coverity issue: 144520
Fixes: 727b3fe292 ("net/ark: integrate PMD")
Cc: stable@dpdk.org

Signed-off-by: John Miller <john.miller@atomicrules.com>
2017-06-12 10:41:25 +01:00
John Miller
d1434c0479 net/ark: fix return code not checked
Coverity issue: 144514
Fixes: 727b3fe292 ("net/ark: integrate PMD")
Cc: stable@dpdk.org

Signed-off-by: John Miller <john.miller@atomicrules.com>
2017-06-12 10:41:25 +01:00
John Miller
79a158130f net/ark: fix buffer not null terminated
Coverity issue: 144512
Coverity issue: 144513
Fixes: 9c7188a68d ("net/ark: provide API for hardware modules pktchkr and pktgen")
Cc: stable@dpdk.org

Signed-off-by: John Miller <john.miller@atomicrules.com>
2017-06-12 10:41:25 +01:00
Ferruh Yigit
c0802544d9 drivers/net: add generic ethdev macro to get PCI device
Instead of many PMD define their own macro, define a generic one in
ethdev and use that in PMDs.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Allain Legacy <allain.legacy@windriver.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-06-12 10:41:25 +01:00
Ferruh Yigit
dd2c630a5f drivers/net: remove unnecessary macro for unused variables
remove __rte_unused instances that are not required.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Allain Legacy <allain.legacy@windriver.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-06-12 10:41:25 +01:00
Pascal Mazon
460bf26fd8 net/tap: do not set remote MAC if not necessary
Check for the current MAC address on both the remote and the tap
netdevices before setting a new value.

While there, remove wrong empty lines and ensure tap_ioctl() return
value is negative, just like what is done throughout this code.

Fixes: 2bc06869cd ("net/tap: add remote netdevice traffic capture")

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
2017-06-12 10:41:25 +01:00
Pascal Mazon
bf7b7f437b net/tap: create netdevice during probing
This has three main benefits:
 - tun_alloc is now generic again for any queue,
 - mtu no longer needs to be handled in tap_setup_queue(),
 - an actual netdevice is created as soon as the device is probed.

On top of it, code in eth_dev_tap_create() has been reworked to have a
more logical behavior; initialization can now fail if a remote is
requested but cannot be set up.

Fixes: 2bc06869cd ("net/tap: add remote netdevice traffic capture")

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
2017-06-12 10:41:25 +01:00
Pascal Mazon
b32105eb1f net/tap: drop unnecessary nested block
This is cosmetic; the code is functionally equivalent.

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
2017-06-12 10:41:25 +01:00
Pascal Mazon
2e05e1d8c5 net/tap: remove unnecessary functions
These functions are only two lines each and are used only once.

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
2017-06-12 10:41:25 +01:00
Pascal Mazon
7748a4b441 net/tap: add debug messages
Print a detailed debug message inside tap_ioctl() directly. The caller
now only needs to check for return value.

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
2017-06-12 10:41:25 +01:00
Pascal Mazon
f6921783fe net/tap: add support for fixed MAC addresses
Support for a fixed MAC address for testing with the last octet
incrementing by one for each interface defined with the new 'mac=fixed'
string on the --vdev option. The default option is still to randomize
the MAC address for each tap interface.

Signed-off-by: Keith Wiles <keith.wiles@intel.com>
Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
2017-06-12 10:41:25 +01:00
Herakliusz Lipiec
799c5c602d net/i40e: add return value checks
Coverity issue: 1379362
Coverity issue: 1379365
Fixes: 71d35259ff ("i40e: tear down flow director")
Cc: stable@dpdk.org

Signed-off-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
2017-06-12 10:41:25 +01:00
Ferruh Yigit
b46069d4b1 net/null: do not touch mbuf next or nb segs on Rx
mbuf next and nb_segs fields already have the default values when get
from mempool, no need to update them in PMD.

See: 8f094a9ac5 ("mbuf: set mbuf fields while in pool")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
2017-06-12 10:41:25 +01:00
Ferruh Yigit
7623f1f8b9 net/ixgbe: do not touch mbuf initialized fields
See: 8f094a9ac5 ("mbuf: set mbuf fields while in pool")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-06-12 10:41:25 +01:00
Jerin Jacob
95b097c803 net/thunderx: add compile-time checks
The thunderx PMD is sensitive to the layout of the mbuf on
the RX path. Add in some compile-time checks to make sure the mbuf layout
assumptions are valid, and to provide hints to anyone changing the mbuf
where things may need to be updated.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-06-12 10:41:25 +01:00
Bruce Richardson
02c217b154 net/fm10k: add compile-time checks to vector driver
The vector PMD is very sensitive to the layout of the mbuf, especially on
the RX path. Add in some compile-time checks to make sure the mbuf layout
assumptions are valid, and to provide hints to anyone changing the mbuf
where things may need to be updated.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2017-06-12 10:41:25 +01:00
Bruce Richardson
b25f49d8e1 net/i40e: add compile-time checks to vector driver
The vector PMD is very sensitive to the layout of the mbuf, especially on
the RX path. Add in some compile-time checks to make sure the mbuf layout
assumptions are valid, and to provide hints to anyone changing the mbuf
where things may need to be updated.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2017-06-12 10:41:25 +01:00
Bruce Richardson
e6672d2f0f net/ixgbe: enable ixgbe vector PMD for i686
The ixgbe vector PMD was disabled for i686 unnecessarily. Enable it.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2017-06-12 10:41:25 +01:00
Bruce Richardson
631a2f530b net/ixgbe: add compile-time checks to vector driver
The vector PMD is very sensitive to the layout of the mbuf, especially on
the RX path. Add in some compile-time checks to make sure the mbuf layout
assumptions are valid, and to provide hints to anyone changing the mbuf
where things may need to be updated.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2017-06-12 10:41:25 +01:00
Ilya Maximets
a6793d47f3 ethdev: keep port id unchanged if obtaining by name failed
Currently, 'rte_eth_dev_get_port_by_name' changes transmitted
'port_id' unconditionally. This is undocumented and misleading
behaviour as user may expect unchanged value in case of error.

Otherwise, there is no sense having both return value and
a pointer in the function.

Fixes: 9c5b8d8b9f ("ethdev: clean port id retrieval when attaching")

Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
2017-06-09 18:35:01 +02:00
Beilei Xing
18872f511c app/testpmd: add TCP flags in flow rules
This commit adds TCP flags support in flow API as
some drivers have SYN filter.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Tested-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-06-08 23:12:13 +02:00
Beilei Xing
0f01a7e383 app/testpmd: fix creating E-Tag and NVGRE flow rules
Application fails to create NVGRE and E-Tag flows with
current configuration, this commit fixes the issue by
adding flow items for E_TAG and NVGRE.

Fixes: e4840ef268 ("ethdev: fix incomplete items in flow API")
Cc: stable@dpdk.org

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-06-08 23:10:20 +02:00