Commit Graph

2412 Commits

Author SHA1 Message Date
Wenzhuo Lu
f8687bd0b2 net/ixgbe/base: remove X550em SFP iXFI setup
Removes X550em SFP iXFI setup since there is no released
HW production with SFP iXFI.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-04 15:52:50 +02:00
Wenzhuo Lu
c268e8d745 net/ixgbe/base: make a debug message simple
The debug message is too long. Make it shorter.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-04 15:52:50 +02:00
Gowrishankar Muthukrishnan
c3def6a872 net/i40e: implement vector PMD for altivec
This patch enables i40e driver in PowerPC along with its altivec
intrinsic support.

Signed-off-by: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
Acked-by: Chao Zhu <chaozhu@linux.vnet.ibm.com>
2017-04-04 15:52:50 +02:00
Rami Rosen
d04e7d3d56 net/i40e: fix a typo in flow
This patch fixes a trivial typo in i40e_flow.c.

Fixes: 47c6782344 ("net/i40e: fix tunnel filter")
Fixes: d416530e63 ("net/i40e: parse tunnel filter")
Cc: stable@dpdk.org

Signed-off-by: Rami Rosen <rami.rosen@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2017-04-04 15:52:50 +02:00
Nélio Laranjeiro
c4ba54348b net/mlx5: fix supported packets types
Fixes: 0603df73a0 ("net/mlx5: fix Rx packet validation and type")
Cc: stable@dpdk.org

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-04-04 15:52:50 +02:00
Yong Wang
f58ca2f9ef net/e1000/base: fix multicast setting in VF
In function e1000_update_mc_addr_list_vf(), "msgbuf[0]" is used prior
to initialization at "msgbuf[0] |= E1000_VF_SET_MULTICAST_OVERFLOW".
And "msgbuf[0]" is overwritten at "msgbuf[0] = E1000_VF_SET_MULTICAST".

Fix it by moving the second line prior to the first one that mentioned
above.

Fixes: dffbaf7880 ("e1000: revert fix for multicast in VF")
Cc: stable@dpdk.org

Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-04 15:52:50 +02:00
Chas Williams
f078565129 net/bnx2x: fix transmit queue free threshold
The default tx_free_thresh is potentially larger than the allocated queue
which will result in TX queue cleanup never happening.  To fix this,
lower the default free threshold and ensure that the free threshold is
never greater than the maximum outstanding transmit buffers.

Fixes: 827ed2a118 ("net/bnx2x: restructure Tx routine")
Cc: stable@dpdk.org

Signed-off-by: Chas Williams <ciwillia@brocade.com>
Acked-by: Harish Patil <harish.patil@qlogic.com>
2017-04-04 15:52:50 +02:00
Nélio Laranjeiro
c8d4ee50cc net/mlx5: fix startup when flow cannot be applied
When flows cannot be re-applied due to configuration modifications, the
start function should rollback the configuration done.

Fixes: 2097d0d1e2 ("net/mlx5: support basic flow items and actions")
Cc: stable@dpdk.org

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-04-04 15:52:50 +02:00
Shahaf Shuler
e62bc9e706 net/mlx5: fix extended statistics
The number of extended statistics counters is queried through ETHTOOL.
ETHTOOL provides a different number when the link is up or down.
Since extended statistics query occurs at device start,
segmentation fault might happen when changing the link state before and
after the device start.

this commit address this issue, and query the number of statistics
before every call to ETHTOOL.

Fixes: a4193ae3bc ("net/mlx5: support extended statistics")
Cc: stable@dpdk.org

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-04-04 15:52:50 +02:00
Shahaf Shuler
cd89f22a1e net/mlx5: remove unused interface name query
Interface name is queried, however never used.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-04-04 15:52:50 +02:00
Qi Zhang
0be2953129 net/i40e: fix compile error
Fix the compile error when RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC
is disabled.

Also fake_mbuf is required to be initialized and assigned to
additional sw_ring entries for vector PMD independent from
RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC config option.

Fixes: 4861cde461 ("i40e: new poll mode driver")
Cc: stable@dpdk.org

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
2017-04-04 15:52:50 +02:00
Shahaf Shuler
9514fa2d1a net/mlx5: fix VLAN stripping indication
The indication on vlan stripping was taken from the wrong location in the
completion entry.

Fixes: 9964b965ad ("net/mlx5: re-add Rx scatter support")
Cc: stable@dpdk.org

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-04-04 15:52:50 +02:00
Beilei Xing
d27a8fd01f net/i40e: fix memory allocation for hash table
Testpmd failed to start in another hugetlbfs mount point on
i40e, the root cause is that hash table is always allocated
on socket 0.

Issue can be reproduced by forcing testpmd to allocate memory
only from node 1:

testpmd --socket-mem=0,8192 -- -i --socket-num=1

