Commit Graph

573 Commits

Author SHA1 Message Date
Harry van Haaren
5936b669b8 i40e: refactor xstats per queue handling
This patch refactors the queue and priority statistic handling.
Generic queue stats are presented by rte_eth_xstats_get(), and the
i40e_xstats_get() exposes only the extra stats.

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Maryam Tahhan <maryam.tahhan@intel.com>
2015-11-12 17:35:43 +01:00
Harry van Haaren
664c51f792 ixgbe: refactor xstats per queue handling
This patch refactors the queue handling. Generic queue stats are
handled by rte_eth_xstats_get() and the ixgbe_xstats_get() exposes
only the extra stats.

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Maryam Tahhan <maryam.tahhan@intel.com>
2015-11-12 17:35:27 +01:00
Helin Zhang
50687c312a i40e: fix VSI allocation for VMDq
It fixes the issue of trying to allocate more VSIs for VMDq than
hardware remaining. It adds a check of the hardware remaining
before allocating VSIs for VMDq.

Fixes: c80707a0fd ("i40e: fix VMDq pool limit")

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
2015-11-12 12:39:08 +01:00
Tomasz Kulasek
6b6a94ee17 bonding: fix build with icc
ICC complains about enumerated types being mixed in link bonding driver,
as ETH_MQ_RX_RSS is an enum type of mq_mode and not a bitmask as it was
being treated.

Fixes: 734ce47f71 ("bonding: support RSS dynamic configuration")

Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2015-11-12 00:22:26 +01:00
Konstantin Ananyev
71f39b07b6 ixgbe: fix Tx hang when RS distance exceeds HW limit
One of the ways to reproduce the issue:

testpmd <EAL-OPTIONS> -- -i --txqflags=0
testpmd> set fwd txonly
testpmd> set txpkts 64,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4
testpmd> set txsplit rand
testpmd> start

After some time TX on ixgbe queue will hang,
and all packet transmission on that queue will stop.

This bug was first reported and investigated by
Vlad Zolotarov <vladz@cloudius-systems.com>:
"We can reproduce this issue when stressed the xmit path with a lot of highly
fragmented TCP frames (packets with up to 33 fragments with non-headers
fragments as small as 4 bytes) with all offload features enabled."

The root cause is that ixgbe_xmit_pkts() in some cases violates the HW rule
that the distance between TDs with RS bit set should not exceed 40 TDs.

>From the latest 82599 spec update:
"When WTHRESH is set to zero, the software device driver should set the RS bit
in the Tx descriptors with the EOP bit set and at least once in the 40
descriptors."

The fix is to make sure that the distance between TDs with RS bit set
would never exceed HW limit.
As part of that fix, tx_rs_thresh for ixgbe PMD is not allowed to be greater
then to 32 to comply with HW restrictions.

With that fix slight slowdown for the full-featured ixgbe TX path
might be observed (from our testing - up to 4%).

ixgbe simple TX path is unaffected by that patch.

Reported-by: Vlad Zolotarov <vladz@cloudius-systems.com>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2015-11-12 00:22:26 +01:00
Harry van Haaren
a4aca79ba4 i40e: fix stats reset
This patch fixes a bug where only some of the statistics were being
reset when calling rte_eth_stats_reset() or rte_eth_xstats_reset().
As both the stats reset and xstats reset do the same, refactor away
the duplicated function.

This patch marks the VSI to update its offset, causing the stats be
look like they are reset.

Fixes: 9aace75fc8 ("i40e: fix statistics")

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Maryam Tahhan <maryam.tahhan@intel.com>
2015-11-11 19:38:47 +01:00
Helin Zhang
3f50f072ff i40e: fix memzone freeing
This fixes the issue of not freeing memzone in a call to free the
memory for adminq DMA.

Fixes: 4861cde461 ("i40e: new poll mode driver")

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2015-11-11 19:38:47 +01:00
Helin Zhang
c80707a0fd i40e: fix VMDq pool limit
It fixes the issue of cannot using more than 1 poor for VMDq,
according to the queues left.

Fixes: 705b57f820 ("i40e: enlarge the number of supported queues")

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
2015-11-11 19:38:11 +01:00
Pablo de Lara
6e4775cc9b i40e: fix build with icc 2015
Fix for the following error on icc 2015, due to incorrect type:
	drivers/net/i40e/i40e_fdir.c(1376): error #188:
	enumerated type mixed with another type
		case RTE_ETH_FDIR_FILTER_INPUT_SET_SELECT:

Fixes: 98f05570 ("i40e: configure input fields for RSS or flow director")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
2015-11-11 19:38:11 +01:00
Helin Zhang
60e2b41df5 i40e: fix build with icc 13
It fixes compile issue on ICC 13.0.0.

