Commit Graph

3083 Commits

Author SHA1 Message Date
Tiwei Bie
5bdd24e451 net/virtio: zero the whole memory zone
Zero the whole memory zone instead of the first few bytes.

Fixes: c1f86306a0 ("virtio: add new driver")
Cc: stable@dpdk.org

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
2017-06-16 14:04:25 +02:00
Zhihong Wang
29150b70ab vhost: support Rx queue count request
This patch implements the ops rx_queue_count for vhost PMD by adding
a helper function rte_vhost_rx_queue_count in vhost lib.

The ops rx_queue_count gets vhost RX queue avail count and helps to
understand the queue fill level.

Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>
Acked-by: Ciara Loftus <ciara.loftus@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
2017-06-16 14:04:25 +02:00
Jerin Jacob
98a7ea332b fix typos using codespell utility
Fixing typos across dpdk source code using codespell utility.
Skipped the ethdev driver's base code fixes to keep the base
code intact.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2017-06-14 23:54:13 +02:00
Adrien Mazarguil
323f811a4a ethdev: add isolated mode to flow API
Isolated mode can be requested by applications on individual ports to avoid
ingress traffic outside of the flow rules they define.

Besides making ingress more deterministic, it allows PMDs to safely reuse
resources otherwise assigned to handle the remaining traffic, such as
global RSS configuration settings, VLAN filters, MAC address entries,
legacy filter API rules and so on in order to expand the set of possible
flow rule types.

To minimize code complexity, PMDs implementing this mode may provide
partial (or even no) support for flow rules when not enabled (e.g. no
priorities, no RSS action). Applications written to use the flow API are
therefore encouraged to enable it.

Once effective, leaving isolated mode may not be possible depending on PMD
implementation.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-06-14 23:33:00 +02:00
Ferruh Yigit
aee3d4d6d5 net/mlx5: fix build with gcc 7.1
build error:
.../dpdk/drivers/net/mlx5/mlx5_fdir.c:
  In function ‘fdir_filter_to_flow_desc’:
.../dpdk/drivers/net/mlx5/mlx5_fdir.c:146:18:
 error: this statement may fall through [-Werror=implicit-fallthrough=]
   desc->dst_port = fdir_filter->input.flow.udp4_flow.dst_port;
   ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.../dpdk/drivers/net/mlx5/mlx5_fdir.c:147:2: note: here
  case RTE_ETH_FLOW_NONFRAG_IPV4_OTHER:
  ^~~~

Fixed by adding fallthrough comment to the code.

Fixes: 76f5c99e68 ("mlx5: support flow director")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-06-14 22:54:31 +02:00
Ferruh Yigit
a45962823d net/enic: fix build with gcc 7.1
build error:

.../dpdk/drivers/net/enic/base/vnic_dev.c:
  In function ‘vnic_dev_get_mac_addr’:
.../dpdk/drivers/net/enic/base/vnic_dev.c:470:12:
  error: ‘a0’ is used uninitialized in this function
  [-Werror=uninitialized]
  args[0] = *a0;
            ^~~
...dpdk/drivers/net/enic/base/vnic_dev.c:
  In function ‘vnic_dev_classifier’:
...dpdk/drivers/net/enic/base/vnic_dev.c:471:12:
  error: ‘a1’ may be used uninitialized in this function
  [-Werror=maybe-uninitialized]
  args[1] = *a1;
            ^~~
Fixed by providing initial values.

Fixes: 9913fbb91d ("enic/base: common code")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-06-14 22:54:31 +02:00
Ferruh Yigit
92c0b132f2 net/i40e: fix memset size
This causes build error with gcc 7.1.1 :

...dpdk/drivers/net/i40e/i40e_flow.c:2357:2:
error: ‘memset’ used with length equal to number of elements without
       multiplication by element size [-Werror=memset-elt-size]
  memset(off_arr, 0, I40E_MAX_FLXPLD_FIED);
  ^~~~~~

...dpdk/drivers/net/i40e/i40e_flow.c:2358:2:
error: ‘memset’ used with length equal to number of elements without
       multiplication by element size [-Werror=memset-elt-size]
  memset(len_arr, 0, I40E_MAX_FLXPLD_FIED);
  ^~~~~~

Fixed by providing correct size to memset.

Fixes: 6ced3dd72f ("net/i40e: support flexible payload parsing for FDIR")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2017-06-14 22:54:23 +02:00
Jerin Jacob
6110b1c65b net/thunderx: manage PCI device mapping for SQS VFs
Since the commit e84ad157b7 ("pci: unmap resources if probe fails"),
EAL unmaps the PCI device if ethdev probe returns positive or
negative value.

nicvf thunderx PMD needs special treatment for Secondary queue set(SQS)
PCIe VF devices, where, it expects to not unmap or free the memory
without registering the ethdev subsystem.

Enable the same behavior by using RTE_PCI_DRV_KEEP_MAPPED_RES
PCI driver flag.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-06-12 16:57:22 +01:00
Ferruh Yigit
740feaf349 ethdev: remove driver name from device private data
rte_driver->name has the driver name and all physical and virtual
devices has access to it.

Previously it was not possible for virtual ethernet devices to access
rte_driver->name field (because eth_dev used to keep only pci_dev),
and it was required to save driver name in the device private struct.