EAL: PCI device 0000:81:00.0 on NUMA socket 1
EAL:   probe driver: 8086:1572 net_i40e
PMD: eth_i40e_dev_init(): FW 4.40 API 1.4 NVM 04.05.03 eetrack 80001cd8
RING: Cannot reserve memory
HASH: memory allocation failed
PMD: i40e_init_ethtype_filter_list(): Failed to create ethertype hash
table!
EAL: Error - exiting with code: 1
  Cause: Requested device 0000:81:00.0 cannot be used

Fix the issue by assigning socket id during hash parameter definition.

Fixes: 5c53c82c81 ("net/i40e: store flow director filter")
Fixes: 425c3325f0 ("net/i40e: store tunnel filter")
Fixes: 078259773d ("net/i40e: store ethertype filter")
Cc: stable@dpdk.org

Reported-by: Ivan Nardi <nardi.ivan@gmail.com>
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
2017-04-04 15:52:50 +02:00
Wenzhuo Lu
a58d3e3b8e net/i40e: fix TC bitmap of VEB
When setting up the VEB, default TC bitmap is used.

But after setting the default TC bitmap, it's not stored. So when we're
trying to get the enabled TCs on the VEB, it's always wrong.

Fixes: 5135f3ca49 ("i40e: enable DCB in VMDQ VSIs")
Cc: stable@dpdk.org

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-04 15:52:50 +02:00
Qiming Yang
f09d46b6e9 net/i40e: remove redundant macros
These macros are left by historical reasons and useless now.

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
2017-04-04 15:52:50 +02:00
Qiming Yang
05abeb357b net/i40e: remove redundant VLAN insert code
Remove useless tx_flags and related macros in VLAN insertion.

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
2017-04-04 15:52:50 +02:00
Ferruh Yigit
75e2bc54c0 net/kni: add KNI PMD
Add KNI PMD which wraps librte_kni for ease of use.

KNI PMD can be used as any regular PMD to send / receive packets to the
Linux networking stack.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Yong Wang <yongwang@vmware.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Yong Wang <yongwang@vmware.com>
2017-04-04 15:52:50 +02:00
Shahaf Shuler
859081d3fb net/mlx5: add out of buffer counter to extended statistic
This commit adds RX out of buffer counter to xstats report.
The counter counts the number of dropped occurred due to lack of buffers
on device RX queues.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-04-04 15:52:50 +02:00
Keith Wiles
8657878861 net/tap: fix possibly unterminated string
Calling strncpy with a maximum size argument of 16 bytes on destination
array "ifr.ifr_ifrn.ifrn_name" of size 16 bytes might leave the
destination string unterminated.

Coverity issue: 1407499
Fixes: 6b38b2725c ("net/tap: fix multi-queue support")
Cc: stable@dpdk.org

Signed-off-by: Keith Wiles <keith.wiles@intel.com>
2017-04-04 15:52:50 +02:00
Shreyansh Jain
1263b426ff mempool: move stack handler as a driver
Moved from lib/librte_mempool, stack mempool handler is an independent
driver.
Shared builds would now require to link in librte_mempool_stack for
"stack" mempool handler.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2017-04-03 19:45:45 +02:00
Shreyansh Jain
9a8e9b57f5 mempool: move ring handler as a driver
Moved from lib/librte_mempool, ring mempool is now an independent
driver.
Shared builds would now need to add librte_mempool_ring for:
* ring_mp_mc
* ring_sp_sc
* ring_sp_mc
* ring_mp_sc

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2017-04-03 19:45:45 +02:00
Olivier Matz
8788fec1f2 net/mlx5: implement descriptor status API
Since there is no "descriptor done" flag like on Intel drivers, the
approach is different on mlx5 driver.
- for Tx, we call txq_complete() to free descriptors processed by
  the hw, then we check if the descriptor is between tail and head
- for Rx, we need to browse the cqes, managing compressed ones,
  to get the number of used descriptors.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
2017-03-30 15:27:42 +02:00
Olivier Matz
68a43d1bb0 net/i40e: implement descriptor status API
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-03-30 15:27:42 +02:00
Olivier Matz
a2919e13d9 net/ixgbe: implement descriptor status API
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
2017-03-30 15:27:42 +02:00
Olivier Matz
7d499cb15e net/igb: implement descriptor status API
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-03-30 15:27:42 +02:00
Olivier Matz
8cd01eb049 net/e1000: implement descriptor status API
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
2017-03-30 15:27:42 +02:00
Bruce Richardson
ecaed092b6 ring: return remaining entry count when dequeuing
Add an extra parameter to the ring dequeue burst/bulk functions so that
those functions can optionally return the amount of remaining objs in the
ring. This information can be used by applications in a number of ways,
for instance, with single-consumer queues, it provides a max
dequeue size which is guaranteed to work.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2017-03-29 22:32:20 +02:00
Bruce Richardson
14fbffb0aa ring: return free space when enqueuing
Add an extra parameter to the ring enqueue burst/bulk functions so that
those functions can optionally return the amount of free space in the
ring. This information can be used by applications in a number of ways,
for instance, with single-producer queues, it provides a max
enqueue size which is guaranteed to work. It can also be used to
implement watermark functionality in apps, replacing the older
functionality with a more flexible version, which enables apps to
implement multiple watermark thresholds, rather than just one.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2017-03-29 22:32:04 +02:00
Bruce Richardson
b88161be42 crypto/scheduler: fix include of local headers
When a C file for a library/driver is including the public header files for
that library, those need to be included as local includes using quotes
rather than angle-brackets. Without doing so, parallel builds can fail, as
the compiler will only look for those headers in the global include folder
rather than locally, and the build system does not enforce that the headers
for a lib are installed before the rest of the lib is compiled.

