Commit Graph

2854 Commits

Author SHA1 Message Date
Ed Czeck
3574222fc4 net/ark: set mbuf time stamp field on Rx
Time stamp was carried in the packet meta data, but not
place in the mbuf. The new time stamp field is the proper
destination.

Remove the setting of data offset since this is done by
rte_pktmbuf_free()

Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
Acked-by: John Miller <john.miller@atomicrules.com>
2017-04-19 15:37:37 +02:00
Nélio Laranjeiro
6703d83634 net/mlx5: remove extra check on Rx
Removing this check improves performance as VLAN and CRC stripping are
enabled most of the time.

Convert MLX5_CQE_VLAN_STRIPPED to network order to speed up the check
instead of doing it on the completion queue entry field.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-04-19 15:37:37 +02:00
Marcin Wilk
695cd416ce net/thunderx: fix stats access out of bounds
Trying to assign more queues to stats struct break only from one loop
when the maximum size is reached. Outside loop iteration is continued.
This leads to access an array out of bounds.

Fixes: 21e3fb0050 ("net/thunderx: add final bits for secondary queue support")
Cc: stable@dpdk.org

Signed-off-by: Marcin Wilk <marcin.wilk@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-04-19 15:37:37 +02:00
Wenzhuo Lu
a3bc447b40 net/ixgbe: move private APIs to a specific file
Create a new file rte_pmd_ixgbe.c for all the private
APIs. Move all the related code to the new file.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-19 15:37:37 +02:00
Wenzhuo Lu
96974a6600 net/i40e: move private APIs to a specific file
Create a new file rte_pmd_i40e.c for all the private
APIs. Move all the related code to the new file.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-19 15:37:37 +02:00
Jingjing Wu
1d43099033 net/i40e: fix default PFC setting
To keep consistent with previous release, Priority Flow Control (PFC)
need to be disabled by default. This patch fixes it.

This also fixes an issue where traffic was not forwarded by testpmd
occasionally. In those cases ~4770 pps seen on one of the ports rather
than the full rate (>20mpps).

Fixes: 6f0a707e5b ("net/i40e: enable DCB on SRIOV VFs")

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Tested-by: David Hunt <david.hunt@intel.com>
2017-04-19 15:37:37 +02:00
Jeff Guo
e711f8a8cd net/i40e: fix hash input set on X722
There are some new PCTYPEs on X722, but they have not been announced
on the RTE lib, so if it can not set corresponding hash input set for
these packet type, the hash function won’t work.

So we need to handle them base on the translation of the new
PCTYPE and the original PCTYPE.

Fixes: b6a0ec4182 ("i40e: use AQ for Rx control register read/write")

Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-04-19 15:37:37 +02:00
John Daley
fb83a23eeb net/enic: remove initialization of some mbuf fields
Remove initialization of next and nb_segs mbuf fields in the Rx path
since they are now initialized in the mbuf pool.

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

Signed-off-by: John Daley <johndale@cisco.com>
2017-04-19 15:37:37 +02:00
Jerin Jacob
5ba411079f net/thunderx: use internal byte ordering macros
The base code was using native GCC macros
for endian detection. Change to portable
rte_byteorder.h based endian detection.

Fixes: 262d43fe20 ("net/thunderx/base: add HW register definitions")