After re-works on bus and vdev, it is possible for all bus types to
access rte_driver.

It is able to remove the driver name from ethdev device private data and
use eth_dev->device->driver->name.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Jan Blunck <jblunck@infradead.org>
2017-06-12 16:27:44 +01:00
Ferruh Yigit
96cb195211 net/ring: use EAL APIs in PMD specific API
When ring PMD created via PMD specific API instead of EAL abstraction
it is missing the virtual device creation done by EAL vdev.

And this makes eth_dev unusable exact same as other PMDs used, because
of some missing fields, like rte_device->name.

Now API calls EAL APIs to create ring PMDs.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2017-06-12 16:27:44 +01:00
Ferruh Yigit
a6992e9610 net/ring: set ethernet device field
The eth_dev->device link was missing for ring PMD, adding it.

This is to generalize rte_device access from eth_dev.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-06-12 16:27:43 +01:00
Matej Vido
8c21057185 net/szedata2: add more supported firmwares
Add IBUF and OBUF offsets definitions for new firmwares.

Signed-off-by: Matej Vido <vido@cesnet.cz>
2017-06-12 15:21:22 +01:00
Matej Vido
18402f9f70 net/szedata2: move ibuf and obuf to specific header
Signed-off-by: Matej Vido <vido@cesnet.cz>
2017-06-12 15:21:22 +01:00
Matej Vido
54c2576268 net/szedata2: refactor ibuf and obuf address definition
This is to prepare for firmwares with multiple ibufs and obufs.
Ibufs and obufs are the modules in FPGA firmware implementing
the Ethernet port.
There is one ibuf+obuf per Ethernet port.
The cards and firmwares allow one physical port to be one Ethernet
port or split into more Ethernet ports, e.g. one 100GE physical
port can be one Ethernet port of 100GE or split into ten Ethernet
ports of 10GE.
All DMA queues in the device are shared between all Ethernet ports.
Offsets of ibufs and obufs are defined in array.
Functions which operate on ibufs and obufs iterate over this array.

Signed-off-by: Matej Vido <vido@cesnet.cz>
2017-06-12 15:21:21 +01:00
Matej Vido
393da2a338 net/szedata2: refactor ibuf and obuf read and write
Remove unused read and write functions.
Use rte_read*, rte_write* functions to access ibuf and obuf
address space.

Signed-off-by: Matej Vido <vido@cesnet.cz>
2017-06-12 15:21:21 +01:00
Matej Vido
963c128751 net/szedata2: refactor ibuf and obuf names
Prefix "cgmii" is removed because it is too specific.
There are different ibuf/obuf modules in different firmwares
but the address space definition is the same.
This patch makes the name general.

Signed-off-by: Matej Vido <vido@cesnet.cz>
2017-06-12 15:21:21 +01:00
Wei Zhao
6a4d050e28 net/igb: flush all the filter
This patch adds a function to flush all the fliter list
and filter rule on a port.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
2017-06-12 11:40:28 +01:00
Wei Zhao
4be9e84ec8 net/igb: destroy consistent filter
This patch adds a function to destroy the flow fliter.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
2017-06-12 11:40:28 +01:00
Wei Zhao
22bb13410c net/igb: create consistent filter
This patch adds a function to create the flow directory filter.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
2017-06-12 11:40:27 +01:00
Wei Zhao
7cd77faf71 net/igb: parse flow API flex filter
check if the rule is a flex byte rule, and get the flex info.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
2017-06-12 11:40:20 +01:00
Wei Zhao
a13d9475a2 net/igb: parse flow API TCP SYN filter
check if the rule is a TCP SYN rule, and get the SYN info.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
2017-06-12 11:40:10 +01:00
Wei Zhao
a8600af437 net/igb: parse flow API ethertype filter
check if the rule is a ethertype rule, and get the ethertype info.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
2017-06-12 11:40:03 +01:00
Wei Zhao
c0688ef1ed net/igb: parse flow API n-tuple filter
Add rule validate function and check if the rule is a
n-tuple rule, and get the n-tuple info.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
2017-06-12 11:38:45 +01:00
Wei Zhao
69fdf74d8b net/igb: restore flex type filter
Add support for restoring flex type filter in SW.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
2017-06-12 11:34:42 +01:00
Wei Zhao
e2a2268b53 net/igb: restore ether type filter
Add support for restoring ether type filter in SW.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
2017-06-12 11:34:28 +01:00
Wei Zhao
862bd41ece net/igb: restore n-tuple filter
Add support for restoring n-tuple filter in SW.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
2017-06-12 11:34:12 +01:00
Wei Zhao
7db41ec827 net/igb: store and restore TCP SYN filter
Add support for storing and restoring TCP SYN filter in SW.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
2017-06-12 11:33:38 +01:00
Shijith Thotton
f544804f4b net/liquidio: do not touch mbuf initialized fields
Avoid re-initializing of mbuf fields which are set while in pool.
Replaced lio_recv_buffer_alloc with rte_pktmbuf_alloc.

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

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
2017-06-12 10:41:29 +01:00
Ajit Khaparde
bc8ee8572e net/bnxt: fix reporting of link status
This patch fixes incorrect reporting of link status

1) When link is down, set speed to zero. Otherwise a wrong non-zero
   speed will be displayed.