Fixes: 097ab0bac0 ("crypto/scheduler: add API")
Fixes: 503e9c5afb ("crypto/scheduler: register as vdev driver")
Fixes: 31439ee72b ("crypto/scheduler: add API implementations")
Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2017-03-28 14:05:03 +02:00
Bruce Richardson
80267f6855 net/xenvirt: fix missing dependency on cmdline lib
Xenvirt driver uses the cmdline lib for parsing ether addresses so add it
as a dependency to fix builds.

Fixes: feb9f680cd ("mk: optimize directory dependencies")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2017-03-28 11:51:18 +02:00
Bruce Richardson
636e739204 drivers/crypto: use ring size function
Rather than reading the size directly from the ring structure, use the
dedicated ring function for that purpose.
Previous commits to do this only did so for the null crypto driver which
was the only one compiled in by default, but all other drivers need to be
similarly updated.

Fixes: b11c78a2e0 ("crypto/null: use ring size function")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2017-03-27 23:56:58 +02:00
Olivier Matz
feb9f680cd mk: optimize directory dependencies
Before this patch, the management of dependencies between directories
had several issues:

- the generation of .depdirs, done at configuration is slow: it can take
  more than one minute on some slow targets (usually ~10s on a standard
  PC without -j).

- for instance, it is possible to express a dependency like:
  - app/foo depends on lib/librte_foo
  - and lib/librte_foo depends on app/bar
  But this won't work because the directories are traversed with a
  depth-first algorithm, so we have to choose between doing 'app' before
  or after 'lib'.

- the script depdirs-rule.sh is too complex.

- we cannot use "make -d" for debug, because the output of make is used for
  the generation of .depdirs.

This patch moves the DEPDIRS-* variables in the upper Makefile, making
the dependencies much easier to calculate. A DEPDIRS variable is still
used to process library dependencies in LDLIBS.

After this commit, "make config" is almost immediate.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Tested-by: Robin Jarry <robin.jarry@6wind.com>
Tested-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-03-27 23:28:43 +02:00
Billy McFall
5b2976c718 net/vhost: free consumed Tx buffers on demand
Add support to the vHostdriver for the new API to force free consumed
buffers on Tx ring. vHost does not cache the mbufs so there is no work
to do.

Signed-off-by: Billy McFall <bmcfall@redhat.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
2017-03-27 17:17:33 +02:00
Billy McFall
8d907d2b79 net/igb: free consumed Tx buffers on demand
Add support to the e1000 igb driver for the new API to force free
consumed buffers on Tx ring. This API is independent of the tx_rs_thresh
setting. With this API, buffers should be free even if tx_rs_thresh is
not met.

e1000 igb driver does not implement a tx_rs_thresh to free mbufs, it
frees a slot in the ring as needed. However, it could be implemented at
some future date.

Signed-off-by: Billy McFall <bmcfall@redhat.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
2017-03-27 17:17:33 +02:00
Hemant Agrawal
5a11168d9b mbuf: use pktmbuf helper to create the pool
When possible, replace the uses of rte_mempool_create() with
the helper provided in librte_mbuf: rte_pktmbuf_pool_create().

This is the preferred way to create a mbuf pool.

This also updates the documentation.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2017-03-15 13:48:02 +01:00
Thomas Monjalon
31123211bd remove unmaintained TILE-Gx architecture
The TILE-Gx architecture and its driver mpipe are not maintained.
The code is removed to avoid confusion.

A last update has been done in 17.05 before removal.
It can be built with the updated toolchain:
	http://www.mellanox.com/repository/solutions/tile-scm/
and libgxio:
	http://www.mellanox.com/repository/solutions/tile-scm/libgxio-1.0.tar.xz

Quote from http://dpdk.org/ml/archives/dev/2017-February/057940.html
"
Mellanox agrees to remove TILE-Gx support from DPDK.org, but will continue
to support customers using DPDK.
Customer that needs support should contact Mellanox directly.
"

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2017-03-15 11:40:57 +01:00
Olivier Matz
0ef850c4f6 ethdev: move a queue id check to generic layer
The check of queue_id is done in all drivers implementing
rte_eth_rx_queue_count(). Factorize this check in the generic function.