Suggested-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-04-19 15:37:37 +02:00
Pascal Mazon
69ebb8ae17 net/tap: update driver param string
Fixes: 2bc06869cd ("net/tap: add remote netdevice traffic capture")

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
2017-04-19 15:37:37 +02:00
Konstantin Ananyev
b81f5fa27f net/ixgbe: remove option to disable offload flags
Having packets received without any offload flags given in the mbuf is not
very useful, and performance tests with testpmd indicates little
benefit is got with the current code by turning off the flags. This makes
the build-time option pointless, so we can remove it.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2017-04-19 15:37:37 +02:00
Konstantin Ananyev
f160666a10 net/ixgbe: eliminate mbuf write on rearm
With the mbuf rework, we now have 8 contiguous bytes to be rearmed in the
mbuf just before the 8-bytes of olflags. If we don't do the rearm write
inside the descriptor ring replenishment function, and delay it to
receiving the packet, we can do a single 16B write inside the RX function
to set both the rearm data, and the flags together.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2017-04-19 15:37:37 +02:00
Jianbo Liu
309f95f2b6 net/i40e: sync between x86 and arm64 vector PMD
Porting two changes from x86 SSE implematation.
    net/i40e: fix checksum flag in x86 vector Rx
    net/i40e: eliminate mbuf write on rearm

Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org>
2017-04-19 15:37:37 +02:00
Bruce Richardson
c3f7edcd8c net/i40e: remove option to disable offload flags
Having packets received without any offload flags given in the mbuf is not
very useful, and performance tests with testpmd indicates little to no
benefit is got with the current code by turning off the flags. This makes
the build-time option pointless, so we can remove it.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Jianbo Liu <jianbo.liu@linaro.org>
2017-04-19 15:37:37 +02:00
Bruce Richardson
f4356d7ca1 net/i40e: eliminate mbuf write on rearm
With the mbuf rework, we now have 8 contiguous bytes to be rearmed in the
mbuf just before the 8-bytes of olflags. If we don't do the rearm write
inside the descriptor ring replenishment function, and delay it to
receiving the packet, we can do a single 16B write inside the RX function
to set both the rearm data, and the flags together.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Jianbo Liu <jianbo.liu@linaro.org>
2017-04-19 15:37:37 +02:00
Shijith Thotton
21ea96388e net/liquidio: fix null pointer check
Fix null pointer check in release Rx/Tx queue APIs.

Coverity issue: 1423923
Coverity issue: 1423924
Fixes: 9a30013b98 ("net/liquidio: add API to release Rx queue")
Fixes: cf6bfcbea1 ("net/liquidio: add API to release Tx queue")

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
2017-04-19 15:37:37 +02:00
Shijith Thotton
de6d0f59f0 net/liquidio/base: fix mbox command initialization
Initialize mail box command to request VF FLR. Data field was
uninitialized before as it was not required and caused the following
error during scan.

Coverity issue: 1384518
Fixes: cdb166963c ("net/liquidio: add API for VF FLR")

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
2017-04-19 15:37:37 +02:00
Qi Zhang
8a4764f8b7 net/i40e: add missing 25G link speed
Add missing 25G link speed decode in i40evf_dev_link_update.

Fixes: 75d133dd32 ("net/i40e: enable 25G device")
Cc: stable@dpdk.org

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
2017-04-19 15:37:37 +02:00
Qi Zhang
e5d85d36d2 net/i40e: fix VF link speed
When PF notify link speed to VF, encode of link speed need to
be converted from ETH_SPEED_XXX to I40E_LINK_SPEED_XXX.

Fixes: bb6722fb5c ("net/i40e: fix VF bonded device link down")
Cc: stable@dpdk.org

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
2017-04-19 15:37:37 +02:00
Qi Zhang
3d1636677a net/i40e: remove duplicate code
Make i40e_notify_all_vfs_link_status as a wrapper of
i40e_notify_vf_link_status so duplicate code can be removed.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
2017-04-19 15:37:37 +02:00
Bernard Iremonger
3d78adca77 net/i40e: fix QinQ eth pattern parsing
The eth keyword only should be accepted.

Fixes: d37705068e ("net/i40e: parse QinQ pattern")

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2017-04-19 15:37:37 +02:00
Andrew Rybchenko
68de5f6c03 net/sfc: remove unnecessary mbuf initialization on Rx
mbuf next is equal to NULL, nb_segs and reference counter are equal to 1
when mbuf is obtained from mempool.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-04-19 15:37:37 +02:00
Ed Czeck
727b3fe292 net/ark: integrate PMD
* Flesh out device configuration
* Add links dev_ops
* Allow dynamic extension loading
* Update release notes and feature listing