2) DAC cables can detect there is a signal, but it necessarily does not
   mean link is up. Code previously treated this as link up.

Fixes: 7bc8e9a227 ("net/bnxt: support async link notification")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-06-12 10:41:29 +01:00
Ajit Khaparde
a0cd82e044 net/bnxt: update HWRM defines
Some HWRM defines are missing from hsi_struct_def_dpdk.h
This patch adds them.

Also remove duplicate HWRM_RING_GRP_ALLOC entry.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-06-12 10:41:29 +01:00
Ajit Khaparde
20c8f79d22 net/bnxt: move PMD specific functions
Move PMD specific functions in the appropriate rte_pmd_bnxt.c file

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-06-12 10:41:29 +01:00
Beilei Xing
d926743473 net/i40e: support ether pattern for FDIR
Previously, i40e PMD will select ethertype filter
parser when adding ether pattern rules. In fact,
FDIR also supports ether pattern.
This patch adds ether pattern support for FDIR.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-06-12 10:41:29 +01:00
Beilei Xing
c0d8994f42 net/i40e: update supported patterns for FDIR
This patch updates supported patterns for flow
director filters.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-06-12 10:41:29 +01:00
Beilei Xing
42044b69c6 net/i40e: support input set selection for FDIR
This patch supports input set selection for flow
director filter.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-06-12 10:41:29 +01:00
Beilei Xing
6ced3dd72f net/i40e: support flexible payload parsing for FDIR
This patch adds flexible payload parsing support for
flow director filter.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-06-12 10:41:29 +01:00
Beilei Xing
30965ca341 net/i40e: add NVGRE flow parsing
This patch adds NVGRE flow parsing function to support NVGRE
classification.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-06-12 10:41:29 +01:00
Beilei Xing
2e756a9f8f net/i40e: refactor VXLAN flow parsing function
The current vxlan parsing function is not easy to read when parsing
filter type, this patch optimizes the function and makes it more
readable.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-06-12 10:41:29 +01:00
Shijith Thotton
dc7037ba73 net/liquidio: fix MTU calculation from port configuration
max_rx_pkt_len member of port RX configuration indicates max frame
length. Ethernet header and CRC length should be subtracted from it to
find MTU.

Fixes: 605164c8e7 ("net/liquidio: add API to validate VF MTU")
Cc: stable@dpdk.org

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
2017-06-12 10:41:29 +01:00
Moti Haimovsky
9f05a4b818 net/mlx4: support user space Rx interrupt event
Implement rxq interrupt callbacks

Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-06-12 10:41:29 +01:00
Harish Patil
91cc1bb97c net/qede: refactor Tx routine
Refactor TX routine such that TX BD updates can all be grouped together.
Based on the TX offloads requested the TX bitfields are calculated in
a temporary variable and TX BDs are updated at the end. This will minimize
the if checks also. This change is done to easily accommodate newer TX
offload operations in the future.

Signed-off-by: Harish Patil <harish.patil@cavium.com>
2017-06-12 10:41:29 +01:00
Harish Patil
44346c24b7 net/qede: fix VXLAN tunnel Tx offload flag setting
This patch fixes missing PKT_TX_TUNNEL_VXLAN Tx offload flag from the
supported Tx offloads and an incorrect tunnel TX BD bit setting.

Fixes: 3d4bb44116 ("net/qede: add fastpath support for VXLAN tunneling")
Cc: stable@dpdk.org

Signed-off-by: Harish Patil <harish.patil@cavium.com>
2017-06-12 10:41:29 +01:00
Rasesh Mody
2e2f392b24 net/qede/base: upgrade the FW to 8.20.0.0
This patch adds changes to upgrade to 8.20.0.0 FW.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-06-12 10:41:29 +01:00
Harish Patil
4c4bdadfa9 net/qede: refactoring multi-queue implementation
This patch does the following refactoring and cleanup:

- As part of multi-queue support a struct member called 'type' was added
  in struct qede_fastpath in order to identify whether a queue is RX or
  TX and take actions based on that. This was unnecessary in the first
  place since pointers to RX and TX queues are already available in
  rte_eth_dev->data. So all usage of fp->type is removed.

- Remove remaining additional layer of internal callbacks for RX/TX
  queues and fastpath related operations from the qed_eth_ops_pass.
  With this change the files qede_eth_if.[c,h] are no longer needed.

- Add new per-queue start/stop APIs instead of clubbing it all together.

- Remove multiple TXQs references (num_tc and fp->txqs) since CoS is not
  supported.

- Enable sharing of the status block for each queue pair.

- Remove enum qede_dev_state and instead make use of existing port
  states RTE_ETH_QUEUE_STATE_STOPPED/RTE_ETH_QUEUE_STATE_STARTED.

- Move qede_dev_start() and qede_dev_stop() to qede_ethdev.c from
  qede_rxtc.c.

Signed-off-by: Harish Patil <harish.patil@cavium.com>
2017-06-12 10:41:29 +01:00
Harish Patil
9a6d30ae6d net/qede: refactoring vport handling code
The refactoring is mainly for two reasons:

- To remove an additional layer of internal callbacks for all vport
  related operations from the struct qed_eth_ops_pass. Instead, we
  can invoke base APIs directly.