Error logs:
i40e_ethdev.c(7943): error #188: enumerated type mixed with another type

Fixes: c8b9a3e3fe ("i40e: support DCB mode")

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2015-11-11 19:38:11 +01:00
Julien Meunier
6a5f84590a igbvf: fix vlan filtering
Once posted through mailbox, we must check for nack from the PF
and report an error in this case.

Signed-off-by: Julien Meunier <julien.meunier@6wind.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2015-11-10 17:14:52 +01:00
Julien Meunier
4d4a76a6c9 enic: fix vlan filtering
Report an error when something went wrong.

Signed-off-by: Julien Meunier <julien.meunier@6wind.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Sujith Sankar <ssujith@cisco.com>
2015-11-10 17:06:53 +01:00
John McNamara
4c28fb7685 ring: fix memory freeing on error
Fix minor memory free issue in error clean-up.

Reported-by Coverity (CID 119258)

Fixes: 651c505af8 ("ring: enhance device setup from rings")

Signed-off-by: John McNamara <john.mcnamara@intel.com>
2015-11-07 00:08:36 +01:00
Raslsn Darawsheh
32b12e7567 bonding: fix freeing with no queue
In case of creating bond device without add any slaves and
quit from testpmd, application crashed since rx/tx queues
are NULL.

Add checking of this parameters before trying to free.

Signed-off-by: Raslsn Darawsheh <rdarawsheh@asaltech.com>
Signed-off-by: Yaacov Hazan <yaacovh@mellanox.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
2015-11-04 23:44:58 +01:00
Andrey Chilikin
23c0e3306b ixgbe: check for supported flow director behaviors
Handle only supported flow director behaviors.

Signed-off-by: Andrey Chilikin <andrey.chilikin@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2015-11-04 22:51:57 +01:00
Andrey Chilikin
13834ea7c0 i40e: add flow director passthru
Add support for RTE_ETH_FDIR_PASSTHRU flow director behavior so
output queue is assigned by other filters.

Signed-off-by: Andrey Chilikin <andrey.chilikin@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2015-11-04 22:51:57 +01:00
Harry van Haaren
256ff05a9c ixgbe: fix Rx errors statistics for UDP checksum
This patch removes l3_l4_xsum_errors from rx errors.

The reason to remove it is that UDP packets have an optional checksum, and
when not calculated the checksum field should be set to zero. When the
checksum is not calculated (zero-ed out), the hardware still counts a valid
UDP packet as an l3_l4_xsum_error.

This hardware issue is documented in 82599 errata, titled:
"Integrity Error Reported for IPv4/UDP Packets with Zero Checksum"

The solution is to remove l3_l4_xsum_errors from rx_errors, as discussed on
http://thread.gmane.org/gmane.comp.networking.dpdk.devel/25590/

Fixes: f6bf669b99 ("ixgbe: account more Rx errors")

Suggested-by: Martin Weiser <martin.weiser@allegro-packets.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
2015-11-04 17:55:27 +01:00
Pablo de Lara
6b6861c171 ethdev: check queue state before starting or stopping
Following the same approach taken with dev_started field
in rte_eth_dev_data structure, this patch adds two new fields
in it, rx_queue_state and tx_queue_state arrays, which track
which queues have been started and which not.

This is important to avoid trying to start/stop twice a queue,
which will result in undefined behaviour
(which may cause RX/TX disruption).

Mind that only the PMDs which have queue_start/stop functions
have been changed to update this field, as the functions will
check the queue state before switching it.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2015-11-04 17:52:14 +01:00
Jingjing Wu
14c400c2ea i40e: fix interrupt disabling when stopping
When stop device, should disable interrupt of FDIR but not
enable it. This patch corrected it.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
2015-11-04 16:28:26 +01:00
Cunming Liang
4b90a3ff26 i40evf: support Rx interrupt
The patch enables rx interrupt support on i40e VF and some necessary
change on PF IOV mode to support VF.
On PF side, running in IOV mode via uio won't allow rx interrupt
which is exclusive with mbox interrupt in single vector competition.
On VF side, one single vector is shared for all the rx queues.

Signed-off-by: Cunming Liang <cunming.liang@intel.com>
2015-11-04 15:27:42 +01:00
Cunming Liang
be6c228d4d i40e: support Rx interrupt
The patch enables rx interrupt support on i40e PF non-IOV mode.
Per queue rx interrupt works on vfio, however on uio, all rx queues
share one interrupt vector.