Signed-off-by: Shepard Siegel <shepard.siegel@atomicrules.com>
Signed-off-by: John Miller <john.miller@atomicrules.com>
Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
2017-04-19 15:37:37 +02:00
Ed Czeck
8b154b6902 net/ark: add Rx initial version
* Core RX packet moving functions

Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
2017-04-19 15:37:37 +02:00
Ed Czeck
c33d45af36 net/ark: add Tx initial version
* Core TX packet moving functions
* Flesh out ark_adapter struct to support TX code
(not all fields used at this patch)

Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
2017-04-19 15:37:37 +02:00
Ed Czeck
9c7188a68d net/ark: provide API for hardware modules pktchkr and pktgen
Provide C-level interface for Arkville's internal HW resources
pktchkr and pktgen

Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
2017-04-19 15:37:37 +02:00
Ed Czeck
cf18d4def2 net/ark: provide API for hardware modules UDM and DDM
Provide C-level interface for Arkville's internal HW resources
DDM (Downstream Data Mover) and UDM (Upstream Data Mover) modules

Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
2017-04-19 15:37:37 +02:00
Ed Czeck
b33ccdb17f net/ark: provide API for hardware modules MPU RQP and pktdir
Provide C-level interface for Arkville's internal HW resources
MPU, (Memory Prefetch Unit) pktdir (Packet director), and RQP
(Request Pacer) modules

Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
2017-04-19 15:37:37 +02:00
Ed Czeck
1131cbf0fb net/ark: stub PMD for Atomic Rules Arkville
Enable Arkville on supported configurations
Add overview documentation
Minimum driver support for valid compile
Arkville PMD is not supported on ARM or PowerPC at this time

Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
Signed-off-by: John Miller <john.miller@atomicrules.com>
2017-04-19 15:37:37 +02:00
Henry Cai
1cbeaa0ead net/i40e: fix allocation check
function i40evf_add_del_all_mac_addr without check return
value of rte_zmalloc

Fixes: 97ac72aa71 ("i40e: support setting VF MAC address")
Cc: stable@dpdk.org

Signed-off-by: Henry Cai <caihe@huawei.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
2017-04-19 15:37:37 +02:00
Henry Cai
4a8f7cdd22 net/cxgbe: fix possible null pointer dereference
Check return value of malloc.

Fixes: 3bd122eef2 ("cxgbe/base: add hardware API for Chelsio T5 series adapters")
Cc: stable@dpdk.org

Signed-off-by: Henry Cai <caihe@huawei.com>
Acked-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
2017-04-19 15:37:37 +02:00
Ferruh Yigit
74df3fd302 net/xenvirt: fix build error
build error:
.../drivers/net/xenvirt/rte_eth_xenvirt.c:676:9:
error: ‘struct rte_eth_dev’ has no member named ‘driver’
  eth_dev->driver = NULL;
         ^~

ethdev driver removed, removing assignment to it to fix the build error

Fixes: 9dca21fb80 ("ethdev: remove ethdev driver")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-04-19 14:12:50 +02:00
Jan Blunck
7d01240282 ethdev: remove PCI helper from generic ethdev header
This moves the rte_eth_copy_pci_info() into the PCI specific ethdev
header. As a side effect this also removes it from the list of symbols
exported by the rte_ethdev library.

Signed-off-by: Jan Blunck <jblunck@infradead.org>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2017-04-18 19:07:50 +02:00
Jan Blunck
9dca21fb80 ethdev: remove ethdev driver
This removes the now unused struct eth_driver.

Signed-off-by: Jan Blunck <jblunck@infradead.org>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2017-04-18 19:07:45 +02:00
Jan Blunck
fdf91e0f2f drivers/net: do not use ethdev driver
Signed-off-by: Jan Blunck <jblunck@infradead.org>
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2017-04-18 19:05:46 +02:00
Jan Blunck
050fe6e9ff drivers/net: use ethdev allocation helper for vdev
Signed-off-by: Jan Blunck <jblunck@infradead.org>
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2017-04-18 19:04:49 +02:00
Jan Blunck
c3b047be73 net/null: internalize create function
There is no need to export this API. Remaining users should use the
rte_eal_vdev_init() function instead.

Signed-off-by: Jan Blunck <jblunck@infradead.org>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2017-04-18 19:03:49 +02:00
Jan Blunck
87c3bf29c6 test: do not short-circuit null device creation
A virtual device should get initialized through the rte_eal_vdev_init()
function to properly initialize the driver.

Signed-off-by: Jan Blunck <jblunck@infradead.org>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2017-04-18 19:02:45 +02:00
Jan Blunck
f02513445e net/nfp: use ethdev DMA helper
This driver can use the library function rte_eth_dma_zone_reserve()
instead of duplicating the code.

Signed-off-by: Jan Blunck <jblunck@infradead.org>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2017-04-18 19:01:40 +02:00
Jan Blunck
68451eb669 net/bonding: call through EAL on create/free
To properly embed the generic rte_device into the rte_eth_dev this reworks
the bonding API to call through rte_eal_vdev_init().

Signed-off-by: Jan Blunck <jblunck@infradead.org>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2017-04-18 19:00:01 +02:00
Jan Blunck
5d2aa461cb vdev: use generic vdev struct for probe and remove
This is a preparation to embed the generic rte_device into the rte_eth_dev
also for virtual devices.