- Splitting a single large vport-update configuration into multiple and
  independent vport-update operations. Each configuration would touch
  only the required config bits that needs an update.

Signed-off-by: Harish Patil <harish.patil@cavium.com>
2017-06-12 10:41:29 +01:00
Ajit Khaparde
4cfe399f65 net/bnxt: support to set VF rxmode
This patch adds support to configure the VF L2 Rx settings.
The per VF setting is maintained in bnxt_child_vf_info.l2_rx_mask

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-06-12 10:41:29 +01:00
Ajit Khaparde
18c2854b96 net/bnxt: configure a default VF VLAN
This patch adds code to insert a default VF VLAN.
Also track the current default VLAN per vnic for the VF.
When setting the default VLAN, avoid setting it to the current value.

Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-06-12 10:41:29 +01:00
Ajit Khaparde
7a5b087444 net/bnxt: support to add a VF MAC address
This patch adds support to allocate a filter and program
it in the hardware for every MAC address added to the specified
function.

Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-06-12 10:41:29 +01:00
Ajit Khaparde
ff63ebbb67 net/bnxt: determine the Rx status of VF
This patch adds code to determine the Rx status of a VF.
It adds the rte_pmd_bnxt_get_vf_rx_status call, which calculates
the VNIC count of the function to get the Rx status.

Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-06-12 10:41:28 +01:00
Ajit Khaparde
dd46c6bbd5 net/bnxt: support get and clear VF specific stats
This patch adds code to get and clear VF stats.

It also adds the necessary HWRM structures to send the command
to the firmware.

Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-06-12 10:41:28 +01:00
Ajit Khaparde
36735a932c net/bnxt: support set VF QOS and MAC anti spoof
This patch adds support to
1) enable VF MAC anti spoof.
2) QOS configuration for specified VF.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-06-12 10:41:28 +01:00
Ajit Khaparde
49947a13ba net/bnxt: support Tx loopback, set VF MAC and queues drop
Add functions rte_pmd_bnxt_set_tx_loopback,
rte_pmd_bnxt_set_all_queues_drop_en and
rte_pmd_bnxt_set_vf_mac_addr to configure tx_loopback,
queue_drop and VF MAC address setting in the hardware.
It also adds the necessary functions to send the HWRM commands
to the firmware.

Signed-off-by: Steeven Li <steeven.li@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-06-12 10:41:28 +01:00
Ajit Khaparde
bb81e07323 net/bnxt: support LED on/off
This patch adds support for dev_led_on/off dev_ops

HWRM calls added:
bnxt_hwrm_port_led_qcaps()
bnxt_hwrm_port_led_cfg()

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-06-12 10:41:28 +01:00
Ajit Khaparde
577d3dced0 net/bnxt: refactor the query stats
1) Use hwrm_stat_ctx_query command to query statistics
   Using hwrm_stat_ctx_query command will allow polling
   the statistics from hardware instead of using the current push
   model from the hardware which does a DMA of the stats to the host
   at fixed intervals.

2) Use the rx_mbuf_alloc_fail to track mbuf alloc failures.

3) We were wrongly incrementing hwrm_cmd_seq in bnxt_hwrm_stat_clear
   and bnxt_hwrm_stat_ctx_alloc functions.  This patch fixes that.

Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-06-12 10:41:28 +01:00
Ajit Khaparde
3e12fdb78e net/bnxt: support VLAN pvid
This patch adds code to support vlan_pvid_set dev_op

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-06-12 10:41:28 +01:00
Ajit Khaparde
2fc201884b net/bnxt: support rxq/txq get information
Add support for txq_info_get and rxq_info_get dev_ops

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-06-12 10:41:28 +01:00
Ajit Khaparde
0958d8b643 net/bnxt: support LRO
This patch adds support to enable and disable LRO
To support this feature, the driver creates an aggregator ring.
When the hardware starts doing LRO, it sends a tpa_start completion.
When the driver receives a tpa_end completion, it indicates that the
LRO chaining is complete.

Signed-off-by: Steeven Li <steeven.li@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-06-12 10:41:28 +01:00
Ajit Khaparde
daef48efe5 net/bnxt: support set MTU
This patch adds support to modify MTU using the set_mtu dev_op.
To support frames > 2k, the PMD creates an aggregator ring.
When a frame greater than 2k is received, it is fragmented
and the resulting fragments are DMA'ed to the aggregator ring.
Now the driver can support jumbo frames upto 9500 bytes.

Signed-off-by: Steeven Li <steeven.li@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-06-12 10:41:28 +01:00
Ajit Khaparde
e2652b0a20 net/bnxt: support get FW version
This patch adds support for fw_version_get dev_op

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-06-12 10:41:28 +01:00
Ajit Khaparde
d69851df12 net/bnxt: support multicast filter and set MAC addr
This patch adds support for set_mc_addr_list and
mac_addr_set dev_ops

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-06-12 10:41:28 +01:00
Ajit Khaparde
7fe5668d2e net/bnxt: support VLAN filter and strip
This patch adds VLAN strip and offload callbacks.
To add a VLAN filter:
    For each VNIC and each associated filter(s)
        if VLAN exists:
            if VLAN matches vlan_id
                VLAN filter already exists, just skip and continue
            else
                add a new MAC+VLAN filter
        else
            Remove the old MAC only filter
            Add a new MAC+VLAN filter