Note that the nfp driver was doing the check differently, which could
induce crashes if the queue index was too big.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
2017-03-09 19:29:51 +01:00
Bruce Richardson
b11c78a2e0 crypto/null: use ring size function
Rather than reading the size directly from the ring structure,
use the dedicated function for that purpose.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
2017-03-08 16:05:39 +01:00
Chris Metcalf
dd0eedb1cf tile: fix build
Re-enable CONFIG_RTE_LIBRTE_SCHED, since it is needed to build
correctly.

Fix a few warnings when compiling mpipe_tilegx.c.

Remove an empty rte_cpu_feature_table[] array using a bogus type.

Properly set RTE_OBJCOPY_{TARGET,ARCH} in mk/arch/tile/rte.vars.mk.

Signed-off-by: Chris Metcalf <cmetcalf@mellanox.com>
2017-02-27 16:44:32 +01:00
Chris Metcalf
a0593908d2 net/mpipe: remove requirement for non-upstreamed headers
These headers are not part of the set that are upstreamed as part
of glibc or the kernel, and we only need a few defines from each.
The hardware is frozen so these values are not going to change
in any case.

Signed-off-by: Chris Metcalf <cmetcalf@mellanox.com>
2017-02-27 16:44:32 +01:00
Fan Zhang
354da52e92 crypto/scheduler: fix session backup
Fixes the missed session backup during enqueue.

Fixes: 100e4f7e44 ("crypto/scheduler: add round-robin mode")

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2017-02-10 16:06:04 +01:00
Fan Zhang
f106eb44c0 crypto/scheduler: fix initialization
Fixes the wrong slave initialization issue on start-up

Fixes: 100e4f7e44 ("crypto/scheduler: add round-robin mode")

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2017-02-10 16:06:04 +01:00
Pablo de Lara
6707226368 drivers/crypto: fix different auth/cipher keys
When ciphering and authenticating in the same operation
(cipher-then-auth or auth-then-cipher),
the cipher key and authentication key were set with the same
key, in SNOW3G, KASUMI and ZUC PMDs.
They were using the key of the first transform structure,
instead of using the keys of the two different transform
structures.

This is not a big issue, since usually, the same key is
used for ciphering and authentication, but keys may be different.

Fixes: 3aafc423cf ("snow3g: add driver for SNOW 3G library")
Fixes: 2773c86d06 ("crypto/kasumi: add driver for KASUMI library")
Fixes: cf7685d68f ("crypto/zuc: add driver for ZUC library")
Cc: stable@dpdk.org

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
2017-02-10 16:03:46 +01:00
Pablo de Lara
a196eda431 crypto/aesni_mb: add missing digest length
AESNI MB now supports authentication only operations,
but the array containing all the possible digest lengths
was not updated to reflect the new algorithm NULL_HASH,
causing an "Out-of-bounds access".

Coverity issue: 140977
Fixes: 8772c3f713 ("crypto/aesni_mb: add single operation functionality")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
2017-02-10 15:10:28 +01:00
Wenzhuo Lu
e8a165d588 net/i40e: fix TC bandwidth definition
The range of TC bandwidth is 0 ~ 800, it's 16bits not 8bits.

Fixes: c8b9a3e3fe ("i40e: support DCB mode")
Cc: stable@dpdk.org

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-02-10 12:29:34 +01:00
Wei Zhao
37192bf2b4 net/ixgbe: fix VLAN mask TCI in flow rule parser
Use vlan_mask->tci as big endian since this is how rte flow defines it.

Fixes: 11777435c7 ("net/ixgbe: parse flow director filter")
Fixes: 37ed39b4e6 ("net/ixgbe: add TCI mask check for flow director")

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
2017-02-10 12:25:50 +01:00
Shahaf Shuler
3a49ffe38a net/mlx5: fix link status query
Trying to query the link status through the new ETHTOOL_GLINKSETTINGS
ioctl available since Linux 4.5 was always failing due to a kernel bug
fixed since version 4.9.

This commit also addresses a common issue where the headers version used
at compile time differs from that of the kernel on the target system, by
always defining missing symbols and moving the kernel version check at run
time.