Signed-off-by: Jan Blunck <jblunck@infradead.org>
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
2017-04-14 15:41:50 +02:00
Ami Sabo
727d83ca23 net/virtio-user: fix multi-process attach
Secondary process doesn't properly attach to the rte_eth_device
initialized by the primary process.

Accessing device from secondary process (e.g. via rte_eth_rx_burst),
causes process to crash. because rte_eth_dev_data is not properly set.

The issue was flood by
'commit 7f95f78a8a ("ethdev: clear data when allocating device")'
which now clears rte_eth_dev_data entry.
For pci devices the struct is initialized by rte_eth_dev_pci_probe
->eth_dev_attach_secondary().
However, for virtio-user virtio_user_pmd_probe() is called instead of
rte_eth_dev_pci_probe().

The fix is to call rte_eth_dev_attach_secondary(), for secondary
process, from virtio_user_pmd_probe.

Fixes: 7f95f78a8a ("ethdev: clear data when allocating device")
Cc: stable@dpdk.org

Signed-off-by: Ami Sabo <amis@radware.com>
2017-04-14 15:22:49 +02:00
Qi Zhang
c23a1a3000 eal: clean up interrupt handle
The patch change the prototype of callback function
(rte_intr_callback_fn) by removing the unnecessary parameter.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
2017-04-06 21:15:55 +02:00
Ferruh Yigit
0c145b7eea drivers/net: remove unused DEPDIRS from makefiles
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-04-06 20:58:59 +02:00
Beilei Xing
ab5169a6c2 net/i40e: fix tunnel filter to VF
Failed to destroy tunnel filter rule if the action of
the tunnel filter is VF, root cause is the wrong vsi
used.

Fixes: c50474f31e ("net/i40e: support tunnel filter to VF")

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
2017-04-06 20:54:03 +02:00
Ferruh Yigit
1e846151cf event/sw: fix build for gcc 4.5.1
build error:
.../event/sw/sw_evdev_worker.c: In function ‘sw_event_release’:
.../event/sw/sw_evdev_worker.c:52:3: error: unknown field ‘op’ specified
in initializer

Fixed by updating struct initialization.

Fixes: 656af91800 ("event/sw: add worker core functions")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2017-04-06 20:40:31 +02:00
Ferruh Yigit
1daa21de5b event/octeontx: fix build for gcc < 4.6
-Ofast option supported from gcc4.6 [1], for older versions using
"-O3 -ffast-math" instead.

[1] build error:
cc1: error: invalid option argument ‘-Ofast’

Also struct initialization build error [2] fixed.

[2] build error:
.../event/octeontx/ssovf_mbox.c: In function ‘mbox_send_request’:
.../event/octeontx/ssovf_mbox.c:95:9: error: unknown field ‘u64’
specified in initializer

Fixes: 32ff26393b ("event/octeontx: add SSO HW device operations")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-04-06 20:40:31 +02:00
Ferruh Yigit
0b9ce550c4 net/thunderx: disable PMD for old compilers
Disable for gcc < 4.7 and icc <= 14.0

PMD uses some compiler builtins and new compiler options. Tested with
gcc 4.5.1 and following were not supported:

option:
-Ofast

macros:
_Static_assert

__ORDER_LITTLE_ENDIAN__
__ORDER_BIG_ENDIAN__
__BYTE_ORDER__

__atomic_fetch_add
__ATOMIC_ACQUIRE
__atomic_load_n
__ATOMIC_RELAXED
__atomic_store_n
__ATOMIC_RELEASE

It is not easy to fix all in PMD, disabling PMD for older compilers.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-04-06 20:40:27 +02:00
Fan Zhang
3fb45fdb66 crypto/scheduler: deprecate get/set mode functions
This patch deprecates the following functions in 17.05,
which will be removed in 17.08.
- rte_crpytodev_scheduler_mode_get()
- rte_crpytodev_scheduler_mode_set()

These two new functions replace them, fixing the typo in their names.
- rte_cryptodev_scheduler_mode_get()
- rte_cryptodev_scheduler_mode_set()

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2017-04-06 00:17:44 +02:00
Fan Zhang
a0e805ee08 crypto/scheduler: add more options
This patch adds initial mode and ordering enable/disable EAL
options to cryptodev scheduler PMD.

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
2017-04-06 00:17:44 +02:00