To remove a VLAN filter:
    For each VNIC and each associated filter(s)
        if VLAN exists && VLAN matches vlan_id
            remove the MAC+VLAN filter
            add a new MAC only filter
        else
            VLAN filter doesn't exist, just skip and continue

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-06-12 10:41:28 +01:00
Ajit Khaparde
bfb9c2260b net/bnxt: support xstats get/reset
This patch adds support to get and reset xstats dev_ops

dev_ops added:
xstats_get, xstats_get_name, xstats_reset

HWRM commands added:
hwrm_port_qstats, hwrm_port_clr_stats

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-06-12 10:41:28 +01:00
Ajit Khaparde
10d074b202 net/bnxt: support tunneling
Add support for udp_tunnel_port_add/del dev_ops to configure a UDP port
for VXLAN and Geneve Tunnel protocols.

The HWRM supports only one global destination port for a tunnel type,
use a reference counter to keep track of its usage.
Cache the configured VXLAN/Geneve ports and use that value to check
if the right UDP port is being freed up.
Skip calling bnxt_hwrm_tunnel_dst_port_alloc if the same UDP port is
being programmed.
Skip calling bnxt_hwrm_tunnel_dst_port_free if no UDP port has been
configured.

Also update tx offload capabilities

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-06-12 10:41:28 +01:00
Ajit Khaparde
ccba2af2db net/bnxt: add additional HWRM debug info
Add the cmd_err and opaque_0 and opaque_1 fields to HWRM error
messages.  These allow better debugging of some classes of HWRM
errors.

Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-06-12 10:41:28 +01:00
Ajit Khaparde
84f2c526d3 net/bnxt: support lack of huge pages
rte_malloc_virt2phy() does not return a physical address if huge pages
aren't in use.  Further, rte_memzone->phys_addr is not a physical address.

Use rte_mem_virt2phy() and manually lock pages to support lack of
huge pages.

Also check the return value of rte_mem_virt2phy()

Verify the function returns an address. Otherwise return an error and
log a message.

Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-06-12 10:41:28 +01:00
Ajit Khaparde
4535cad395 net/bnxt: handle VF/PF initialization appropriately
1) For a VF, query the firmware to determine if a MAC address is
   already configured. If not configure a random default MAC address.

2) Do not initialize the default completion ring in
   bnxt_alloc_hwrm_rings().

3) While registering for async events with the firmware,
   use func_vf_cfg for a VF and use func_cfg for a PF.

4) Query the VNIC plcmode config using the bnxt_hwrm_vnic_plcmodes_qcfg
   before a VNIC is updated. Reconfigure the VNIC with the plcmode
   configuration queried earlier. Not doing this could overwrite
   the plcmodes in some cases.

5) Reorg the bnxt_handle_fwd_req to properly handle the forwarded
   requests. The previous code did not handle it completely.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-06-12 10:41:28 +01:00
Ajit Khaparde
b7778e8a1c net/bnxt: refactor to properly allocate resources for PF/VF
1) Move the function reset to bnxt_dev_init.
   On the same lines, setup, enable and request interrupt to init path.
   Memory allocation is also being done in the init path.

2) After a function reset, configure the VFs.  Distribute resources
   evenly between all functions (PF and VF) for now. In the future, this
   should be controllable.

3) The bnxt_vf_info and bnxt_pf_info had lot of duplication. Move the
   common items to struct bnxt. And only unique items specific to PF
   remain in the struct bnxt_pf_info.

4) Program the firmware to allow certain commands sent by a VF.
   Disallowing these will prevent clean VF driver cleanup.

5) Since PF/VF need to allocate resources from a pool in the hardware,
   use func_qcaps and func_qcfg to appropriately query the capabilities
   and available resources.

6) If a PF is being initialized and no VFs are allocated, explicitly
   call func_cfg to allocate the resources.

7) Once resources are requested from the firmware, update local copy
   of resource count in struct bnxt only after sending the func_qcfg to
   make sure the allocation request in the firmware went through.

The changes in this patch will be used by the subsequent patches
to allow proper initialization of PF/VF instance.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-06-12 10:41:28 +01:00
Ajit Khaparde
655a007238 net/bnxt: update to HWRM version 1.7.7
This patch updates the Broadcom bnxt PMD to version 1.7.7
Most of the changes in the patch are in the hsi_struct_def_dpdk.h - an
autogenerated file. The changes in the *.c files are because of changes
in the macro names.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-06-12 10:41:28 +01:00
Qi Zhang
98abce237b net/i40e: fix VF statistics
CRC bytes should be excluded, so rx/tx bytes of VF stats is aligned
with PF stats.

Fixes: 9aace75fc8 ("i40e: fix statistics")
Cc: stable@dpdk.org

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
2017-06-12 10:41:28 +01:00
Wei Zhao
37c11ed57d net/e1000: add support 2-tuple filter on i210/i211
Add support of i210 and i211 type nic in 2-tuple filter.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-06-12 10:41:28 +01:00
Qi Zhang
0bcdc44510 net/i40e: exclude internal packet's byte count
Tx/Rx byte counts of internal managed packet should be
excluded from the total rx/tx bytes.