Fixes: 1884087198 ("net/mlx5: fix support for newer link speeds")
CC: stable@dpdk.org

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-02-10 12:25:50 +01:00
Rasesh Mody
0ec753e6e0 net/bnx2x: increase release version
This patch bumps bnx2x PMD version to 1.0.5.1 to track the recent
fixes to the driver.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-02-10 12:25:49 +01:00
Ido Barnea
ac94e3bf12 net/vmxnet3: add speed capability
Signed-off-by: Ido Barnea <ibarnea@cisco.com>
Acked-by: Yong Wang <yongwang@vmware.com>
2017-02-10 12:25:49 +01:00
Jianbo Liu
989a840505 net/ixgbe: fix received packets number for ARM NEON
Vector PMD will check 4 descs in one time, but the statuses are not
consistent because the memory allocated for RX descriptors is cacheable
huagepage.
This patch is to calculate the number of received packets by scann DD bit
sequentially, and stops when meeting the first packet with DD bit unset.

Fixes: b20971b6cc ("net/ixgbe: implement vector driver for ARM")
Cc: stable@dpdk.org

Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org>
2017-02-10 12:25:49 +01:00
Jianbo Liu
a98212de4a net/ixgbe: fix received packets number for ARM
To get better performance, Rx bulk alloc recv function will scan 8 descs
in one time, but the statuses are not consistent on ARM platform because
the memory allocated for Rx descriptors is cacheable hugepages.
This patch is to calculate the number of received packets by scan DD bit
sequentially, and stops when meeting the first packet with DD bit unset.

Fixes: 7431041062 ("ixgbe: allow rx bulk alloc")
Cc: stable@dpdk.org

Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2017-02-10 12:25:49 +01:00
John Daley
9e226650fd net/enic: fix hardcoding of some flow director masks
Hard coded mask values were being used for several of the IPv4 and IPv6
fields. Use the values in the rte_eth_fdir_masks structure provided by the
caller.

Fixes: dfbd6a9cb5 ("net/enic: extend flow director support for 1300 series")
Cc: stable@dpdk.org

Signed-off-by: John Daley <johndale@cisco.com>
2017-02-10 12:25:49 +01:00
Jingjing Wu
c65e0f76ed net/e1000: fix bitmask of supported Tx flags
Add missed PKT_TX_IEEE1588_TMST to bitmask of all supported
packet Tx flags.

Fixes: 2b76648872 ("net/e1000: add Tx preparation")

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2017-02-10 12:25:49 +01:00
Jingjing Wu
859a17db7e net/ixgbe: fix bitmask of supported Tx flags
Add missed PKT_TX_IEEE1588_TMST to bitmask of all supported
packet Tx flags.

Fixes: 7829b8d52b ("net/ixgbe: add Tx preparation")

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2017-02-10 12:25:49 +01:00
Jingjing Wu
2e91b6ced7 net/i40e: fix bitmask of supported Tx flags
PKT_TX_TUNNEL_MASK and PKT_TX_IEEE1588_TMST are missed in bitmask
of all supported packet Tx flags by i40e. It will cause packet preparing
fail when sending tunnel packets with Tx offload.
This patch fixes it.

Fixes: 3f33e643e5 ("net/i40e: add Tx preparation")

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2017-02-10 12:25:49 +01:00
Qiming Yang
0046ba5c27 net/i40e: fix link update delay
Fix the redundant delay in function link update. There is no need to
call rte_delay_ms and hold CPU for 100ms when link status is up.

Fixes: 263333bbb7 ("i40e: fix link status timeout")
Cc: stable@dpdk.org

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-02-10 12:25:49 +01:00
Yongseok Koh
76bf1574e3 net/mlx5: fix updating total length of multi-packet send
The total length field in descriptor of inlined multi-packet send must be
updated before closing a session. There's possibility of updating it
afterward. This bug might cause one packet out of MLX5_MPW_DSEG_MAX gets
silently dropped by HW and impact performance, especially lossless test.

Fixes: 230189d9ff ("net/mlx5: support multi-packet send")
Cc: stable@dpdk.org

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-02-10 12:25:49 +01:00
Wenzhuo Lu
ae955b2bcf net/i40e: rework port check for driver-specific API
Change is_i40e_pmd to is_device_supported to make it more generic.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-02-10 12:25:49 +01:00
Tom Crugnale
bbb2b5d9fe net/i40evf: fix reporting of imissed packets
Missed packets on RX were erroneously being assigned to the ierrors
struct member. Change it to be assigned to imissed.

Fixes: 4861cde461 ("i40e: new poll mode driver")
Cc: stable@dpdk.org

Signed-off-by: Tom Crugnale <tcrugnale@sandvine.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-02-10 12:25:49 +01:00
Jeff Guo
e06bad05dc net/i40e: fix ethertype filter on X722
The GL_SWR_PRI_JOIN_MAP registers are effective on filters, changing
the register's default value will fail the ethertype filter.

The GL_SWR_PRI_JOIN_MAP values are different for each NIC, and current
X722 register values are wrong.

Fix X722 ethertype filter by setting registers to X722 default NVM
values.

Fixes: 92fbf2cbdf ("i40e: support X722 and its A0 hardware")
Cc: stable@dpdk.org

Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-02-10 12:25:49 +01:00
Jeff Guo
45f4dd1adc drivers/net: fix device configuration
dev_flags is wrongly overwritten with RTE_ETH_DEV_DETACHABLE value
in drivers after rte_eth_copy_pci_info().

