Commit Graph

2223 Commits

Author SHA1 Message Date
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
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
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