Fixes: 9aace75fc8 ("i40e: fix statistics")
Cc: stable@dpdk.org

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2017-06-12 10:41:28 +01:00
Qi Zhang
f35fec63dd net/ixgbe: enable flex bytes for generic flow API
Add fdir flex byte support for rte_flow APIs.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-06-12 10:41:28 +01:00
Qi Zhang
8d702249d5 net/ixgbe: fix fdir mask not be reset
When the last fdir flow be destroyed, the flag "mask_added"
should be reset, so the remain mask info will not take effect
when a new flow be added.

Fixes: a14de8b498 ("net/ixgbe: destroy consistent filter")
Cc: stable@dpdk.org

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-06-12 10:41:27 +01:00
Qi Zhang
0601d85d90 net/ixgbe: remove redundant code
Remove redundant code.
item->type != RTE_FLOW_ITEM_TYPE_END already cover
item->type == RTE_FLOW_ITEM_TYPE_VLAN.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-06-12 10:41:27 +01:00
Beilei Xing
7cf5491b7b net/i40e: update actions for FDIR
This commit adds support of FLAG action and PASSTHRU
action for flow director.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-06-12 10:41:27 +01:00
Radu Nicolau
e261265e42 ethdev: move bypass functions to ixgbe PMD
Move all bypass functions to ixgbe pmd and remove function
pointers from the eth_dev_ops struct.

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-06-12 10:41:27 +01:00
Wei Zhao
760110abd6 net/igb: fix checksum valid flags
To enable L4 checksum offload for SCTP packets, E1000_RXCSUM_CRCOFL
should be set.

Otherwise, for SCTP packets even L4 checksum not calculated, it will
return PKT_RX_L4_CKSUM_GOOD.

Fixes: af75078fec ("first public release")

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-06-12 10:41:27 +01:00
Yongseok Koh
c80711c3fb net/mlx5: fix redundant free of Tx buffer
SW completion ring of Tx (txq->elts) stores individual mbufs even if a
multi-segmented packet is sent. rte_pktmbuf_free_seg() must be used when
cleaning up the completion ring. Otherwise, chained mbufs are redundantly
freed and finally it would cause a crash.

Fixes: 1d88ba1719 ("net/mlx5: refactor Tx data path")
CC: stable@dpdk.org

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-06-12 10:41:27 +01:00
Yongseok Koh
70aee77ec6 net/mlx5: fix exception handling
A sanity check is required in priv_fdir_disable(). If resizing Rx queue
fails, this can cause a crash by referencing a NULL pointer.

Fixes: 76f5c99e68 ("mlx5: support flow director")
Fixes: 0cdddf4d06 ("net/mlx5: split Rx queue structure")
Cc: stable@dpdk.org

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-06-12 10:41:27 +01:00
Andrew Rybchenko
21233dd6c7 net/sfc: rely on one desc is one mbuf in simple EF10 Tx reap
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: David Riddoch <driddoch@solarflare.com>
2017-06-12 10:41:27 +01:00
Andrew Rybchenko
3fd7797fcd net/sfc: check added but not completed descs on EF10 Tx reap
There is not point to check other Tx descriptors.
It is important if Tx datapath does not reset Tx descriptor
mbuf pointer to NULL on completion (EF10 simple Tx will do).

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: David Riddoch <driddoch@solarflare.com>
2017-06-12 10:41:27 +01:00
Chas Williams
96b00e3a6a net/ring: fix adding MAC addresses
When .mac_addr_add() was changed to allow a return code, ring was changed
to return -ENOTSUP.  This changes the behavior of the rte_ring driver in
a way that does not maintain backward compatibility.  Additionally, if
the intent is to return -ENOTSUP, you could simply not define the stubs.

Fixes: 6d01e580ac ("ethdev: fix adding invalid MAC address")
Cc: stable@dpdk.org

Signed-off-by: Chas Williams <ciwillia@brocade.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-06-12 10:41:27 +01:00
Nélio Laranjeiro
d6ed7be7b4 net/mlx5: remove already initialised mbuf fields
Since commit 8f094a9ac5 ("mbuf: set mbuf fields while in pool"), some
fields are already initialised and do not need to be modified by the PMD
anymore.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-06-12 10:41:27 +01:00
Nélio Laranjeiro
c8ffb8a9cc net/mlx5: fix flow application order on stop/start
Flow rules must be applied in the same order as they have been created and
thus destroyed in the reverse order.

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

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-06-12 10:41:27 +01:00
Wei Dai
09049d5266 net/ixgbe/base: update shared code version to 2017.05.16
* Remove PHY access for some 1G ports
* Disable X550EM-x 1GBASE-T led switch support

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-06-12 10:41:27 +01:00
Wei Dai
667af1981f net/ixgbe/base: disable X550EM-x 1GBASE-T led switch support
This patch disables X550EM_X 1Gbase-t led_[on|off] support since
the LEDs are wired to the PHY and the driver can not access the
PHY. led_[on|off]