Previous values of the dev_flags set in rte_eth_copy_pci_info(),
like RTE_ETH_DEV_INTR_LSC, are get lost. That will fail the device
configuration.

Fix by preventing dev_flags overwritten.

Fixes: 22dda618c0 ("pci: separate detaching ethernet ports from PCI devices")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Signed-off-by: Jeff Guo <jia.guo@intel.com>
2017-02-10 12:25:49 +01:00
Beilei Xing
47c6782344 net/i40e: fix tunnel filter
Creating IPv4 flow and IPv6 flow will cause conflict error.
Root cause is there's no IP info included in tunnel filter
input.

Fixes: 425c3325f0 ("net/i40e: store tunnel filter")
Fixes: d416530e63 ("net/i40e: parse tunnel filter")

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
2017-02-10 12:25:49 +01:00
Beilei Xing
4bc4a89e0f net/i40e: fix parsing tunnel filter
VNI of VXLAN is parsed wrongly. The root cause is that
array VNI in item VXLAN uses network byte ordering.

Fixes: d416530e63 ("net/i40e: parse tunnel filter")

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
2017-02-10 12:25:49 +01:00
Jakub Palider
201ff2e57a net/ena: fix setting host attributes
The hardware may reject adding host_info in case support for
host_info is missing in the list of supported features. On the
other hand the list of supported features may contain support
for the host_info - typical bootstrap problem.

This patch solves it by removing check against support for
host_info attribute and improves error handling by reacting
only to host attribute write failure to the hardware.

Fixes: 99ecfbf845 ("ena: import communication layer")
Cc: stable@dpdk.org

Signed-off-by: Jakub Palider <jpa@semihalf.com>
2017-02-10 12:25:49 +01:00
Wenzhuo Lu
478aed44d5 net/ixgbe: rework port check for driver-specific API
For PMD specific API it is required to check if provided port id is for
a supported device.

It's not appropriate to call rte_eth_dev_info_get in PMD, as
rte_eth_dev_info_get need to get info from PMD.

Remove rte_eth_dev_info_get from PMD code and get the info directly.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-02-10 12:25:49 +01:00
Keith Wiles
e1dbde9a1f net/tap: move closing file descriptors to close function
Remove closing fds code from pmd stop routine.

Signed-off-by: Keith Wiles <keith.wiles@intel.com>
Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
2017-02-10 12:25:49 +01:00
Keith Wiles
89a5bef09a net/tap: move link down before close
Fixes: f457b472b1 ("net/tap: add link up and down operations")

Signed-off-by: Keith Wiles <keith.wiles@intel.com>
Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
2017-02-10 12:25:49 +01:00
Keith Wiles
6157fd377c net/tap: cleanup log messages
Signed-off-by: Keith Wiles <keith.wiles@intel.com>
Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
2017-02-10 12:25:49 +01:00
Keith Wiles
6b38b2725c net/tap: fix multi-queue support
At the same time remove the code which created the first device queue
at probe time. Now all queues are created during queue setup calls.

Fixes: 02f96a0a82 ("net/tap: add TUN/TAP device PMD")

Signed-off-by: Keith Wiles <keith.wiles@intel.com>
Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
2017-02-10 12:25:49 +01:00
Keith Wiles
f4f0b1bc13 net/tap: remove unused variable
Signed-off-by: Keith Wiles <keith.wiles@intel.com>
Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
2017-02-10 12:25:49 +01:00
Keith Wiles
c1f2e8c78c net/tap: remove redundant file descriptor array
Signed-off-by: Keith Wiles <keith.wiles@intel.com>
Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
2017-02-10 12:25:49 +01:00
Wei Zhao
a50c11629c net/ixgbe: fix VXLAN parsing for flow director
VNI of VXLAN is parsed wrongly. The root cause is that
VNI array in VXLAN item also uses network byte ordering.

Fixes: 11777435c7 ("net/ixgbe: parse flow director filter")
Cc: stable@dpdk.org

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
2017-02-10 12:25:49 +01:00
Wei Zhao
37ed39b4e6 net/ixgbe: add TCI mask check for flow director
Add more check on the tci mask of VLAN and VXLAN parser
in fdir filter rule pattern parser. If such check not added,
it maybe cause error in fdir configuration set check.

Fixes: 11777435c7 ("net/ixgbe: parse flow director filter")
Cc: stable@dpdk.org

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
2017-02-10 12:25:49 +01:00
John Daley
ed6e564c21 net/enic: fix memory leak with oversized Tx packets
If a packet send is attempted with a packet larger than the NIC
is capable of processing (9208) it will be dropped with no
completion descriptor returned or completion index update, which
will lead to an mbuf leak and eventual hang.

