Commit Graph

7871 Commits

Author SHA1 Message Date
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
Allain Legacy
cb4e16d948 config: enable AVP driver only on x86 64-bit
The AVP devices are only supported on Intel 64-bit architectures so
adjusting the defconfig attributes accordingly.

Fixes: 908072e9d0 ("net/avp: support driver registration")

Signed-off-by: Allain Legacy <allain.legacy@windriver.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
Santosh Shukla
89665ec20c test/mempool_perf: support default mempool
Mempool_perf autotest currently does perf regression for:
 * nochache
 * cache

Introducing default_pool, mainly targeted for ext-mempool regression
test. Ext-mempool don't need 'cache' modes so only adding test-case
support for 'nocache' mode.

So to run ext-mempool perf regression, user has to set
RTE_MBUF_DEFAULT_MEMPOOL_OPS="<>"

There is chance of duplication  ie.. if user sets

RTE_MBUF_DEFAULT_MEMPOOL_OPS="ring_mp_mc" then regression
will happen twice for 'ring_mp_mc'

Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2017-04-19 15:41:15 +02:00
Santosh Shukla
4fb80afd82 test/mempool_perf: free mempool on exit
Mempool_perf test not freeing pool memory.

Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2017-04-19 15:41:15 +02:00
Santosh Shukla
58856272ba test/mempool_perf: remove mempool global vars
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2017-04-19 15:41:15 +02:00
Shreyansh Jain
cbee51be40 test/mempool: support default mempool
Mempool test currently supports:
 * ring_mp_mc
 * stack

Adding a new default pool options. So, ring* + stack + default
(which can be 'stack' or 'ring')
 * This way, whatever the value of RTE_MBUF_DEFAULT_MEMPOOL_OPS is set,
   it would be verified.
 * even if that means duplicating some test (for example when "stack" is
   set as default and it already part of standard test)

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Reviewed-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2017-04-19 15:41:15 +02:00
Shreyansh Jain
98aabe1b70 test/mempool: free mempool on exit
mempool autotest was not freeing the mempools.

Fixes: 8ef772ae ("app/test: rework mempool test")
Cc: stable@dpdk.org

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Reviewed-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2017-04-19 15:41:15 +02:00
Shreyansh Jain
c6b3570f9e mk: link app with ring mempool by default
From the discussion in [1], it was observed that application should
have a default pool already linked even in case of shared builds.
Ring is especially important because packet mbuf creation API refer to
ring_mp_mc as default handler.

Documentation for this is pending.

[1] http://dpdk.org/ml/archives/dev/2017-April/063819.html

Fixes: 9a8e9b57f5 ("mempool: move ring handler as a driver")

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2017-04-19 15:33:51 +02:00
Thomas Monjalon
8bc74683de doc: fix sphinx warning
Seen with recent version of sphinx:
WARNING: latex_preamble conflicts with latex_elements['preamble'], ignored.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-04-19 15:33:51 +02:00
Shahaf Shuler
ed1df6c569 ethdev: fix build with strict flags
Compilation error seen while compiling mlx5 in debug mode
under RHEL 7.3:

rte_ethdev.h:1670:7: error: type of bit-field 'state' is a GCC extension
    [-Werror=pedantic]

Address it by removing the unnecessary bit-field width limitation.

Fixes: d52268a8b2 ("ethdev: expose device states")

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
2017-04-19 15:33:51 +02:00
Ferruh Yigit
27e9fb8459 eventdev: fix build for clang 4
build error:
.../lib/librte_eventdev/rte_eventdev.c:371:6:
error: logical not is only applied to the left hand side of this
bitwise operator [-Werror,-Wlogical-not-parentheses]
  if (!dev_conf->event_dev_cfg & RTE_EVENT_DEV_CFG_PER_DEQUEUE_TIMEOUT)
      ^
Added parentheses after the '!' to evaluate the bitwise operator first.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-04-19 15:24:32 +02:00
Ferruh Yigit
95cd37070a mk: fix build for clang 4
clang 4 gives "taking address of packed member may result in an
unaligned pointer value" warnings in a few locations [1].

Disabled "-Waddress-of-packed-member" warning for clang >= 4

[1] build errors:
.../lib/librte_eal/common/eal_common_memzone.c:275:25:
error: taking address of packed member 'mlock' of class or structure
'rte_mem_config' may result in an unaligned pointer value
[-Werror,-Waddress-of-packed-member]
        rte_rwlock_write_lock(&mcfg->mlock);
                               ^~~~~~~~~~~

.../lib/librte_ip_frag/rte_ipv4_reassembly.c:139:31:
error: taking address of packed member 'src_addr' of class or structure
'ipv4_hdr' may result in an unaligned pointer value
[-Werror,-Waddress-of-packed-member]
        psd = (unaligned_uint64_t *)&ip_hdr->src_addr;
                                     ^~~~~~~~~~~~~~~~

.../lib/librte_vhost/vhost_user.c:1037:34:
error: taking address of packed member 'payload' of class or structure
'VhostUserMsg' may result in an unaligned pointer value
[-Werror,-Waddress-of-packed-member]
	vhost_user_set_vring_num(dev, &msg.payload.state);
				       ^~~~~~~~~~~~~~~~~

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-04-19 15:24:32 +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
4558bd9020 ethdev: do not include PCI header
Since the PCI functionality has been moved to the PCI specific ethdev
header we don't need to include rte_pci.h from here anymore.

Signed-off-by: Jan Blunck <jblunck@infradead.org>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2017-04-18 19:09:41 +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
26e30bfce2 ethdev: remove ethdev PCI probe/remove
This removes the now unused rte_eth_dev_pci_probe() and
rte_eth_dev_pci_remove() functions.

Signed-off-by: Jan Blunck <jblunck@infradead.org>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2017-04-18 19:06:59 +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
dcd5c8112b ethdev: add PCI driver helpers
This adds the following helper intended to be used by rte_pci_driver
implementations working with ethdev:

- rte_eth_dev_pci_allocate
- rte_eth_dev_pci_release
- rte_eth_dev_pci_generic_probe
- rte_eth_dev_pci_generic_remove

Signed-off-by: Jan Blunck <jblunck@infradead.org>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2017-04-18 19:05:30 +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
7f0a669e7b ethdev: add allocation helper for virtual drivers
This helper should be used by ethdev drivers supporting virtual devices
to help allocating a new ethdev and properly filling the default fields.

Signed-off-by: Jan Blunck <jblunck@infradead.org>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2017-04-18 19:04:28 +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