Support is disabled by setting the function pointer to NULL.
init_led_link_act is also set to NULL.

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-06-12 10:41:27 +01:00
Wei Dai
91b0fdf44e net/ixgbe/base: remove PHY access for some 1G ports
This patch removes some some 1GBASE-T PHY access since the FW
configures the PHY. SW shall not configure or initialize link.
Accessing the PHY would require the use of MDI clause 22 which
should be avoided in high layer driver code.

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-06-12 10:41:27 +01:00
Andrew Rybchenko
69fbd1e923 net/sfc: handle already flushed Tx queue gracefully
Tx queue may be already flushed because of previous Tx error or
MC reboot.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-06-12 10:41:27 +01:00
Andrew Rybchenko
a47c6d6246 net/sfc: add Tx queue flush failed flag for sanity
Avoid usage of flushing state when Tx queue flush init failed.

Fixes: fed9aeb46c ("net/sfc: implement transmit path start / stop")
Cc: stable@dpdk.org

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-06-12 10:41:27 +01:00
Andrew Rybchenko
69d753f483 net/sfc: handle already flushed Rx queue gracefully
Rx queue may be already flushed because of previous Rx error or
MC reboot.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-06-12 10:41:27 +01:00
Andy Moreton
af39bcc612 net/sfc/base: let caller know that queue is already flushed
Tx/Rx queue may be already flushed due to Tx/Rx error on the queue or
MC reboot. Caller needs to know that the queue is already flushed to
avoid waiting for flush done event.

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-06-12 10:41:27 +01:00
Andy Moreton
7236d2bfe0 net/sfc/base: fix error code usage in common code
MCDI results returned in req.emr_rc have already been translated
from MC_CMD_ERR_* to errno names, so using an MC_CMD_ERR_* value
is incorrect.

Fixes: e7cd430c86 ("net/sfc/base: import SFN7xxx family support")
Cc: stable@dpdk.org

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-06-12 10:41:27 +01:00
Rahul Lakkireddy
ee606d9278 net/cxgbe: configure PCIe extended tags
Add support to configure minimum and maximum PCIe extended tag.

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
2017-06-12 10:41:27 +01:00
Rahul Lakkireddy
c12974c54c net/cxgbe: remove rmb bottleneck in Rx path
rmb before determining rsp_type is a bottleneck.
Once we determine rsp-type is FL, we can directly go ahead and read
packets based on q->stat->pidx and budget_left.

This removes bottleneck of rmb once per every RX packet.
Now, rmb exists once per RX batch.

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
2017-06-12 10:41:27 +01:00
Rahul Lakkireddy
d87ba24d1a net/cxgbe: fix rxq default params for ports under same PF
Enabling rx queues with default interrupt parameters doesn't happen
for other ports under same PF due to FULL_INIT_DONE flag being set
by the first port.

Fix is to to allow each port to enable its own rx queues with default
parameters.

Fixes: 0462d11544 ("cxgbe: add device related operations")

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
2017-06-12 10:41:27 +01:00
Rahul Lakkireddy
6c2809628c net/cxgbe: improve latency for slow traffic
TX coalescing waits for ETH_COALESCE_PKT_NUM packets to be coalesced
across bursts before transmitting them.  For slow traffic, such as
100 PPS, this approach increases latency since packets are received
one at a time and tx coalescing has to wait for ETH_COALESCE_PKT
number of packets to arrive before transmitting.

To fix this:

- Update rx path to use status page instead and only receive packets
  when either the ingress interrupt timer threshold (5 us) or
  the ingress interrupt packet count threshold (32 packets) fires.
  (i.e. whichever happens first).

- If number of packets coalesced is <= number of packets sent
  by tx burst function, stop coalescing and transmit these packets
  immediately.

Also added compile time option to favor throughput over latency by
default.

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
2017-06-12 10:41:27 +01:00
Rahul Lakkireddy
4dee49c1d4 net/cxgbe: remove LSB interrupt support
Remove RTE_PCI_DRV_INTR_LSC from driver flags, since LSC interrupts
are currently not supported.

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
2017-06-12 10:41:27 +01:00
Rahul Lakkireddy
ea6a99c077 net/cxgbe: fix port statistics
Do not count pause frames as part of normal TX/RX Frame/Byte counts.
Also, switch to using software counters rather than hardware for RX
stats.

