Cunming Liang [Wed, 4 Nov 2015 08:45:37 +0000 (16:45 +0800)]
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>
Cunming Liang [Wed, 4 Nov 2015 08:45:36 +0000 (16:45 +0800)]
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>
Cunming Liang [Wed, 4 Nov 2015 08:45:35 +0000 (16:45 +0800)]
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>
Cunming Liang [Wed, 4 Nov 2015 08:45:38 +0000 (16:45 +0800)]
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>
Cunming Liang [Wed, 4 Nov 2015 08:45:34 +0000 (16:45 +0800)]
eal: query multi-vector interrupt capability
VFIO allows multiple MSI-X vector, others doesn't, but maybe will
allow it in the future.
Device drivers need to be aware of the capability.
It's better to avoid condition check on interrupt type (VFIO) everywhere,
instead a capability api is more flexible for the condition change.
Signed-off-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: David Marchand <david.marchand@6wind.com>
Cunming Liang [Wed, 4 Nov 2015 08:45:32 +0000 (16:45 +0800)]
ixgbe: avoid enabling interrupt with zero vector
Signed-off-by: Cunming Liang <cunming.liang@intel.com>
Cunming Liang [Wed, 4 Nov 2015 08:45:33 +0000 (16:45 +0800)]
igb: avoid enabling interrupt with zero vector
Signed-off-by: Cunming Liang <cunming.liang@intel.com>
Cunming Liang [Wed, 4 Nov 2015 08:45:31 +0000 (16:45 +0800)]
eal/linux: forbid enabling zero interrupt vector
The patch adds condition check to avoid enable nothing.
In disable state, both max_intr and nb_efd are zero.
Signed-off-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: David Marchand <david.marchand@6wind.com>
Cunming Liang [Wed, 4 Nov 2015 08:45:29 +0000 (16:45 +0800)]
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>
Cunming Liang [Wed, 4 Nov 2015 08:45:30 +0000 (16:45 +0800)]
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>
Cunming Liang [Wed, 4 Nov 2015 08:45:28 +0000 (16:45 +0800)]
eal: reserve VFIO vector zero for misc interrupt
During VFIO_DEVICE_SET_IRQS, the previous order is
{Q0_fd, ... Qn_fd, misc_fd}.
The vector number of misc is indeterminable which is
ugly to some NIC (e.g. i40e, fm10k).
The patch adjusts the order in {misc_fd, Q0_fd, ... Qn_fd},
always reserve the first vector to misc interrupt.
Signed-off-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: David Marchand <david.marchand@6wind.com>
Jingjing Wu [Wed, 4 Nov 2015 03:29:11 +0000 (11:29 +0800)]
app/testpmd: extend commands for flow director in VF
This patch extends commands to support filtering in VFs of flow director.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Jingjing Wu [Wed, 4 Nov 2015 03:29:10 +0000 (11:29 +0800)]
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>
Jingjing Wu [Wed, 4 Nov 2015 03:29:09 +0000 (11:29 +0800)]
ethdev: extend flow director to support VF
This patch extends struct rte_eth_fdir_flow_ext to support flow
director in VFs.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Xutao Sun [Wed, 4 Nov 2015 09:20:48 +0000 (17:20 +0800)]
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>
Thomas Monjalon [Wed, 4 Nov 2015 10:50:36 +0000 (11:50 +0100)]
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>
Pablo de Lara [Mon, 12 Oct 2015 12:52:58 +0000 (13:52 +0100)]
kni: fix igb build with kernel 4.2
Kernel 4.2 has introduced two new parameters in ndo_bridge_getlink,
which breaks DPDK compilation.
Linux:
7d4f8d87 ("switchdev: ad VLAN support for ports bridge-getlink")
This patch adds the necessary checks to fix it.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Pablo de Lara [Mon, 12 Oct 2015 12:52:57 +0000 (13:52 +0100)]
kni: rename macro for igb nlflags
Rename HAVE_NDO_BRIDGE_GETLINK_FILTER_MASK macro for
a more meaningful HAVE_NDO_BRIDGE_GETLINK_NLFLAGS,
as the macro is used to know if igb_ndo_bridge_getlink
function has nlflags parameter.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Dex Chen [Tue, 27 Oct 2015 02:56:37 +0000 (10:56 +0800)]
kni: allow per-net instances
There is a global variable 'device_in_use' which is used to make sure
only one instance is using /dev/kni device. If you were using LXC, you
will find there is only one instance of KNI example could be run even
different namespaces were created.
In order to have /dev/kni used simultaneously in different namespaces,
making all of global variables as per network namespace variables.
With regard to single kernel thread mode, there will be one kernel
thread for each of network namespace.
Signed-off-by: Dex Chen <dex.chen@ruckuswireless.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Shesha Sreenivasamurthy [Wed, 28 Oct 2015 22:04:25 +0000 (15:04 -0700)]
eal: add option to delete hugepage backing files
When an application using huge-pages crash or exists, the hugetlbfs
backing files are not cleaned up. This is a patch to clean those files.
There are multi-process DPDK applications that may be benefited by those
backing files. Therefore, I have made that configurable so that the
application that does not need those backing files can remove them, thus
not changing the current default behavior. The application itself can
clean it up, however the rationale behind DPDK cleaning it up is, DPDK
created it and therefore, it is better it unlinks it.
Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Na Na [Tue, 3 Nov 2015 02:17:41 +0000 (10:17 +0800)]
lpm: fix incorrect reuse of already allocated tbl8
Fixes an initialization issue of 'valid_group' in the delete_depth_small().
When adding an entry to a tbl8, the .valid_group field should always be set,
so that future adds do not accidently find and use this table, thinking it is
currently invalid, i.e. unused, and thereby overwrite existing entries.
Signed-off-by: Na Na <nana.nn@alibaba-inc.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Na Na [Tue, 3 Nov 2015 02:17:40 +0000 (10:17 +0800)]
lpm: fix condition check in delete
Fixes an issue of check logic in delete_depth_small function.
For a tbl24 entry, the 'ext_entry' field indicates whether we need
to use tbl8_gindex to read the next_hop from a tbl8 entry, or whether
it can be read directly from this entry.
If a route is deleted, the prefix of previous route is used to override
the deleted route.
When checking the depth of the previous route the conditional checks
both the ext_entry and the depth, but the "else" leg fails to take
account that the condition could fail for one of two possible reasons,
leading to an incorrect flow when 'ext_entry == 0' is true,
but 'lpm->tbl24[i].depth > depth' is false.
The fix here is to add a condition check to the else leg so that it
only executes when ext_entry is set.
Signed-off-by: Na Na <nana.nn@alibaba-inc.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Pablo de Lara [Thu, 17 Sep 2015 10:30:48 +0000 (11:30 +0100)]
hash: fix incorrect lookup if key is all zero
If user has not added an all zero key in the hash table,
and tries to look it up, it results in an incorrect hit,
as dummy slot in the key table has all zero as well.
Fixes:
48a399119619 ("hash: replace with cuckoo hash implementation")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Pablo de Lara [Fri, 30 Oct 2015 14:37:28 +0000 (14:37 +0000)]
hash: fix scaling by reducing contention
If using multiple cores on a system with hardware transactional
memory support, thread scaling does not work, as there was a single
point in the hash library which is a bottleneck for all threads,
which is the "free_slots" ring, which stores all the indices of
the free slots in the table.
This patch fixes the problem, by creating a local cache per logical core,
which stores locally indices of free slots,
so most times, writer threads will not interfere each other.
Fixes:
48a399119619 ("hash: replace with cuckoo hash implementation")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Pablo de Lara [Fri, 2 Oct 2015 16:07:13 +0000 (17:07 +0100)]
hash: free internal ring when freeing hash
Since freeing a ring is now possible, then when freeing
a hash table, its internal ring can be freed as well.
Therefore when a new table, with the same name as a previously
freed table, is created, there is no need to look up
the already allocated ring.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Pablo de Lara [Fri, 2 Oct 2015 15:53:44 +0000 (16:53 +0100)]
ring: support freeing
When creating a ring, a memzone is created to allocate it in memory,
but the ring could not be freed, as memzones could not be.
Since memzones can be freed now, then rings can be as well,
taking into account if they were initialized using pre-allocated memory
(in which case, memory should be freed externally) or using rte_memzone_reserve
(with rte_ring_create), freeing the memory with rte_memzone_free.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Helin Zhang [Tue, 3 Nov 2015 16:28:36 +0000 (00:28 +0800)]
app/testpmd: add command to select filtering GRE key size
Test commands are added to support selecting different length of GRE key.
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Signed-off-by: Andrey Chilikin <andrey.chilikin@intel.com>
Helin Zhang [Tue, 3 Nov 2015 16:28:35 +0000 (00:28 +0800)]
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>
Helin Zhang [Tue, 3 Nov 2015 16:07:55 +0000 (00:07 +0800)]
app/testpmd: add commands for input fields of RSS and flow director
Test commands are added to support selecting input set, or adding
new input set per different pctype.
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Signed-off-by: Andrey Chilikin <andrey.chilikin@intel.com>
Helin Zhang [Tue, 3 Nov 2015 16:07:54 +0000 (00:07 +0800)]
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>
Helin Zhang [Tue, 3 Nov 2015 15:40:28 +0000 (23:40 +0800)]
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>
Helin Zhang [Tue, 3 Nov 2015 15:40:27 +0000 (23:40 +0800)]
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>
Adrien Mazarguil [Tue, 3 Nov 2015 17:15:14 +0000 (18:15 +0100)]
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:
a76133214d88 ("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>
Adrien Mazarguil [Tue, 3 Nov 2015 17:15:13 +0000 (18:15 +0100)]
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:
634efbc2c8c0 ("mlx5: support RETA query and update")
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Bernard Iremonger [Tue, 27 Oct 2015 17:12:26 +0000 (17:12 +0000)]
vmxnet3: support port hotplug
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Yong Wang <yongwang@vmware.com>
Bernard Iremonger [Tue, 3 Nov 2015 13:02:05 +0000 (13:02 +0000)]
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>
Bernard Iremonger [Tue, 3 Nov 2015 13:02:04 +0000 (13:02 +0000)]
mpipe: remove fake pci interface
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Bernard Iremonger [Tue, 3 Nov 2015 13:02:03 +0000 (13:02 +0000)]
xenvirt: remove fake pci interface
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Bernard Iremonger [Tue, 3 Nov 2015 13:02:02 +0000 (13:02 +0000)]
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>
Bernard Iremonger [Tue, 3 Nov 2015 13:02:01 +0000 (13:02 +0000)]
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>
Bernard Iremonger [Tue, 3 Nov 2015 13:02:00 +0000 (13:02 +0000)]
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>
Bernard Iremonger [Tue, 3 Nov 2015 13:01:59 +0000 (13:01 +0000)]
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>
Bernard Iremonger [Tue, 3 Nov 2015 13:01:58 +0000 (13:01 +0000)]
ethdev: remove some PCI specific handling
use dev_type to distinguish between vdev's and pdev's.
remove pci_dev branches.
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Bernard Iremonger [Tue, 3 Nov 2015 13:01:57 +0000 (13:01 +0000)]
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>
Bernard Iremonger [Tue, 3 Nov 2015 13:01:56 +0000 (13:01 +0000)]
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>
Bernard Iremonger [Tue, 3 Nov 2015 13:01:55 +0000 (13:01 +0000)]
ethdev: add device fields from PCI layer
The driver fields have been added the rte_eth_dev_data so that it is no
longer necessary access this data through the pci_dev pointer.
The following fields have been added to rte_eth_dev_data:
dev_flags, and macros for dev_flags.
kdrv
numa_node
drv_name
Add function rte_eth_copy_pci_info
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
[Thomas: remove useless flags]
Ravi Kerur [Wed, 29 Jul 2015 00:51:44 +0000 (17:51 -0700)]
eal: set name to threads
This patch adds support for pthread_setname_np on Linux and
pthread_set_name_np on FreeBSD.
Signed-off-by: Ravi Kerur <rkerur@gmail.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
[Thomas: add name in tep_termination example]
Ravi Kerur [Wed, 23 Sep 2015 21:16:17 +0000 (14:16 -0700)]
ethdev: clean port id retrieval when attaching
Removed following functions
> rte_eth_dev_save and
> rte_eth_dev_get_changed_port
Added 2 new functions
> rte_eth_dev_get_port_by_name
> rte_eth_dev_get_port_by_addr
Compiled on Linux for following targets
> x86_64-native-linuxapp-gcc
> x86_64-native-linuxapp-clang
> x86_x32-native-linuxapp-gcc
Compiled on FreeBSD for following targets
> x86_64-native-bsdapp-clang
> x86_64-native-bsdapp-gcc
Tested on Linux/FreeBSD:
> port attach eth_null
> port start all
> port stop all
> port close all
> port detach 0
> port attach eth_null
> port start all
> port stop all
> port close all
> port detach 0
Successful run of checkpatch.pl on the diffs
Successful validate_abi on Linux for following targets
> x86_64-native-linuxapp-gcc
> x86_64-native-linuxapp-clang
Signed-off-by: Ravi Kerur <rkerur@gmail.com>
Acked-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Marcel Apfelbaum [Tue, 3 Nov 2015 11:28:41 +0000 (13:28 +0200)]
vhost: fix build with old kernels
Commit
15e9ee6982a4822ce395fd597dd500a61ceafa7c
uses the VIRTIO_F_VERSION_1 macro existing only in newer kernels.
Fixed it by manually defining it for older kernels.
Fixes:
15e9ee6982a4 ("vhost: enable virtio 1.0")
Reported-by: Qian Xu <qian.q.xu@intel.com>
Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
Ivan Boule [Thu, 29 Oct 2015 08:46:15 +0000 (09:46 +0100)]
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>
Didier Pallard [Thu, 29 Oct 2015 08:47:53 +0000 (09:47 +0100)]
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>
Nelio Laranjeiro [Mon, 2 Nov 2015 18:11:57 +0000 (19:11 +0100)]
mlx5: support RETA query and update
ConnectX-4 adapters do not have a constant indirection table size, which is
set at runtime from the number of RX queues. The maximum size is retrieved
using a hardware query and is normally 512.
Since the current RETA API cannot handle a variable size, any query/update
command causes it to be silently updated to RSS_INDIRECTION_TABLE_SIZE
entries regardless of the original size.
Also due to the underlying type of the configuration structure, the maximum
size is limited to RSS_INDIRECTION_TABLE_SIZE (currently 128, at most 256
entries).
A port stop/start must be done to apply the new RETA configuration.
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Helin Zhang [Tue, 13 Oct 2015 07:19:50 +0000 (15:19 +0800)]
i40evf: support AQ based RSS config
It supports both Admin queue based and directly writing registers
based RSS hash key and lookup table configuration, as X722 supports
AQ based configuration.
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Helin Zhang [Tue, 13 Oct 2015 07:19:49 +0000 (15:19 +0800)]
i40e: support AQ based RSS config
It supports both Admin queue based and directly writing registers
based RSS hash key and lookup table configuration, as X722 supports
AQ based configuration.
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Helin Zhang [Tue, 13 Oct 2015 07:19:48 +0000 (15:19 +0800)]
i40e: support X722 and its A0 hardware
In order to provide users early access of X722 and its A0 hardware,
new device IDs are added, and also compilation with those support
in base driver is enabled.
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Bruce Richardson [Wed, 30 Sep 2015 12:12:22 +0000 (13:12 +0100)]
app/test: add performance test for ring driver
Add a performance test for ring pmd, comparing performance of the pmd
compared to the basic rte_ring APIs.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Bruce Richardson [Wed, 30 Sep 2015 12:12:21 +0000 (13:12 +0100)]
ring: create device from a ring
Add a one-parameter function to take an existing rte_ring and wrap it as
an ethdev, returning the port id of the new ethdev instance.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Bruce Richardson [Wed, 30 Sep 2015 12:12:20 +0000 (13:12 +0100)]
ring: store memzone pointer
Add a new field to the rte_ring structure to store the memzone pointer which
contains the ring. For rings created using rte_ring_create(), the field will
be set automatically.
This new field will allow users of the ring to query the numa node a ring is
allocated on, or to get the physical address of the ring, if so needed.
The rte_ring structure will also maintain ABI compatibility, as the
structure members, after the new one, are set to be cache line aligned,
so leaving a space.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Bruce Richardson [Wed, 30 Sep 2015 12:12:19 +0000 (13:12 +0100)]
ring: enhance device setup from rings
The ring ethdev creation function creates an ethdev, but does not
actually set it up for use. Even if it's just a single ring, the user
still needs to create a mempool, call rte_eth_dev_configure, then call
rx and tx setup functions before the ethdev can be used.
This patch changes things so that the ethdev is fully set up after the
call to create the ethdev. The above-mentionned functions can still be
called - as will be the case, for instance, if the NIC is created via
commandline parameters - but they no longer are essential.
The function now also sets rte_errno appropriately on error, so the
caller can get a better indication of why a call may have failed.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Maryam Tahhan [Tue, 20 Oct 2015 10:34:18 +0000 (11:34 +0100)]
ethdev: do not deprecate imissed counter
Remove the deprecation tag and notice for imissed as it is a generic
register that accounts for packets that were dropped by the HW,
because there are no available mbufs (RX queues are full). imissed is
different to ierrors and can help with general debug.
Fixes:
49f386542af4 ("ethdev: remove driver specific stats")
Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
Harry van Haaren [Mon, 2 Nov 2015 10:56:09 +0000 (10:56 +0000)]
ixgbe: remove mac fault counts from Rx errors
This patch removes the mac local fault count and
mac remote fault count from rx errors. The mac
fault count registers count faults, not packets,
and hence should not be added to packet counters.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Harry van Haaren [Mon, 2 Nov 2015 10:19:00 +0000 (10:19 +0000)]
virtio: add extended stats
Add xstats() functions and statistic strings to virtio PMD.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Maryam Tahhan <maryam.tahhan@intel.com>
Harry van Haaren [Mon, 2 Nov 2015 10:19:07 +0000 (10:19 +0000)]
fm10k: add extended stats
Add xstats() functions and statistic strings.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Maryam Tahhan <maryam.tahhan@intel.com>
Harry van Haaren [Mon, 2 Nov 2015 10:19:06 +0000 (10:19 +0000)]
i40evf: add extended stats
Add implementation of xstats() functions in i40evf PMD.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Maryam Tahhan <maryam.tahhan@intel.com>
Harry van Haaren [Mon, 2 Nov 2015 10:19:05 +0000 (10:19 +0000)]
i40e: add extended stats
Add xstats functions to i40e PMD, allowing extended statistics
to be retrieved from the NIC and exposed to the DPDK.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Maryam Tahhan <maryam.tahhan@intel.com>
Harry van Haaren [Mon, 2 Nov 2015 10:19:04 +0000 (10:19 +0000)]
ixgbevf: add extending stats
Add xstats() functions and stat strings as necessary to ixgbevf PMD.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Maryam Tahhan <maryam.tahhan@intel.com>
Harry van Haaren [Mon, 2 Nov 2015 10:19:03 +0000 (10:19 +0000)]
ixgbe: add extended statistic strings
Added and updated statistic strings as used by xstats_get(),
exposed extended queue statistics.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Maryam Tahhan <maryam.tahhan@intel.com>
Harry van Haaren [Mon, 2 Nov 2015 10:19:02 +0000 (10:19 +0000)]
igbvf: add extended stats
Add xstats functionality to igbvf PMD, adding
necessary statistic strings.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Maryam Tahhan <maryam.tahhan@intel.com>
Harry van Haaren [Mon, 2 Nov 2015 10:19:01 +0000 (10:19 +0000)]
igb: add extended stats
Add xstats_get() and xstats_reset() functions to igb
driver, and the necessary strings to expose these
NIC statistics.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Maryam Tahhan <maryam.tahhan@intel.com>
Harry van Haaren [Mon, 2 Nov 2015 10:18:59 +0000 (10:18 +0000)]
ethdev: update extending stats strings
Update the strings used for presenting stats to adhere
to the scheme previously presented. Updated xstats_get()
function to handle Q information only if xstats() is not
implemented in the PMD, providing the PMD with the needed
flexibility to expose its extended Q stats.
Add extended statistic section to the programmers
guide, poll mode driver section. This section describes
how the strings stats are formatted, and how the client
code can use this to gather information about the stat.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Maryam Tahhan <maryam.tahhan@intel.com>
Marcel Apfelbaum [Thu, 15 Oct 2015 11:08:39 +0000 (14:08 +0300)]
vhost: enable virtio 1.0
Make vhost-user virtio 1.0 compatible by adding it to the
supported features and keeping the header length
the same as for mergeable RX buffers.
Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Huawei Xie [Thu, 29 Oct 2015 14:53:28 +0000 (22:53 +0800)]
virtio: pick simple Rx/Tx
simple rx/tx func is chose when merge-able rx is disabled and user
specifies single segment and no offload support.
Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Jianfeng Tan <jianfeng.tan@intel.com>
Huawei Xie [Thu, 29 Oct 2015 14:53:27 +0000 (22:53 +0800)]
virtio: add simple Tx
Bulk free of mbufs when clean used ring.
Shift operation of idx could be saved if vq_free_cnt means
free slots rather than free descriptors.
TODO: rearrange vq data structure, pack the stats var together so that
we could use one vec instruction to update all of them.
Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Jianfeng Tan <jianfeng.tan@intel.com>
Huawei Xie [Thu, 29 Oct 2015 14:53:26 +0000 (22:53 +0800)]
virtio: add vector Rx
With fixed avail ring, we don't need to get desc idx from avail ring.
virtio driver only has to deal with desc ring.
This patch uses vector instruction to accelerate processing desc ring.
Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Jianfeng Tan <jianfeng.tan@intel.com>
Huawei Xie [Thu, 29 Oct 2015 14:53:22 +0000 (22:53 +0800)]
virtio: fill Rx avail ring with blank mbufs
Add software RX ring in virtqueue.
Add fake_mbuf in virtqueue for wraparound processing.
Fill avail ring with blank mbufs in virtio_dev_vring_start
Add virtio_rxtx.h header file for RTE_VIRTIO_PMD_MAX_BURST.
Would move all rx/tx related declarations into this header file in future.
Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Jianfeng Tan <jianfeng.tan@intel.com>
Huawei Xie [Thu, 29 Oct 2015 14:53:24 +0000 (22:53 +0800)]
virtio: optimize ring layout
In DPDK based switching environment, mostly vhost runs on a dedicated core
while virtio processing in guest VMs runs on different cores.
Take RX for example, with generic implementation, for each guest buffer,
a) virtio driver allocates a descriptor from free descriptor list
b) modify the entry of avail ring to point to allocated descriptor
c) after packet is received, free the descriptor
When vhost fetches the avail ring, it need to fetch the modified L1 cache from
virtio core, which is a heavy cost in current CPU implementation.
This idea of this optimization is:
allocate the fixed descriptor for each entry of avail ring, so avail ring will
always be the same during the run.
This removes L1M cache transfer from virtio core to vhost core for avail ring.
(Note we couldn't avoid the cache transfer for descriptors).
Besides, descriptor allocation and free operation is eliminated.
This also makes vector procesing possible to further accelerate the processing.
This is the layout for the avail ring(take 256 ring entries for example), with
each entry pointing to the descriptor with the same index.
avail
idx
+
|
+----+----+---+-------------+------+
| 0 | 1 | 2 | ... | 254 | 255 | avail ring
+-+--+-+--+-+-+---------+---+--+---+
| | | | | |
| | | | | |
v v v | v v
+-+--+-+--+-+-+---------+---+--+---+
| 0 | 1 | 2 | ... | 254 | 255 | desc ring
+----+----+---+-------------+------+
|
|
+----+----+---+-------------+------+
| 0 | 1 | 2 | | 254 | 255 | used ring
+----+----+---+-------------+------+
|
+
This is the ring layout for TX.
As we need one virtio header for each xmit packet, we have 128 slots available.
++
||
||
+-----+-----+-----+--------------+------+------+------+
| 0 | 1 | ... | 127 || 128 | 129 | ... | 255 | avail ring
+--+--+--+--+-----+---+------+---+--+---+------+--+---+
| | | || | | |
v v v || v v v
+--+--+--+--+-----+---+------+---+--+---+------+--+---+
| 128 | 129 | ... | 255 || 128 | 129 | ... | 255 | desc ring for virtio_net_hdr
+--+--+--+--+-----+---+------+---+--+---+------+--+---+
| | | || | | |
v v v || v v v
+--+--+--+--+-----+---+------+---+--+---+------+--+---+
| 0 | 1 | ... | 127 || 0 | 1 | ... | 127 | desc ring for tx dat
+-----+-----+-----+--------------+------+------+------+
||
||
++
Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Jianfeng Tan <jianfeng.tan@intel.com>
Chen Jing D(Mark) [Fri, 30 Oct 2015 08:03:06 +0000 (16:03 +0800)]
fm10k: fix crash in vector Rx
Vector RX function will process 4 packets at a time. When the RX
ring wrapps to the tail and the left descriptor size is not multiple
of 4, SW will overwrite memory that not belongs to it and cause crash.
The fix will allocate additional 4 HW/SW spaces at the tail to avoid
overwrite.
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
Chen Jing D(Mark) [Fri, 30 Oct 2015 08:03:05 +0000 (16:03 +0800)]
fm10k: select best Tx function
Add func fm10k_set_tx_function to decide the best TX func in
fm10k_dev_tx_init.
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
Chen Jing D(Mark) [Fri, 30 Oct 2015 08:03:03 +0000 (16:03 +0800)]
fm10k: reset and release mbuf for vector Tx
Vector TX use different way to manage TX queue, it's necessary
to use different functions to reset TX queue and release mbuf
in TX queue. So, introduce 2 function pointers to do such ops.
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
Chen Jing D(Mark) [Fri, 30 Oct 2015 08:03:02 +0000 (16:03 +0800)]
fm10k: add vector Tx
Add Vector TX func fm10k_xmit_pkts_vec to transmit packets.
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
Chen Jing D(Mark) [Fri, 30 Oct 2015 08:03:01 +0000 (16:03 +0800)]
fm10k: release mbuf for vector Rx
Since Vector RX use different variables to trace RX HW ring, it
leads to need different func to release mbuf properly.
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
Chen Jing D(Mark) [Fri, 30 Oct 2015 08:03:00 +0000 (16:03 +0800)]
fm10k: select best Rx function
Add func fm10k_set_rx_function to decide best RX func in
fm10k_dev_rx_init
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
Chen Jing D(Mark) [Fri, 30 Oct 2015 08:02:59 +0000 (16:02 +0800)]
fm10k: add vector scatter Rx
Add func fm10k_recv_scattered_pkts_vec to receive chained packets
with SSE instructions.
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
Chen Jing D(Mark) [Fri, 30 Oct 2015 08:02:58 +0000 (16:02 +0800)]
fm10k: add vector Rx condition check
Add func fm10k_rx_vec_condition_check to check if Vector RX
func can be applied.
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
Chen Jing D(Mark) [Fri, 30 Oct 2015 08:02:57 +0000 (16:02 +0800)]
fm10k: add vector Rx
This patch add below functions:
1. Add function fm10k_rxq_rearm to re-allocate mbuf for used desc
in RX HW ring.
2. Add 2 functions, in which using SSE instructions to parse RX desc
to get pkt_type and ol_flags in mbuf.
3. Add func fm10k_recv_raw_pkts_vec to parse raw packets, in which
includes possible chained packets.
4. Add func fm10k_recv_pkts_vec to receive single mbuf packet.
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
Chen Jing D(Mark) [Fri, 30 Oct 2015 08:02:56 +0000 (16:02 +0800)]
fm10k: move parameters initialization
Add new function fm10k_params_init to initialize all fm10k related
variables.
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
Chen Jing D(Mark) [Fri, 30 Oct 2015 08:02:55 +0000 (16:02 +0800)]
fm10k: add vector pre-condition check
Add condition check in rx_queue_setup func. If number of RX desc
can't satisfy vPMD requirement, record it into a variable. Or
call fm10k_rxq_vec_setup to initialize Vector RX.
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
Chen Jing D(Mark) [Fri, 30 Oct 2015 08:02:54 +0000 (16:02 +0800)]
fm10k: introduce vector driver
Add new file fm10k_rxtx_vec.c and add it into compiling.
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
Konstantin Ananyev [Tue, 27 Oct 2015 12:51:50 +0000 (12:51 +0000)]
app/testpmd: add command to display queue info
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Remy Horton <remy.horton@intel.com>
Konstantin Ananyev [Tue, 27 Oct 2015 12:51:49 +0000 (12:51 +0000)]
vmxnet3: get descriptor limits
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Yong Wang <yongwang@vmware.com>
Acked-by: Remy Horton <remy.horton@intel.com>
Konstantin Ananyev [Tue, 27 Oct 2015 12:51:48 +0000 (12:51 +0000)]
cxgbe: get descriptor limits
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Remy Horton <remy.horton@intel.com>
Konstantin Ananyev [Tue, 27 Oct 2015 12:51:47 +0000 (12:51 +0000)]
fm10k: get descriptor limits
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Remy Horton <remy.horton@intel.com>
Konstantin Ananyev [Tue, 27 Oct 2015 12:51:46 +0000 (12:51 +0000)]
e1000: get queue info and descriptor limits
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Remy Horton <remy.horton@intel.com>
Konstantin Ananyev [Tue, 27 Oct 2015 12:51:45 +0000 (12:51 +0000)]
ixgbe: get queue info and descriptor limits
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Remy Horton <remy.horton@intel.com>
Konstantin Ananyev [Tue, 27 Oct 2015 12:51:44 +0000 (12:51 +0000)]
i40e: get queue info and descriptor limits
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Remy Horton <remy.horton@intel.com>
Konstantin Ananyev [Tue, 27 Oct 2015 12:51:43 +0000 (12:51 +0000)]
ethdev: add API to retrieve queue information
Add the ability for the upper layer to query RX/TX queue information.
Add into rte_eth_dev_info new fields to represent information about
RX/TX descriptors min/max/alig nnumbers per queue for the device.
Add new structures:
struct rte_eth_rxq_info
struct rte_eth_txq_info
new functions:
rte_eth_rx_queue_info_get
rte_eth_tx_queue_info_get
into rte_etdev API.
Left extra free space in the queue info structures,
so extra fields could be added later without ABI breakage.
Add new fields:
rx_desc_lim
tx_desc_lim
into rte_eth_dev_info.
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Remy Horton <remy.horton@intel.com>
Konstantin Ananyev [Wed, 30 Sep 2015 19:04:30 +0000 (20:04 +0100)]
i40e: fix alignment of HW descriptors number
According to XL710 datasheet:
RX QLEN restrictions: When the PXE_MODE flag in the GLLAN_RCTL_0
register is cleared, the QLEN must be whole number of 32
descriptors.
TX QLEN restrictions: When the PXE_MODE flag in the GLLAN_RCTL_0
register is cleared, the QLEN must be whole number of 32
descriptors.
So make sure that for both RX and TX queues number of HW descriptors is
a multiple of 32.
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Remy Horton <remy.horton@intel.com>
Tomasz Kulasek [Fri, 30 Oct 2015 14:25:54 +0000 (15:25 +0100)]
bonding: support stats per queue
This patch adds fills bonding port's stats with a sum of corresponding
values taken from bonded slaves, when stats are requested for bonding port.
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Tomasz Kulasek [Fri, 30 Oct 2015 14:25:53 +0000 (15:25 +0100)]
app/test: add dynamic bonding RSS configuration
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Tomasz Kulasek [Fri, 30 Oct 2015 14:25:52 +0000 (15:25 +0100)]
null: add virtual RSS configuration
This implementation allows to set and read RSS configuration for null
device, and is used to validate right values propagation over the slaves,
in test units for dynamic RSS configuration for bonding.
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Acked-by: Tetsuya Mukawa <mukawa@igel.co.jp>