Drop and count oversized Tx packets in the Tx burst function and
dereference/free the mbuf without sending it to the NIC.

Since the maximum Rx and Tx packet sizes are different on enic
and are now both being used, make the define ENIC_DEFAULT_MAX_PKT_SIZE
be 2 defines, one for Rx and one for Tx.

Fixes: fefed3d1e6 ("enic: new driver")
Cc: stable@dpdk.org

Signed-off-by: John Daley <johndale@cisco.com>
2017-02-10 12:25:49 +01:00
Pascal Mazon
123c42a487 net/tap: support promiscuous and allmulticast
Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
2017-02-10 12:25:49 +01:00
Pascal Mazon
f457b472b1 net/tap: add link up and down operations
Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
2017-02-10 12:25:49 +01:00
Pascal Mazon
7835953870 net/tap: display name after parsing
The probe parses for user-defined iface name. Let's use that value.

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
2017-02-10 12:25:49 +01:00
Pascal Mazon
634dbc7aa7 net/tap: keep kernel-assigned MAC address
There's no point in having a different internal MAC address than the one
provided by the kernel when creating the netdevice.

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
2017-02-10 12:25:49 +01:00
Pascal Mazon
455c14e974 net/tap: skip overwritten file descriptor assignment
pmd->fds[0], pmd->rxq[0] and pmd->txq[0] are set a couple of lines after
the for loop that initializes them to -1.

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
2017-02-10 12:25:49 +01:00
Pascal Mazon
f48a8d6797 net/tap: fix log level of errors
Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
2017-02-10 12:25:48 +01:00
Pascal Mazon
542594d3fb net/tap: fix name
dev->data->name contains the device name, e.g. "net_tap0".
dev->data->dev_private->name contains the actual iface name,
e.g. "dtap0".

In any case, the name must to be consistent with the tun_alloc() call in
eth_dev_tap_create().

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
2017-02-10 12:25:48 +01:00
Nélio Laranjeiro
8fcd6c2cf1 net/mlx5: fix inline WQE consumption
For some sizes of packets, the number of bytes copied in the work queue
element could be greater than the available size of the inline.  In such
situation it could consume one more work queue element where it should
not.

Fixes: 0e8679fcdd ("net/mlx5: fix inline logic")
Cc: stable@dpdk.org

Reported-by: Elad Persiko <eladpe@mellanox.com>
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-02-10 12:25:48 +01:00
Nélio Laranjeiro
f04f1d5156 net/mlx5: fix Tx WQE corruption caused by starvation
Fixes an issue which may occurs with the inline feature activated and a
packet greater than the max_inline requested.

In such situation, more work request elements can be consumed and in the
worst case override some still handled by the NIC, this can result in
sending garbage on the network or putting the work queue in error.

Fixes: 2a66cf3789 ("net/mlx5: support inline send")
Cc: stable@dpdk.org

Reported-by: Elad Persiko <eladpe@mellanox.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2017-02-10 12:25:48 +01:00
Nélio Laranjeiro
0d637a34cb net/mlx5: fix ethernet header re-writing
First two bytes of the Ethernet header was written twice at the same place.

Fixes: b8fe952ec5 ("net/mlx5: prepare Tx vectorization")

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-02-10 12:25:48 +01:00
Ivan Malov
e9ddf37a50 net/sfc: fix setting empty multicast list
The patch is to fix sfc_set_mc_addr_list() behaviour in order
to make it accept an empty multicast address list thus making
it possible to remove multicast addresses inserted previously

Fixes: 0fa0070e43 ("net/sfc: support multicast addresses list controls")

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-02-10 12:25:48 +01:00
Nélio Laranjeiro
05d7777b6f net/mlx5: fix flow rule creation if ports are stopped
Adding a flow when the port is stopped ends in an inconsistent situation
where the queue can receive traffic when it should not.
Record new rules and apply them as soon as the port is started.

Fixes: 2097d0d1e2 ("net/mlx5: support basic flow items and actions")

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-02-10 12:25:48 +01:00
Nélio Laranjeiro
6194f53bb3 net/mlx5: fix verification of mark action
A configuration structure for the MARK action must always be specified.

Fixes: ea3bc3b1df ("net/mlx5: support mark flow action")

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-02-10 12:25:48 +01:00
Nélio Laranjeiro
8978c13e54 net/mlx5: use flow API default masks
Default masks were introduced in the API after its implementation in this
PMD.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-02-10 12:25:48 +01:00
Shahaf Shuler
a9f2fbc42f net/mlx5: fix inconsistent link status
Querying the link status can end up being in an inconsistent state,
like the port is reporting speed although it is down.

For this case another query is scheduled.

A race condition can occur between the scheduled query and link
status interrupt handlers.

When the scheduled query by-pass interrupt handlers, the link status
will be stuck in an inconsistent state.

