Jingjing Wu [Sat, 31 Oct 2015 15:57:31 +0000 (23:57 +0800)]
app/testpmd: add command to display DCB info
This patch adds a command to display DCB info in ports.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Jingjing Wu [Sat, 31 Oct 2015 15:57:30 +0000 (23:57 +0800)]
app/testpmd: setup DCB forwarding based on traffic class
This patch changes the testpmd DCB forwarding stream to make it
based on traffic class.
It also fixes some coding style issues.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Jingjing Wu [Sat, 31 Oct 2015 15:57:27 +0000 (23:57 +0800)]
ethdev: get DCB information
This patch adds one new API to get dcb related info.
rte_eth_dev_get_dcb_info
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Jingjing Wu [Sat, 31 Oct 2015 15:57:26 +0000 (23:57 +0800)]
ixgbe: support DCB+RSS multi-queue mode
This patch enables DCB+RSS multi-queue mode, and also fix some coding
style.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Jingjing Wu [Sat, 31 Oct 2015 15:57:25 +0000 (23:57 +0800)]
i40e: support DCB mode
This patch enables DCB feature on Intel XL710/X710 NICs. It includes:
Receive queue classification based on traffic class
Round Robin ETS schedule (rx and tx)
Priority flow control
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Jingjing Wu [Sat, 31 Oct 2015 15:57:24 +0000 (23:57 +0800)]
ethdev: move the multi-queue mode check to specific drivers
Different NIC has its specific constraint on the multi-queue
configuration, so move the checking from ethdev lib to drivers.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Jingjing Wu [Sat, 31 Oct 2015 15:57:23 +0000 (23:57 +0800)]
ethdev: rename DCB field in config structs
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Nelio Laranjeiro [Fri, 30 Oct 2015 18:57:23 +0000 (19:57 +0100)]
mlx5: handle link status interrupts
Add interrupts handler for port status notification.
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Nelio Laranjeiro [Fri, 30 Oct 2015 18:57:22 +0000 (19:57 +0100)]
mlx4: handle link status interrupts
Add interrupts handler for port status notification.
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Nelio Laranjeiro [Fri, 30 Oct 2015 18:57:21 +0000 (19:57 +0100)]
eal: allow external interrupt handler
Add RTE_INTR_HANDLE_EXT handler type for PMDs that do not support VFIO or
UIO. Those are expected to manage the file descriptor themselves.
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: David Marchand <david.marchand@6wind.com>
Adrien Mazarguil [Fri, 30 Oct 2015 18:55:19 +0000 (19:55 +0100)]
mlx5: update documentation
Add new features related to Mellanox OFED 3.1 support.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Yaacov Hazan [Fri, 30 Oct 2015 18:55:18 +0000 (19:55 +0100)]
mlx5: fix build with GCC < 4.6
Seen with GCC < 4.6:
error: unknown field ‘tcp_udp’ specified in initializer
error: extra brace group at end of initializer
Static initialization of anonymous structs/unions is a C11 feature
properly supported only since GCC 4.6.
Work around compilation errors with older versions by expanding
struct ibv_exp_flow_spec into struct hash_rxq_init.
Signed-off-by: Yaacov Hazan <yaacovh@mellanox.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Adrien Mazarguil [Fri, 30 Oct 2015 18:55:17 +0000 (19:55 +0100)]
mlx5: enable multi packet send WR in Tx CQ
For adapters that support it, this flag improves performance outside of VF
context.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Adrien Mazarguil [Fri, 30 Oct 2015 18:55:16 +0000 (19:55 +0100)]
mlx5: support IPv6 RSS using experimental flows
Normal flows do not currently provide IPv6 support.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Nelio Laranjeiro [Fri, 30 Oct 2015 18:55:15 +0000 (19:55 +0100)]
mlx5: disable useless flows in promiscuous mode
Only a single flow per hash RX queue is needed in promiscuous mode.
Disable others to free up hardware resources.
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Yaacov Hazan <yaacovh@mellanox.com>
Adrien Mazarguil [Fri, 30 Oct 2015 18:55:14 +0000 (19:55 +0100)]
app/testpmd: fix missing init in RSS hash show command
The "show port X rss-hash" command sometimes displays garbage instead of the
expected RSS hash key because the maximum key length is undefined. When the
requested key is too large to fit in the buffer,
rte_eth_dev_rss_hash_conf_get() does not update it.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Nelio Laranjeiro [Fri, 30 Oct 2015 18:55:13 +0000 (19:55 +0100)]
app/testpmd: add missing type to RSS hash commands
DPDK uses a structure to get or set a new hash key (see
eth_rte_rss_hash_conf). rss_hf field from this structure is used in
rss_hash_get_conf to retrieve the hash key and in rss_hash_update uses
it to verify the key exists before trying to update it.
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Nelio Laranjeiro [Fri, 30 Oct 2015 18:55:12 +0000 (19:55 +0100)]
mlx5: use one RSS hash key per flow type
DPDK expects to have an RSS hash key per flow type (IPv4, IPv6, UDPv4,
etc.), to handle this the PMD must keep a table of hash keys to be able
to reconfigure the queues at each start/stop call.
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Nelio Laranjeiro [Fri, 30 Oct 2015 18:55:11 +0000 (19:55 +0100)]
mlx5: support RSS hash update and get
First implementation of rss_hash_update and rss_hash_conf_get, those
functions still lack in functionality but are usable to change the RSS
hash key. For now, the PMD does not handle an indirection table for
each kind of flow (IPv4, IPv6, etc.), the same RSS hash key is used
for all protocols. This situation explains why the rss_hash_conf_get
returns the RSS hash key for all DPDK supported protocols and why the
hash key is set for all of them too.
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Olga Shern [Fri, 30 Oct 2015 18:55:10 +0000 (19:55 +0100)]
mlx5: use alternate method to configure promisc and allmulti modes
Promiscuous and allmulticast modes were historically enabled by adding
specific flows with types IBV_FLOW_ATTR_ALL_DEFAULT or
IBV_EXP_FLOW_ATTR_MC_DEFAULT to each hash RX queue, but this method is
deprecated.
- Promiscuous mode is now enabled by omitting destination MAC addresses from
basic flow specifications.
- Allmulticast mode is now enabled by using flow specifications that match
the broadcast bit in destination MAC addresses.
Signed-off-by: Olga Shern <olgas@mellanox.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Signed-off-by: Yaacov Hazan <yaacovh@mellanox.com>
Olga Shern [Fri, 30 Oct 2015 18:55:09 +0000 (19:55 +0100)]
mlx5: define specific flow steering rules for each hash Rx QP
All hash RX QPs currently use the same flow steering rule (L2 MAC filtering)
regardless of their type (TCP, UDP, IPv4, IPv6), which prevents them from
being dispatched properly. This is fixed by adding flow information to the
hash RX queue initialization data and generating specific flow steering
rules for each of them.
Signed-off-by: Olga Shern <olgas@mellanox.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Nelio Laranjeiro [Fri, 30 Oct 2015 18:55:08 +0000 (19:55 +0100)]
mlx5: adapt indirection table size depending on Rx queues number
Use the maximum size of the indirection table when the number of requested
RX queues is not a power of two, this help to improve RSS balancing.
A message informs users that balancing is not optimal in such cases.
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Olga Shern [Fri, 30 Oct 2015 18:55:07 +0000 (19:55 +0100)]
mlx5: use separate indirection table for default hash Rx queue
The default hash RX queue handles packets that are not matched by more
specific types and requires its own indirection table of size 1 to work
properly.
This commit implements support for multiple indirection tables by grouping
their layout and properties in a static initialization table.
Signed-off-by: Olga Shern <olgas@mellanox.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Signed-off-by: Yaacov Hazan <yaacovh@mellanox.com>
Adrien Mazarguil [Fri, 30 Oct 2015 18:55:06 +0000 (19:55 +0100)]
mlx5: refactor Rx code for the new verbs RSS API
The new Verbs RSS API is lower-level than the previous one and much more
flexible but requires RX queues to use Work Queues (WQs) internally instead
of Queue Pairs (QPs), which are grouped in an indirection table used by a
new kind of hash RX QPs.
Hash RX QPs and the indirection table together replace the parent RSS QP
while WQs are mostly similar to child QPs.
RSS hash key is not configurable yet.
Summary of changes:
- Individual DPDK RX queues do not store flow properties anymore, this info
is now part of the hash RX queues.
- All functions affecting the parent queue when RSS is enabled or the basic
queues otherwise are modified to affect hash RX queues instead.
- Hash RX queues are also used when a single DPDK RX queue is configured (no
RSS) to remove that special case.
- Hash RX queues and indirection table are created/destroyed when device
is started/stopped in addition to create/destroy flows.
- Contrary to QPs, WQs are moved to the "ready" state before posting RX
buffers, otherwise they are ignored.
- Resource domain information is added to WQs for better performance.
- CQs are not resized anymore when switching between non-SG and SG modes as
it does not work correctly with WQs. Use the largest possible size
instead, since CQ size does not have to be the same as the number of
elements in the RX queue. This also applies to the maximum number of
outstanding WRs in a WQ (max_recv_wr).
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Olga Shern <olgas@mellanox.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Signed-off-by: Or Ami <ora@mellanox.com>
Signed-off-by: Yaacov Hazan <yaacovh@mellanox.com>
Adrien Mazarguil [Fri, 30 Oct 2015 18:55:05 +0000 (19:55 +0100)]
mlx5: get rid of the WR structure in Rx queue elements
Removing this structure reduces the size of SG and non-SG RX queue elements
significantly to improve performance.
An nice side effect is that the mbuf pointer is now fully stored in
struct rxq_elt instead of relying on the WR ID data offset hack.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Olga Shern <olgas@mellanox.com>
Signed-off-by: Or Ami <ora@mellanox.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Adrien Mazarguil [Fri, 30 Oct 2015 18:55:04 +0000 (19:55 +0100)]
mlx5: use fast verbs interface for scattered Rx
This commit updates mlx5_rx_burst_sp() to use the fast verbs interface for
posting RX buffers just like mlx5_rx_burst(). Doing so avoids a loop in
libmlx5 and an indirect function call through libibverbs.
Note: recv_sg_list() is not implemented in the QP burst API, this commit is
only to prepare transition to the WQ-based API.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Adrien Mazarguil [Fri, 30 Oct 2015 19:00:09 +0000 (20:00 +0100)]
mlx4: fix missing unlock in case of error
Fixes:
7fae69eeff13 ("mlx4: new poll mode driver")
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Adrien Mazarguil [Fri, 30 Oct 2015 19:00:08 +0000 (20:00 +0100)]
mlx4: do not complain about port state
Port is considering inactive when the related netdevice is down. There is no
reason to warn about it (and confuse users) since it's automatically brought
up later by the PMD.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Nelio Laranjeiro [Fri, 30 Oct 2015 19:00:07 +0000 (20:00 +0100)]
mlx4: improve Rx performance with better prefetching
Prefetching initial bytes of mbuf structures earlier and in two cache lines
instead of one improves performance of mlx4_rx_burst(), which accesses the
mbuf->next field not present in the first 128 bytes.
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Adrien Mazarguil [Fri, 30 Oct 2015 18:52:42 +0000 (19:52 +0100)]
mlx5: add documentation
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Adrien Mazarguil [Fri, 30 Oct 2015 18:52:41 +0000 (19:52 +0100)]
mlx5: support checksum offload
This is the same implementation as mlx4.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Adrien Mazarguil [Fri, 30 Oct 2015 18:52:40 +0000 (19:52 +0100)]
mlx5: support VLAN filtering
All MAC RX flows must be updated with VLAN information when configuring a
VLAN filter.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Adrien Mazarguil [Fri, 30 Oct 2015 18:52:39 +0000 (19:52 +0100)]
mlx5: support flow control
Like most other device control operations, those are handled by the related
kernel network device through syscalls.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Adrien Mazarguil [Fri, 30 Oct 2015 18:52:38 +0000 (19:52 +0100)]
mlx5: support link status update
Link information is retrieved using ethtool ioctls.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Adrien Mazarguil [Fri, 30 Oct 2015 18:52:37 +0000 (19:52 +0100)]
mlx5: support promiscuous and allmulticast Rx modes
These modes require special non-MAC flows.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Signed-off-by: Yaacov Hazan <yaacovh@mellanox.com>
Adrien Mazarguil [Fri, 30 Oct 2015 18:52:36 +0000 (19:52 +0100)]
mlx5: add software counters
Hardware counters are not supported yet.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Adrien Mazarguil [Fri, 30 Oct 2015 18:52:35 +0000 (19:52 +0100)]
mlx5: support MTU configuration
Depending on the MTU and whether jumbo frames are enabled, RX queues may
switch between SG and non-SG modes for better performance.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Adrien Mazarguil [Fri, 30 Oct 2015 18:52:34 +0000 (19:52 +0100)]
mlx5: support scattered Rx and Tx
A dedicated RX callback is added to handle scattered buffers. For better
performance, it is only used when jumbo frames are enabled and MTU is larger
than a single mbuf.
On the TX path, scattered buffers are also handled in a separate function.
When there are more than MLX5_PMD_SGE_WR_N segments in a given mbuf, the
remaining segments are linearized in the last SGE entry.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Adrien Mazarguil [Fri, 30 Oct 2015 18:52:33 +0000 (19:52 +0100)]
mlx5: add device configure/start/stop
This commit adds the remaining missing callbacks to make mlx5 usable.
Like mlx4, device start and stop are implemented on top of MAC RX flows.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Signed-off-by: Francesco Santoro <francesco.santoro@6wind.com>
Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Adrien Mazarguil [Fri, 30 Oct 2015 18:52:32 +0000 (19:52 +0100)]
mlx5: add MAC handling
This commit adds support for MAC flow steering rules mandatory for the RX
path as well as the related callbacks to add/remove MAC addresses.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Adrien Mazarguil [Fri, 30 Oct 2015 18:52:31 +0000 (19:52 +0100)]
mlx5: support non-scattered Tx and Rx
RSS implementation with parent/child QPs comes from mlx4 and is temporary.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Adrien Mazarguil [Fri, 30 Oct 2015 18:52:30 +0000 (19:52 +0100)]
mlx5: introduce new driver for Mellanox ConnectX-4 adapters
In its current state, this driver implements the bare minimum to initialize
itself and Mellanox ConnectX-4 adapters without doing anything else
(no RX/TX for instance). It is disabled by default since it is based on the
mlx4 driver and also depends on libibverbs.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Signed-off-by: Or Ami <ora@mellanox.com>
Pavel Boldin [Wed, 28 Oct 2015 18:33:49 +0000 (20:33 +0200)]
vhost: use new eventfd copy
Signed-off-by: Pavel Boldin <pboldin@mirantis.com>
Acked-by: Huawei Xie <huawei.xie@intel.com>
Pavel Boldin [Wed, 28 Oct 2015 18:33:48 +0000 (20:33 +0200)]
vhost: add new eventfd copy ioctl
Signed-off-by: Pavel Boldin <pboldin@mirantis.com>
Acked-by: Huawei Xie <huawei.xie@intel.com>
Pavel Boldin [Wed, 28 Oct 2015 18:33:47 +0000 (20:33 +0200)]
vhost: refactor eventfd copy handler
* Move ioctl `EVENTFD_COPY' code to a separate function
* Remove extra #includes
* Introduce function fget_from_files
* Fix ioctl return values
Signed-off-by: Pavel Boldin <pboldin@mirantis.com>
Acked-by: Huawei Xie <huawei.xie@intel.com>
John Daley [Thu, 29 Oct 2015 18:45:16 +0000 (11:45 -0700)]
enic: improve Tx packet rate
For every packet sent, a completion was being requested and the
posted_index register on the nic was being updated. Instead, request a
completion and update the posted index once per burst after all
packets have been sent by the burst function.
Signed-off-by: John Daley <johndale@cisco.com>
Acked-by: Sujith Sankar <ssujith@cisco.com>
Bernard Iremonger [Tue, 27 Oct 2015 16:03:14 +0000 (16:03 +0000)]
xenvirt: free queues when closing
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Huawei Xie <huawei.xie@intel.com>
Bernard Iremonger [Tue, 27 Oct 2015 16:03:13 +0000 (16:03 +0000)]
xenvirt: support port hotplug
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Huawei Xie <huawei.xie@intel.com>
Zhe Tao [Fri, 30 Oct 2015 14:16:38 +0000 (22:16 +0800)]
i40e: allow vector Rx and Tx usage
To support FVL PMD can select which RX and TX function should be used
according to the queue config.
Signed-off-by: Zhe Tao <zhe.tao@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
Zhe Tao [Fri, 30 Oct 2015 14:16:37 +0000 (22:16 +0800)]
i40e: add vector scatter Rx
To support the multiple segments in one packets when the received pkts exceed
one buffer size.
Signed-off-by: Zhe Tao <zhe.tao@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
Zhe Tao [Fri, 30 Oct 2015 14:16:36 +0000 (22:16 +0800)]
i40e: add vector Tx
The way to increase the performance of the vPMD TX is to use some fast mbuf
release method compares to the scalar TX.
Signed-off-by: Zhe Tao <zhe.tao@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
Zhe Tao [Fri, 30 Oct 2015 14:16:35 +0000 (22:16 +0800)]
i40e: add vector Rx
The vPMD RX function uses the multi-buffer and SSE instructions to
accelerate the RX speed, but now the pktype cannot be supported by the vPMD RX,
because it will decrease the performance heavily.
Signed-off-by: Zhe Tao <zhe.tao@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
Yuanhan Liu [Thu, 29 Oct 2015 03:37:45 +0000 (11:37 +0800)]
vhost: fix build with kernel < 3.8
Fix build error:
virtio-net.c:80:89: error: ‘VIRTIO_NET_F_MQ’ undeclared here
rte_virtio_net.h:109: error: ‘VIRTIO_NET_CTRL_MQ_VQ_PAIRS_MAX’ undeclared here
Above two virtio-net MQ macros are introduced since kernel v3.8.
For older kernel, we should not reference them directly, hence,
this patch introduced two wrapper macros, with proper values
being set depending on we support MQ or not.
Fixes:
b09b198bfb5c ("vhost-user: announce queue number in message")
Reported-by: Yongjie Gu <yongjiex.gu@intel.com>
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Tested-by: David Marchand <david.marchand@6wind.com>
Tetsuya Mukawa [Wed, 28 Oct 2015 03:47:40 +0000 (12:47 +0900)]
vhost: fix crash with multiqueue enabled
The patch fixes wrong handling of virtqueue array index when
GET_VRING_BASE message comes.
Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Acked-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Flavio Leitner <fbl@sysclose.org>
Zhe Tao [Fri, 30 Oct 2015 04:57:35 +0000 (12:57 +0800)]
i40e: support flow control
Feature Add: Rx/Tx flow control support for the i40e
All the Rx/Tx LFC enable/disable operation is done by the F/W,
so PMD driver need to use the Set PHY Config AD command to trigger the PHY
to do the auto-negotiation, after the Tx/Rx pause ability is negotiated,
the F/W will help us to set the related LFC enable/disable registers.
PMD driver also need to configure the related registers to control
how often to send the pause frame and what the value in the pause frame.
Signed-off-by: Zhe Tao <zhe.tao@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Jingjing Wu [Wed, 21 Oct 2015 02:17:51 +0000 (10:17 +0800)]
i40evf: fix write back with virtual channel 1.1
If DPDK is used on VF while the host is using Linux Kernel driver
as PF driver on FVL NIC, then VF Rx is reported only in batches of
4 packets. It is due to the kernel driver assumes VF driver is working
in interrupt mode, but DPDK VF is working in Polling mode.
This patch fixes this issue by using the V1.1 virtual channel with
Linux i40e PF driver.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Jingjing Wu [Mon, 19 Oct 2015 06:31:57 +0000 (14:31 +0800)]
i40e: drop flow control frames from VF
This patch adds a workaround to drop flow control frames from being
transmitted from VSIs.
With this patch in place a malicious VF cannot send flow control or PFC
packets out on the wire.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Michael Qiu [Fri, 7 Aug 2015 03:29:16 +0000 (11:29 +0800)]
app/testpmd: modify mac in csum forwarding
For some ethnet-switch like intel RRC, all the packet forwarded
out by DPDK will be dropped in switch side, so the packet
generator will never receive the packet.
Signed-off-by: Michael Qiu <michael.qiu@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Michael Qiu [Mon, 26 Oct 2015 04:53:55 +0000 (12:53 +0800)]
fm10k: support Boulder Rapid device
Boulder Rapid is Intel new NIC within fm10k family.
This patch make DPDK driver support this new NIC.
Signed-off-by: Michael Qiu <michael.qiu@intel.com>
Acked-by: Jing Chen <jing.d.chen@intel.com>
Acked-by: Shaopeng He <shaopeng.he@intel.com>
Wang Xiao W [Mon, 12 Oct 2015 06:37:16 +0000 (14:37 +0800)]
fm10k: enable TSO support
This patch enables fm10k TSO feature for both non-tunneling packet
and tunneling packet.
Signed-off-by: Wang Xiao W <xiao.w.wang@intel.com>
Acked-by: Michael Qiu <michael.qiu@intel.com>
Yong Liu [Thu, 29 Oct 2015 09:18:44 +0000 (17:18 +0800)]
examples/l3fwd-power: disable Rx interrupt when waking up
Signed-off-by: Marvin Liu <yong.liu@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
Yong Liu [Thu, 29 Oct 2015 09:18:41 +0000 (17:18 +0800)]
e1000: add Rx interrupt handler
When datapath rxq interrupt is enabled, enable related device rxq.
Remove the interrupt handler after device stopped.
e1000 only support one type of interrupt cause, so remove lsc interrupt
handler if rxq enabled.
Signed-off-by: Marvin Liu <yong.liu@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
Yong Liu [Thu, 29 Oct 2015 09:18:38 +0000 (17:18 +0800)]
e1000: support Rx interrupt setup
Enable rx interrupt support on e1000 physical and emulated device.
Implement rxq interrupt related functions in eth_dev_ops structure.
Signed-off-by: Marvin Liu <yong.liu@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
Yong Liu [Thu, 29 Oct 2015 09:18:39 +0000 (17:18 +0800)]
e1000: separate link and Rx interrupt disabling
Separate lsc and rxq interrupt for they have different interrupt handlers.
Signed-off-by: Marvin Liu <yong.liu@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
Yong Liu [Thu, 29 Oct 2015 09:18:43 +0000 (17:18 +0800)]
e1000: restrict link interrupt setup scope
Only mask lsc interrupt bit when setup device interrupt.
Signed-off-by: Marvin Liu <yong.liu@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
Wenzhuo Lu [Mon, 26 Oct 2015 05:27:33 +0000 (13:27 +0800)]
ixgbe: support new flow director modes for X550
Implement the new CLIs for fdir mac vlan and tunnel modes, including
flow_director_filter and flow_director_mask. Set the mask of fdir.
Add, delete or update the entities of filter.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Wenzhuo Lu [Mon, 26 Oct 2015 05:27:32 +0000 (13:27 +0800)]
app/testpmd: new flow director commands
The different fdir mode needs different parameters, so, the parameter *mode*
is introduced to the CLI flow_director_filter and flow_director_mask. This
parameter can pormpt the user to input the appropriate parameters for different
mode.
Please be aware, as we should set the fdir mode, the value of the parameter
pkt-filter-mode, when we start testpmd. We cannot set a different mode for
mask or filter.
The new CLIs are added for the mac vlan and tunnel modes, like this,
flow_director_mask X mode MAC-VLAN vlan XXXX mac XX,
flow_director_mask X mode Tunnel vlan XXXX mac XX tunnel-type X tunnel-id XXXX,
flow_director_filter X mode MAC-VLAN add/del/update mac XX:XX:XX:XX:XX:XX
vlan XXXX flexbytes (X,X) fwd/drop queue X fd_id X,
flow_director_filter X mode Tunnel add/del/update mac XX:XX:XX:XX:XX:XX
vlan XXXX tunnel NVGRE/VxLAN tunnel-id XXXX flexbytes (X,X) fwd/drop queue X
fd_id X.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Wenzhuo Lu [Mon, 26 Oct 2015 05:27:31 +0000 (13:27 +0800)]
app/testpmd: show new flow director modes
There're fdir mask and supported flow type in the output of the CLI,
show port fdir. But not every parameter has meaning for all the fdir
modes, and the supported flow type is meaningless for mac vlan and
tunnel modes. So, we output different thing for different mode.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Wenzhuo Lu [Mon, 26 Oct 2015 05:27:30 +0000 (13:27 +0800)]
app/testpmd: add parameters for new flow director modes
For testpmd CLI's parameter pkt-filter-mode, there're new values supported for
fdir new modes, perfect-mac-vlan, perfect-tunnel.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Wenzhuo Lu [Mon, 26 Oct 2015 05:27:29 +0000 (13:27 +0800)]
app/testpmd: initialize new flow director masks
When a port is enabled, there're default values for the parameters of
fdir mask. For the new parameters, the default values also need to be
set.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Wenzhuo Lu [Mon, 26 Oct 2015 05:27:28 +0000 (13:27 +0800)]
ethdev: add more flow director modes
Define the new modes and modify the filter and mask structures for
the mac vlan and tunnel modes.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Harry van Haaren [Wed, 28 Oct 2015 16:08:00 +0000 (16:08 +0000)]
igb: fix build without ieee1588 enabled
This patch marks rxq with RTE_SET_USED in
rx_desc_hlen_type_rss_to_pkt_flags(), when
ieee1588 is disabled. Previously a compilation
error occurred on unused-parameter.
Fixes:
1ce6591e238a ("igb: fix ieee1588 frame identification in i210")
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Wenzhuo Lu [Fri, 16 Oct 2015 13:05:40 +0000 (21:05 +0800)]
ixgbevf: support RSS reta/hash query and update
This patch implements the VF RSS reta/hash query and update function
on 10G NICs. But the update function is only provided for x550. Because
the other NICs don't have the separate registers for VF, we don't want
to let a VF NIC change the shared RSS reta/hash registers. It may cause
PF and other VF NICs' behavior change without being noticed.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Wenzhuo Lu [Fri, 16 Oct 2015 13:05:39 +0000 (21:05 +0800)]
ixgbevf: support RSS config on x550
On x550, there're separate registers provided for VF RSS while on the other
10G NICs, for example, 82599, VF and PF share the same registers.
This patch lets x550 use the VF specific registers when doing RSS configuration
on VF. The behavior of other 10G NICs doesn't change.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Wenzhuo Lu [Fri, 16 Oct 2015 13:05:38 +0000 (21:05 +0800)]
ixgbe: support 512 RSS entries on x550
Comparing with the older NICs, x550's RSS redirection table is enlarged to 512
entries. As the original code is for the NICs which have a 128 entries RSS table,
it means only part of the RSS table is set on x550. So, RSS cannot work as
expected on x550, it doesn't redirect the packets evenly.
This patch configs the entries beyond 128 on x550 to let RSS work well, and also
update the query and update functions to support 512 entries.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Wenzhuo Lu [Fri, 23 Oct 2015 05:52:25 +0000 (13:52 +0800)]
ixgbe: drop flow control frames from VF
This patch will drop flow control frames from being transmitted
from VSIs.
With this patch in place a malicious VF cannot send flow control
or PFC packets out on the wire.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Zoltan Kiss [Fri, 25 Sep 2015 17:44:51 +0000 (10:44 -0700)]
ixgbe: prefetch cacheline after pointer becomes valid
At the original point the rx_pkts[pos( + n)] pointers are not initialized,
so the code is prefetching random data.
Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Remy Horton [Thu, 17 Sep 2015 13:47:16 +0000 (14:47 +0100)]
ixgbe: fix access to last byte of EEPROM
Incorrect operator in ixgbe_get_eeprom & ixgbe_set_eeprom prevents
last byte of EEPROM being read/written, and hence cannot be dumped
or updated in entirity using these functions.
Fixes:
0198848a47f5 ("ixgbe: add access to specific device info")
Signed-off-by: Remy Horton <remy.horton@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Harry van Haaren [Tue, 27 Oct 2015 10:22:14 +0000 (10:22 +0000)]
ixgbe: add MAC short packet discard count to Rx errors
This patch adds the mspdc (MAC Short Packet Discard Count)
to the total rx errors, as discussed on the dev@dpdk mailing
list: http://comments.gmane.org/gmane.comp.networking.dpdk.devel/23717
Suggested-by: Igor Ryzhov <iryzhov@arccn.ru>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Harry van Haaren [Tue, 20 Oct 2015 09:23:19 +0000 (10:23 +0100)]
ixgbe: remove jabber count from Rx errors
Remove receive jabber count (rjc) from ierrors count as the
register overlaps with the CRC error register, previously
causing some packets to be counted twice.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Maryam Tahhan <maryam.tahhan@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Harry van Haaren [Thu, 1 Oct 2015 12:12:51 +0000 (13:12 +0100)]
ixgbe: fix statistics for 82598/82599 differences
Ixgbe based 82598 and 82599 have different priority receive link-on
register addresses. This is solved in base/ by providing in the
PXONRXC and PXONXCNT as separate macros. This patch ensures the
correct address is read, avoiding reading garbage values.
Also PXON2OFFCNT doesn't exist in 82598, so it is not read for
that MAC.
This issue has existed since the drivers were imported into DPDK,
but was not easily discoverable as xstats were not available.
Tested using testpmd> show port xstats all
Fixes:
af75078fece3 ("first public release")
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Wenzhuo Lu [Fri, 11 Sep 2015 02:00:16 +0000 (10:00 +0800)]
ixgbevf: fix TSO support
When setting TSO on VF ixgbe NICs, for example, 82599, x550, the
prompt that TSO is not supported will be printed. But TSO is
supported by VF ixgbe NICs.
We should add TSO to the capability flag, so, we will not see the
wrong prompt.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Harry van Haaren [Mon, 12 Oct 2015 16:45:32 +0000 (17:45 +0100)]
ixgbevf: fix statistic wraparound
Fix a misinterpretation of VF stats in ixgbe
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Roger Melton <rmelton@cisco.com>
Harry van Haaren [Mon, 12 Oct 2015 16:45:33 +0000 (17:45 +0100)]
igbvf: fix statistic wraparound
Fix a misinterpreatation of VF statistic macro in e1000/igb.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Roger Melton <rmelton@cisco.com>
Pablo de Lara [Mon, 19 Oct 2015 13:20:03 +0000 (14:20 +0100)]
igb: fix ieee1588 frame identification in i210
Fixed issue where the flag PKT_RX_IEEE1588_PTP was not being set
in Intel I210 NIC, as EtherType in RX descriptor is in bits 8:10 of
Packet Type and not in the default bits 0:2.
Fixes known issue "IEEE1588 support possibly not working
with an Intel Ethernet Controller I210 NIC"
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Wang Xiao W [Wed, 21 Oct 2015 07:55:26 +0000 (15:55 +0800)]
igb: enable TSO support
This patch enables igb TSO feature, the feature works on both PF and VF.
The TCP segmentation offload needs to write the offload related information
into the advanced context descriptors, which is similar to checksum offload.
Signed-off-by: Wang Xiao W <xiao.w.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Harry van Haaren [Thu, 22 Oct 2015 15:18:04 +0000 (16:18 +0100)]
e1000: fix total byte statistics
This patch fixes a bug in reading the 64 bit register reading
which was causing the total octets counters to show zero.
Now the code reads both the lower and higher 32 bits.
Tested in testpmd, byte values are correct.
Fixes:
805803445a02 ("e1000: support EM devices (also known as e1000/e1000e)")
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Wenzhuo Lu [Fri, 16 Oct 2015 02:51:21 +0000 (10:51 +0800)]
e1000: add new i218 devices
Add the new e1000 devices to the DPDK PCI device list.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Wenzhuo Lu [Fri, 16 Oct 2015 02:51:20 +0000 (10:51 +0800)]
e1000/base: minor changes
Some minor code change. No functionality impact.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Wenzhuo Lu [Fri, 16 Oct 2015 02:51:19 +0000 (10:51 +0800)]
e1000/base: allow both ULP and EEE in Sx state
This patch implements a modified flow that allows both ULP and EEE
in Sx (Sticky mode).
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Wenzhuo Lu [Fri, 16 Oct 2015 02:51:18 +0000 (10:51 +0800)]
e1000/base: synchronize PHY interface on non-ME systems
On power up, the MAC - PHY interface needs to be set to PCIe, even if
cable is disconnected. In ME systems, the ME handles this on exit from
Sx(Sticky mode) state. In non-ME, the driver handles it. Added a check
for non-ME system to the driver code that handles that.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Wenzhuo Lu [Fri, 16 Oct 2015 02:51:14 +0000 (10:51 +0800)]
e1000/base: increase timeout of reset check
Previously, in check_reset_block RSPCIPHY was polled for 100 ms before determining
that the ME veto is set. This needed to be increased to 300 ms.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Wenzhuo Lu [Fri, 16 Oct 2015 02:51:15 +0000 (10:51 +0800)]
e1000/base: initialize
88E1543 PHY
The initialization process for
88E1543 PHY.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Wenzhuo Lu [Fri, 16 Oct 2015 02:51:12 +0000 (10:51 +0800)]
e1000/base: disable IPv6 extension header parsing
All 1G Server products need to have IPv6 extension headers turned off.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Wenzhuo Lu [Fri, 16 Oct 2015 02:51:03 +0000 (10:51 +0800)]
e1000/base: prevent ULP flow if cable connected
Enabling ulp on link down when cable is connect caused an infinite
loop of linkup/down indications in the NDIS driver.
After discussed, correct flow is to enable ULP only when cable is
disconnected.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Wenzhuo Lu [Fri, 16 Oct 2015 02:51:02 +0000 (10:51 +0800)]
e1000/base: add flags to set EEE advertisement modes
Requires driver changes!
Change e1000_set_eee_i350 and e1000_set_eee_i354 to have flags allowing
changes in the advertised EEE speeds.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Wenzhuo Lu [Fri, 16 Oct 2015 02:50:59 +0000 (10:50 +0800)]
e1000/base: support inverted format ETrackId
There are some images which contain ETrackID in inverted format. This patch
allows reading this format.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Wenzhuo Lu [Fri, 16 Oct 2015 02:51:00 +0000 (10:51 +0800)]
e1000/base: support different EEARBC for i210
EEARBC has changed on i210. It means EEARBC has a different address on
i210 than on other NICs. So, add a new entity named EEARBC_I210 to the
register list and make sure the right one is being used on i210.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Wenzhuo Lu [Fri, 16 Oct 2015 02:51:08 +0000 (10:51 +0800)]
e1000/base: add bit to disable packetbuffer read
Added bit FEXTNVM7[18], that controls disabling MAC packet buffer read.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Wenzhuo Lu [Fri, 16 Oct 2015 02:50:53 +0000 (10:50 +0800)]
e1000/base: add defaults for i210 Rx/Tx PBSIZE
These are the defaults for the packet buffer size registers that need to
be explicitly set back if someone changes them and comes back to a normal
driver.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>