Signed-off-by: Cunming Liang <cunming.liang@intel.com>
2015-11-04 15:27:42 +01:00
Cunming Liang
28a928a871 ixgbevf: cleanup unnecessary interrupt handler
As ixgbe vf doesn't support lsc, the patch removes those unused code.
In addition, it does some tiny cleanup.

Signed-off-by: Cunming Liang <cunming.liang@intel.com>
2015-11-04 15:27:42 +01:00
Cunming Liang
85c1089d78 ixgbe: remove useless interrupt freeing when closing
The intr_vec is free in dev_stop. It's not necessary to check in dev_close.

Signed-off-by: Cunming Liang <cunming.liang@intel.com>
2015-11-04 15:27:42 +01:00
Cunming Liang
7ab8500037 ixgbe: fix VF start with PF stopped
When ixgbe runs as a PF, mbox interrupt is prerequisite to make VF
start normally.
And PF sometimes won't 'dev_start', so the mbox interrupt register
during 'dev_init' is required.
The patch rolls back the interrupt register for mbox,lsc to the 'dev_init'.
As UIO doesn't support multiple vector, mbox has to occupy the only one.
It adds condition check on 'dev_start', rxq interrupt is not allowed
when PF running in IOV mode via UIO.

Signed-off-by: Cunming Liang <cunming.liang@intel.com>
2015-11-04 15:27:42 +01:00
Cunming Liang
fe685de2b1 igb: fix VF start with PF stopped
When igb runs as a PF, mbox interrupt is prerequisite to make VF
start normally.
And PF sometimes won't 'dev_start', so the mbox interrupt register
during 'dev_init' is required.
The patch rolls back the interrupt register for mbox,lsc to the 'dev_init'.
As UIO doesn't support multiple vector, mbox has to occupy the only one.
It adds condition check on 'dev_start', rxq interrupt is not allowed
when PF running in IOV mode via UIO.

Signed-off-by: Cunming Liang <cunming.liang@intel.com>
2015-11-04 15:27:41 +01:00
Cunming Liang
3e692cd3f8 ixgbe: avoid enabling interrupt with zero vector
Signed-off-by: Cunming Liang <cunming.liang@intel.com>
2015-11-04 15:27:41 +01:00
Cunming Liang
5ede7566c3 igb: avoid enabling interrupt with zero vector
Signed-off-by: Cunming Liang <cunming.liang@intel.com>
2015-11-04 15:27:41 +01:00
Cunming Liang
fe81efaf1d ixgbe: reserve VFIO vector zero for misc interrupt
According to the VFIO interrupt mapping, the interrupt vector id
for rxq starts from RX_VEC_START.
It doesn't impact the UIO cases.

Signed-off-by: Cunming Liang <cunming.liang@intel.com>
2015-11-04 15:27:41 +01:00
Cunming Liang
1c07ecb413 igb: reserve VFIO vector zero for misc interrupt
According to the VFIO interrupt mapping, the interrupt vector id
for rxq starts from RX_VEC_START.
It doesn't impact the UIO cases.

Signed-off-by: Cunming Liang <cunming.liang@intel.com>
2015-11-04 15:27:41 +01:00
Jingjing Wu
88ebc2b7f9 i40e: extend flow director to support VF
This patch extends flow director to filtering in VFs.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
2015-11-04 13:40:57 +01:00
Xutao Sun
9aace75fc8 i40e: fix statistics
The old statistics on i40e only counted the packets on ports.
So the discarding packets on VSI were not counted.
This patch is to make statistics for packets both on ports and VSI.
Also update release notes.