This patch addresses the race condition by not blocking link status
queries in case delayed query is used.

Fixes: 198a3c339a ("mlx5: handle link status interrupts")
Cc: stable@dpdk.org

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-02-10 12:25:48 +01:00
Ido Barnea
b392e9871d net/virtio: add speed capability
The chosen fake capability (10G) is consistent with the reported
link speed in virtio_dev_link_update():
	link.link_speed = SPEED_10G;

The feature is not marked in doc/guides/nics/features/virtio.ini
because it is only a fake value.

Signed-off-by: Ido Barnea <ibarnea@cisco.com>
[Thomas: comments added]
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2017-02-10 12:06:16 +01:00
Keith Wiles
0002ca582d net/tap: fix invalid queue file descriptor
Rx and Tx queues share the common tap file descriptor, but save this
value separately.

Setting up Rx/Tx queue sets up both queues, release_queue close the
tap file but update file descriptor only for that queue.

This makes other queue's file descriptor invalid.

As a workaround, prevent release_queue callback to be called by default.

This is done by separating Rx/Tx setup functions, so that each only
setup its own queue, this prevents rte_eth_rx/tx_queue_setup() calling
release_queue before setup_queue.

Fixes: 02f96a0a82 ("net/tap: add TUN/TAP device PMD")

Signed-off-by: Keith Wiles <keith.wiles@intel.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-01-30 22:18:27 +01:00
Ferruh Yigit
f2462150ec drivers/net: remove redundant new line from logs
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2017-01-30 22:18:27 +01:00
Nélio Laranjeiro
3aa7d88451 net/mlx5: fix flow pattern validation
Size of the mask is wrongly computed and make the validation process only
verify the first 4 bytes of the layer.

Fixes: 2097d0d1e2 ("net/mlx5: support basic flow items and actions")

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-01-30 22:18:27 +01:00
Nélio Laranjeiro
e74ac66984 net/mlx5: fix flow pattern VLAN validation
TCI field is read from the wrong place due to an invalid cast. Moreover
there is no need to limit matching to VID since PCP and DEI bits can be
matched as well.

Fixes: 12475fb203 ("net/mlx5: support VLAN flow item")

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-01-30 22:18:27 +01:00
Ferruh Yigit
1d7f076c1c net/ixgbe: fix API comments for doxygen
Fixes: 57aa1fd284 ("net/ixgbe: move set VF functions from the ethdev")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-01-30 22:18:26 +01:00
Ferruh Yigit
4c42588cd7 net/i40e: fix API comments for doxygen
Fixes: a541407fe4 ("net/i40e: set VF MAC anti-spoofing from PF")
Fixes: 4cbc41efcb ("net/i40e: set VF VLAN anti-spoofing from PF")
Fixes: c0ec14757c ("net/i40e: set VF unicast promiscuous mode from PF")
Fixes: ae57070ca8 ("net/i40e: set VF multicast promiscuous mode from PF")
Fixes: 83bb95e3fe ("net/i40e: set VF VLAN insertion from PF")
Fixes: 61fff9b4c6 ("net/i40e: set VF broadcast mode from PF")
Fixes: c33abbc144 ("net/i40e: set VF VLAN tag from PF")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-01-30 22:18:26 +01:00
Bernard Iremonger
7041dc95c0 net/i40e: fix crash in close
Change the order of releasing the VSI's.
Release the VMDq VSI's first, then release the main VSI.

Fixes: 3cb446b4ae ("i40e: free vmdq vsi when closing")
Cc: stable@dpdk.org

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-01-30 22:18:26 +01:00
John Daley
bbab3d97c3 net/enic: fix MAC address add and remove
The mac_addr_add callback function was simply replacing the primary MAC
address instead of adding new ones and the mac_addr_remove callback would
only remove the primary MAC form the adapter. Fix the functions to add or
remove new address. Allow up to 64 MAC addresses per port.

Fixes: fefed3d1e6 ("enic: new driver")

Signed-off-by: John Daley <johndale@cisco.com>
Reviewed-by: Nelson Escobar <neescoba@cisco.com>
2017-01-30 22:18:26 +01:00
Ferruh Yigit
28a1fd4fd0 drivers/net: make PCI device id struct const
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2017-01-30 22:18:26 +01:00
Emmanuel Roullit
3c581421d0 net/cxgbe: remove unused variables
Found with clang static analysis:
drivers/net/cxgbe/sge.c:900:3: warning:
Value stored to 'in_use' is never read
        in_use += q->size;
        ^         ~~~~~~~

Removing "in_use" variable makes "hw_cidx" variable unused, which is
removed too.

Fixes: 4a01078b4f ("cxgbe: add Tx support")
Cc: stable@dpdk.org

Signed-off-by: Emmanuel Roullit <emmanuel.roullit@gmail.com>
Acked-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
2017-01-30 22:18:26 +01:00