Fixes: 856505d303 ("cxgbe: add port statistics")
Cc: stable@dpdk.org

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
2017-06-12 10:41:27 +01:00
Rahul Lakkireddy
cd9ce8c373 net/cxgbe: add compressed error vector
Add support for compressed error vector available in cpl_rx_pkt for
Chelsio T6.

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
2017-06-12 10:41:27 +01:00
Rahul Lakkireddy
edd04c6196 net/cxgbe: update Rx path for Chelsio T6
Update RX path to reflect Chelsio T6 register value changes.
Update ingress pack boundary value based on maximum payload size
that can be accommodated by underlying PCI.  Update ingress pad
boundary value based on smallest memory controller bus width
possible.  Enforce alignment for free list pointer start address.

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
2017-06-12 10:41:27 +01:00
Rahul Lakkireddy
10c6d94761 net/cxgbe: update RXQ channel mapping for Chelsio T6
Update MPS buffer groups and TP ingress channel congestion map to
correct RXQ allocation for Chelsio T6.

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
2017-06-12 10:41:27 +01:00
Rahul Lakkireddy
f146dd8863 net/cxgbe: update Tx path for Chelsio T6
Update TX path to reflect Chelsio T6 changes.

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
2017-06-12 10:41:27 +01:00
Rahul Lakkireddy
c962618cc3 net/cxgbe: update hardware info prints
Update informational prints pertaining to underlying hardware.
Add bootstrap firmware version and expansion ROM version prints.
Move the prints to a single function.

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
2017-06-12 10:41:27 +01:00
Rahul Lakkireddy
69aed04230 net/cxgbe/base: add forward error correction support
Add forward error correction (FEC) support and update link
configuration.

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
2017-06-12 10:41:27 +01:00
Rahul Lakkireddy
9da2a69417 net/cxgbe: update link speeds and port modules
Add 25G and 100G link speeds and update supported port modules.

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
2017-06-12 10:41:27 +01:00
Rahul Lakkireddy
5eb55bf8a4 net/cxgbe: grab available ports after firmware reset
Move code to get the available ports from the firmware after it had
been reset.  This ensures that driver uses the latest info on available
ports after firmware reset.

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
2017-06-12 10:41:27 +01:00
Rahul Lakkireddy
516306a2dd net/cxgbe/base: update flash part information
Update flash part identification and decoding to accommodate new
flash parts.

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
2017-06-12 10:41:26 +01:00
Rahul Lakkireddy
42be1b98da net/cxgbe/base: update register dump
Add Chelsio T6 registers to register dump.

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
2017-06-12 10:41:26 +01:00
Rahul Lakkireddy
04868e5bfd net/cxgbe: add support to run Chelsio T6 cards
Add code to detect and run T6 devices.  Update PCI ID Device table
with Chelsio T6 device ids and update documentation.

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
2017-06-12 10:41:26 +01:00
Ferruh Yigit
0362b7294d net/avp: remove redundant assignment
dev_info->driver_name is assigned by rte_eth_dev_info_get()
and existing value overwritten, removing assignment.

Fixes: 1a85922369 ("net/avp: add device configuration")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Allain Legacy <allain.legacy@windriver.com>
2017-06-12 10:41:26 +01:00
Pascal Mazon
8ae3023387 net/tap: add Rx/Tx checksum offload support
This patch adds basic offloading support, widely expected in a PMD.

Verify IPv4 and UDP/TCP checksums upon packet reception, and set
ol_flags accordingly.

On Tx, set IPv4 and UDP/TCP checksums when required, considering
ol_flags.

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
2017-06-12 10:41:26 +01:00
Pascal Mazon
f96fe1ab35 net/tap: fix some flow collision
The following two flow rules (testpmd syntax) should not collide:
flow create 0 priority 1 ingress pattern eth / ipv4 / end actions drop / end
flow create 0 priority 1 ingress pattern eth / ipv6 / end actions drop / end

But the eth_type in the associated TC rule was set to either "ip" or
"ipv6".  For TC, they could thus not have the same priority.

Use ETH_P_ALL only in the TC message to make sure those rules can
coexist.

Fixes: de96fe68ae ("net/tap: add basic flow API patterns and actions")
Cc: stable@dpdk.org

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
2017-06-12 10:41:26 +01:00
Hemant Agrawal
748eccb97c net/dpaa2: add support for firmware version get
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-06-12 10:41:26 +01:00
Hemant Agrawal
e164084994 net/dpaa2: configure jumbo frames
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-06-12 10:41:26 +01:00
Hemant Agrawal
977d0006ad net/dpaa2: add support for flow control
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-06-12 10:41:26 +01:00
Hemant Agrawal
a1f3a12cd5 net/dpaa2: add link status config support
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-06-12 10:41:26 +01:00
Hemant Agrawal
d20e6e600b net/dpaa2: add support for VLAN strip
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-06-12 10:41:26 +01:00
Hemant Agrawal
3ce294f223 net/dpaa2: add support for VLAN filter and offload
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-06-12 10:41:26 +01:00
Hemant Agrawal
5d5aeeedab net/dpaa2: add support for multicast promiscuous mode
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-06-12 10:41:26 +01:00
Hemant Agrawal
b4d97b7d31 net/dpaa2: add support for MAC address filtering
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-06-12 10:41:26 +01:00
Hemant Agrawal
23d6a87ee2 net/dpaa2: add support for tail drop on queue
This will help in limiting the size of queues and avoid
them growing practically infinite.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-06-12 10:41:26 +01:00
Hemant Agrawal
7ae777d064 net/dpaa2: add support for congestion notification
In case of HW egress FQ is congested, skip further
transmission of frames.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-06-12 10:41:26 +01:00
Hemant Agrawal
5c6942fdb9 net/dpaa2: support parallel Rx
Typically when the PMD issues a Rx command to DPAA2 hardware,
the HW writes the available descriptors into the given memory.
The RX function then processes the frames and prepare them as
mbufs.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
2017-06-12 10:41:26 +01:00
Andrew Rybchenko
35870e506d net/sfc: carefully cleanup on init failure and shutdown
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
2017-06-12 10:41:26 +01:00
John Daley
936a9b9975 net/enic: flow API debug
Added a debug function to print enic filters and actions when
rte_validate_flow is called. Compiled in CONFIG_RTE_LIBRTE_ENIC_DEBUG_FLOW
is enabled and log level is INFO.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Allain Legacy <allain.legacy@windriver.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-06-12 10:41:25 +01:00