Signed-off-by: Xutao Sun <xutao.sun@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2015-11-04 13:11:56 +01:00
Thomas Monjalon
e6e6440d33 doc: fix doxygen syntax of some comments
Some comments have a wrong space between /** and <.
Seen with
	git grep '\*\* <'

Reported-by: David Marchand <david.marchand@6wind.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-11-04 11:56:37 +01:00
Helin Zhang
da0ab5da69 i40e: select GRE key length for filtering
By default, only first 3 bytes of GRE key will be used for hash or
FD calculation. With these changes, it can select 3 or 4 bytes of
GRE key for hash or FD calculation.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Signed-off-by: Andrey Chilikin <andrey.chilikin@intel.com>
2015-11-04 00:37:27 +01:00
Helin Zhang
98f0557076 i40e: configure input fields for RSS or flow director
The default input set of fields of a received packet are loaded from
firmware, which cannot be modified even users want to use different
fields for RSS or flow director. Here adds more flexibilities of
selecting packet fields for hash calculation or flow director for
users.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Signed-off-by: Andrey Chilikin <andrey.chilikin@intel.com>
2015-11-04 00:20:02 +01:00
Helin Zhang
705b57f820 i40e: enlarge the number of supported queues
It enlarges the number of supported queues to hardware allowed
maximum. There was a software limitation of 64 per physical port
which is not reasonable.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
2015-11-03 23:05:26 +01:00
Helin Zhang
50641113d0 i40e: adjust the number of queues for RSS
It adjusts the number of queues for RSS from power of 2 to any as
long as it does not exceeds the hardware allowed.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
2015-11-03 22:58:45 +01:00
Adrien Mazarguil
612ad38209 mlx5: fix hash Rx queue type in RSS mode
Only seen since IPv6 RSS support was added, confusion about the purpose of
the hash_rxq_type_from_n() function has caused it to return invalid hash RX
queue types.

Refactor function for its intended purpose, rename it
hash_rxq_type_from_pos() and update comment with a better description.

Fixes: a76133214d ("mlx5: use separate indirection table for default hash Rx queue")

Reported-by: Olga Shern <olgas@mellanox.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2015-11-03 22:57:32 +01:00
Adrien Mazarguil
13d57bd5cd mlx5: fix build with debugging enabled
The following error occurs when CONFIG_RTE_LIBRTE_MLX5_DEBUG=y:

 drivers/net/mlx5/mlx5.c:381:4: error: ISO C forbids braced-groups within expressions

RTE_MIN() uses the non-standard ({ ... }) syntax to declare variables within
parentheses, which is rejected by -pedantic.

Since the RSS_INDIRECTION_TABLE_SIZE check is meant to go away as soon as
DPDK supports larger/variable indirection tables, put it in a separate
condition.

Fixes: 634efbc2c8 ("mlx5: support RETA query and update")

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2015-11-03 22:57:21 +01:00
Bernard Iremonger
bcf1c37b9c vmxnet3: support port hotplug
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Yong Wang <yongwang@vmware.com>
2015-11-03 19:26:31 +01:00
Bernard Iremonger
71ba84b1cc bonding: remove fake pci interface
remove pci_dev, pci_drv, rte_bond_pmd and pci_id_table.
handle numa_node for vdevs
handle RTE_ETH_DEV_INTR_LSC for vdevs
rename the function valid_bonded_device to check_for_bonded_device
remove branches on pci_dev

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
2015-11-03 18:48:24 +01:00
Bernard Iremonger
ce1ad1621c mpipe: remove fake pci interface
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2015-11-03 18:48:12 +01:00
Bernard Iremonger
cc38bb0460 xenvirt: remove fake pci interface
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2015-11-03 18:48:00 +01:00
Bernard Iremonger
10e600cb88 af_packet: remove fake pci interface
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: John W. Linville <linville@tuxdriver.com>
2015-11-03 18:47:51 +01:00
Bernard Iremonger
1328f33e2b pcap: remove fake pci interface
remove rte_pcap_pmd and pci_dev.

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2015-11-03 18:47:42 +01:00
Bernard Iremonger
5865823407 ring: remove fake pci interface
remove rte_ring_pmd and pci_dev.

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2015-11-03 18:47:30 +01:00
Bernard Iremonger
6799cfe407 null: remove fake pci interface
remove rte_null_pmd and pci_dev.

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2015-11-03 18:46:52 +01:00
Bernard Iremonger
8fb9e2bbf9 drivers: copy fake PCI device info to ethdev data
Initialise dev_flags, driver, kdrv, drv_name and numa_node fields
in eth_dev data.

for the following vdevs:
null
ring
pcap
af_packet
xenvirt
mpipe
bonding

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2015-11-03 18:39:42 +01:00
Bernard Iremonger
eeefe73f0a drivers: copy PCI device info to ethdev data
Use new function rte_eth_copy_pci_info.
Copy device info for the following pdevs:

bnx2x
cxgbe
e1000
enic
fm10k
i40e
ixgbe
mlx4
mlx5
virtio
vmxnet3

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2015-11-03 18:39:26 +01:00
Ivan Boule
b5b0467ca8 virtio: fix size of MAC address array
Make the virtio PMD allocate the array of unicast MAC addresses with
the maximum of entries (VIRTIO_MAX_MAC_ADDRS) that it exports.

Signed-off-by: Ivan Boule <ivan.boule@6wind.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
2015-11-03 11:40:58 +01:00
Didier Pallard
6b39b947a9 ixgbe: remove useless fields in checksum offload
According to Table 7-38: Valid Fields by Offload Option
of Intel ® 82599 10 GbE Controller Datasheet,
L4LEN field is not needed for L4 XSUM computation by the hardware.
So remove l4_len from tx_offload_mask in ixgbe_set_xmit_ctx
function used to build the context transmitted to the hardware.

Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2015-11-03 11:40:36 +01:00