dpdk.git
7 years agocryptodev: remove useless alignment
Pablo de Lara [Sun, 2 Jul 2017 05:41:06 +0000 (06:41 +0100)]
cryptodev: remove useless alignment

rte_crypto_op and rte_crypto_sym_op structures
were marked as cache aligned.
However, since these structures are always initialized
in a mempool, this alignment is useless, since the mempool
forces the alignment of its objects.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
7 years agocryptodev: do not store pointer to op specific params
Pablo de Lara [Sun, 2 Jul 2017 05:41:05 +0000 (06:41 +0100)]
cryptodev: do not store pointer to op specific params

Instead of storing a pointer to operation specific parameters,
such as symmetric crypto parameters, use a zero-length array,
to mark that these parameters will be stored after the
generic crypto operation structure, which was already assumed
in the code, reducing the memory footprint of the crypto operation.

Besides, it is always expected to have rte_crypto_op
and rte_crypto_sym_op (the only operation specific parameters
structure right now) to be together, as they are initialized
as a single object in the crypto operation pool.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
7 years agocryptodev: remove opaque data pointer in crypto op
Pablo de Lara [Sun, 2 Jul 2017 05:41:04 +0000 (06:41 +0100)]
cryptodev: remove opaque data pointer in crypto op

Storing a pointer to the user data is unnecessary,
since user can store additional data, after the crypto operation.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
7 years agocryptodev: replace enums with 1-byte variables
Pablo de Lara [Sun, 2 Jul 2017 05:41:03 +0000 (06:41 +0100)]
cryptodev: replace enums with 1-byte variables

Instead of storing some crypto operation flags,
such as operation status, as enumerations,
store them as uint8_t, for memory efficiency.

Also, reserve extra 5 bytes in the crypto operation,
for future additions.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
7 years agocryptodev: move session type to generic crypto op
Pablo de Lara [Sun, 2 Jul 2017 05:41:02 +0000 (06:41 +0100)]
cryptodev: move session type to generic crypto op

Session type (operation with or without session) is not
something specific to symmetric operations.
Therefore, the variable is moved to the generic crypto operation
structure.

Since this is an ABI change, the cryptodev library version
gets bumped.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
7 years agoapp/crypto-perf: set crypto op pool cache
Sergio Gonzalez Monroy [Fri, 30 Jun 2017 07:56:29 +0000 (08:56 +0100)]
app/crypto-perf: set crypto op pool cache

Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
7 years agoapp/crypto-perf: return crypto ops to mempool in bulk
Sergio Gonzalez Monroy [Fri, 30 Jun 2017 07:56:58 +0000 (08:56 +0100)]
app/crypto-perf: return crypto ops to mempool in bulk

Use rte_mempool_put_bulk for both latency and throughput tests instead
of rte_crypto_op_free to improve application performance.

Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
7 years agoapp/crypto-perf: fix digest data for chained mbufs
Sergio Gonzalez Monroy [Fri, 30 Jun 2017 07:56:03 +0000 (08:56 +0100)]
app/crypto-perf: fix digest data for chained mbufs

Use corect mbuf segment for chained mbufs.

Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application")
Cc: stable@dpdk.org
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
7 years agocrypto/qat: fix typo
Pablo de Lara [Thu, 29 Jun 2017 11:16:21 +0000 (12:16 +0100)]
crypto/qat: fix typo

Fixed a comment in QAT, referring to the IV size
for AES-GCM, that should be in bytes, and not bits.

Fixes: 53d8971cbe81 ("qat: fix AES-GCM decryption")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
7 years agovhost: print reason of NUMA node query failure
Ilya Maximets [Thu, 6 Jul 2017 13:30:43 +0000 (16:30 +0300)]
vhost: print reason of NUMA node query failure

syscall always returns '-1' on failure and there is no point
in printing that value. 'errno' is much more informative.

Fixes: 586e39001317 ("vhost: export numa node")

Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
7 years agonet/virtio-user: fix comment
Yong Wang [Fri, 23 Jun 2017 04:14:45 +0000 (00:14 -0400)]
net/virtio-user: fix comment

Since "rte_eal_dev_init()" has been removed, the comment referred to
it should be modified simultaneously.

Fixes: 9721b4d543a3 ("eal: remove unused device init function")

Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
7 years agonet/virtio-user: fix crash when detaching device
Allain Legacy [Fri, 23 Jun 2017 12:41:37 +0000 (08:41 -0400)]
net/virtio-user: fix crash when detaching device

The rte_eth_dev.data pointer is set to a reference to a static table.
Attempting to rte_free() it leads to a panic.  For example, the
following commands result in a panic if run in testpmd

  testpmd> port attach virtio_user0,path=/dev/vhost-net,iface=test0
  testpmd> port stop 2
  testpmd> port close 2
  testpmd> port detach 2

Fixes: ce2eabdd43ec ("net/virtio-user: add virtual device")
Cc: stable@dpdk.org
Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
7 years agovhost: check return of mutex initialization
Jens Freimann [Tue, 4 Jul 2017 08:50:43 +0000 (10:50 +0200)]
vhost: check return of mutex initialization

Check return value of pthread_mutex_init(). Also destroy
mutex in case of other erros before returning.

Signed-off-by: Jens Freimann <jfreimann@redhat.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
7 years agovhost: check return of pthread calls
Jens Freimann [Tue, 4 Jul 2017 08:50:42 +0000 (10:50 +0200)]
vhost: check return of pthread calls

Make sure we catch and log failed calls to pthread
functions.

Signed-off-by: Jens Freimann <jfreimann@redhat.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
7 years agovhost: add missing check in driver registration
Jens Freimann [Tue, 4 Jul 2017 08:50:41 +0000 (10:50 +0200)]
vhost: add missing check in driver registration

Add a check for strdup() return value and fail gracefully if we
get a bad return code.

Signed-off-by: Jens Freimann <jfreimann@redhat.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
7 years agovhost: fix MTU device feature check
Maxime Coquelin [Thu, 29 Jun 2017 07:58:10 +0000 (09:58 +0200)]
vhost: fix MTU device feature check

The MTU feature support check has to be done against MTU
feature bit mask, and not bit position.

Fixes: 72e8543093df ("vhost: add API to get MTU value")
Cc: stable@dpdk.org
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
7 years agovhost: fix checking of device features
Ivan Dyukov [Wed, 28 Jun 2017 12:40:31 +0000 (15:40 +0300)]
vhost: fix checking of device features

To compare enabled features in current device we must use bit
mask instead of bit position.

Fixes: c843af3aa13e ("vhost: access header only if offloading is supported")
Cc: stable@dpdk.org
Signed-off-by: Ivan Dyukov <i.dyukov@samsung.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
7 years agodoc: update virtio ring size and header size
Zhiyong Yang [Thu, 11 May 2017 02:16:35 +0000 (10:16 +0800)]
doc: update virtio ring size and header size

Add more explanations about vring size changes and different
virtio_header size.

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
7 years agovhost: fix IP checksum
Jianfeng Tan [Wed, 7 Jun 2017 06:41:37 +0000 (06:41 +0000)]
vhost: fix IP checksum

There is no way to bypass IP checksum verification in Linux
kernel, no matter skb->ip_summed is assigned as CHECKSUM_UNNECESSARY
or CHECKSUM_PARTIAL.

So any packets with bad IP checksum will be dropped at VM IP layer.

To correct, we check this flag PKT_TX_IP_CKSUM to calculate IP csum.

Fixes: 859b480d5afd ("vhost: add guest offload setting")
Cc: stable@dpdk.org
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
7 years agovhost: fix TCP checksum
Jianfeng Tan [Wed, 7 Jun 2017 06:41:36 +0000 (06:41 +0000)]
vhost: fix TCP checksum

As PKT_TX_TCP_SEG flag in mbuf->ol_flags implies PKT_TX_TCP_CKSUM,
applications, e.g., testpmd, don't set PKT_TX_TCP_CKSUM when TSO
is set.

This leads to that packets get dropped in VM tcp stack layer because
of bad TCP csum.

To fix this, we make sure TCP NEEDS_CSUM info is set into virtio net
header when PKT_TX_TCP_SEG is set, so that VM tcp stack will not
check the TCP csum.

Fixes: 859b480d5afd ("vhost: add guest offload setting")
Cc: stable@dpdk.org
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
7 years agovhost: clean up per-socket mutex
Daniel Verkamp [Mon, 12 Jun 2017 21:29:04 +0000 (14:29 -0700)]
vhost: clean up per-socket mutex

vsocket->conn_mutex was allocated with pthread_mutex_init() but never
freed with pthread_mutex_destroy().  This is a potential memory leak,
depending on how pthread_mutex_t is implemented.

Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
7 years agonet/mlx5: add vectorized Rx/Tx burst for x86
Yongseok Koh [Thu, 6 Jul 2017 18:41:10 +0000 (11:41 -0700)]
net/mlx5: add vectorized Rx/Tx burst for x86

To make vectorized burst routines enabled, it is required to run on x86_64
architecture. If all the conditions are met, the vectorized burst functions
are enabled automatically. The decision is made individually on RX and TX.
There's no PMD option to make a selection.

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
7 years agonet/mlx5: select Rx/Tx callbacks when starting device
Yongseok Koh [Thu, 6 Jul 2017 18:41:09 +0000 (11:41 -0700)]
net/mlx5: select Rx/Tx callbacks when starting device

The callbacks are global to a device but the selection is made every queue
configuration, which is redundant.

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
7 years agonet/mlx5: use buffer address for LKEY search
Yongseok Koh [Thu, 6 Jul 2017 18:41:08 +0000 (11:41 -0700)]
net/mlx5: use buffer address for LKEY search

When searching LKEY, if search key is mempool pointer, the 2nd cacheline
has to be accessed and it even requires to check whether a buffer is
indirect per every search. Instead, using address for search key can reduce
cycles taken. And caching the last hit entry is beneficial as well.

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
7 years agonet/mlx5: free buffers in bulk on Tx completion
Yongseok Koh [Thu, 6 Jul 2017 18:41:07 +0000 (11:41 -0700)]
net/mlx5: free buffers in bulk on Tx completion

When processing Tx completion, it is more efficient to free buffers in bulk
using rte_mempool_put_bulk() if buffers are from a same mempool.

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
7 years agonet/mlx5: change indexing for Tx SW ring
Yongseok Koh [Thu, 6 Jul 2017 18:41:06 +0000 (11:41 -0700)]
net/mlx5: change indexing for Tx SW ring

For Tx SW ring (txq->elts[]), indexes are kept and used in
txq->elts_head/tail. Because of this, one entry must always be left unused
and it also makes code complex. Changed to store counters instead of
indexes in order to make the code simpler and to reduce a few calculations.

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
7 years agonet/ixgbe: remove MTU setting limitation
Beilei Xing [Thu, 6 Jul 2017 03:36:00 +0000 (11:36 +0800)]
net/ixgbe: remove MTU setting limitation

Currently, if requested MTU is bigger than mbuf size and scattered
receive is not enabled, setting MTU to that value fails.

This patch allows setting this special MTU when device is stopped,
because scattered_rx will be re-configured during next port start
and driver may enable scattered receive according new MTU value.

After this patch, driver may select different receive function
automatically after MTU set, according MTU values selected.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
7 years agonet/bonding: allow slaves to also be bonded devices
Tomasz Kulasek [Wed, 5 Jul 2017 18:54:29 +0000 (19:54 +0100)]
net/bonding: allow slaves to also be bonded devices

This patch removes restrictions in bonded device library which prevent a
bonded device to be added to another bonded device with the limitation
that 802.3ad mode is not supported if one or more slaves is also a
bonded device,

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
7 years agonet/bonding: fix link properties management
Tomasz Kulasek [Wed, 5 Jul 2017 18:54:28 +0000 (19:54 +0100)]
net/bonding: fix link properties management

This patch fixes the management of link properties in the bonded device.

In all mode except mode 4 a bonded device link will default to reporting
the link as full duplex and auto-neg. The link speed for a bond port is
calculated on it's active slaves and the particular mode it is running
in. The bonding link speed is reported based on the transmit link as in
some modes link speed between egress/ingress is not symmetrical.

- round-robin, balance, 802.3ad, TLB and ALB modes all report the link
  speed as the sum of the speed of each active slave.
- active backup link speed is reported as the speed of the current
  primary slave
- broadcast is reported as the minimum of value of the active slaves
  link speeds.

In mode 4 (link aggregation 802.3ad) the properties of the first slave
added to the bonded device are slave and subsequent slaves are verified
to have the same properties.

Finally in the bond_ethdev_lsc_event_callback function the link
properties of the device are updated after any change to the number of
active slaves.

Fixes: 2efb58cbab6e ("bond: new link bonding library")
Cc: stable@dpdk.org
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
7 years agonet/ixgbe: enable IPv6 for consistent API
Qi Zhang [Wed, 5 Jul 2017 02:21:36 +0000 (22:21 -0400)]
net/ixgbe: enable IPv6 for consistent API

Enable IPv6 support with rte_flow API.
Only supports signature Match.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
7 years agonet/ixgbe: enable signature match for consistent API
Qi Zhang [Wed, 5 Jul 2017 02:21:35 +0000 (22:21 -0400)]
net/ixgbe: enable signature match for consistent API

Enable signature match for rte_flow API.
RTE_FLOW_ITEM_TYPE_FUZZY specify a signature match.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
7 years agonet/ixgbe: replace macro with inline function
Qi Zhang [Wed, 5 Jul 2017 02:21:34 +0000 (22:21 -0400)]
net/ixgbe: replace macro with inline function

Code cleanup done for 2 purposes.
1. "index" variable is no more needed.
2. inline function makes it easier and safer to nest into a loop.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
7 years agotest/bonding: fix mode 4 names
Daniel Mrzyglod [Wed, 5 Jul 2017 15:27:47 +0000 (17:27 +0200)]
test/bonding: fix mode 4 names

ring network driver is limited to 32 characters
the name of device was extended to net_ring_unit_test_mode4_slave_0
which is 33 characters long.

Fixes: 5e41ab250dfa ("app/test: unit tests for bonding mode 4")
Cc: stable@dpdk.org
Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
7 years agonet/mlx4: support flow API RSS action
Vasily Philipov [Wed, 5 Jul 2017 08:14:11 +0000 (11:14 +0300)]
net/mlx4: support flow API RSS action

This commit adds support for the flow API RSS action with the following
limitations:

 - Only supported when isolated mode is enabled.
 - The number of queues specified by the action (rte_flow_action_rss.num)
   must be a power of two.
 - Each queue index can be specified at most once in the configuration
   (rte_flow_action_rss.queue[]).
 - Because a queue can be associated with a single RSS context, it cannot
   be targeted by multiple RSS actions simultaneously.

Signed-off-by: Vasily Philipov <vasilyf@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
7 years agonet/mlx4: refactor RSS parent queue allocation
Vasily Philipov [Wed, 5 Jul 2017 08:14:10 +0000 (11:14 +0300)]
net/mlx4: refactor RSS parent queue allocation

A special "parent" queue must be allocated in addition to a group of
standard Rx queues for RSS to work. This is done automatically outside of
isolated mode by the PMD when applications request several Rx queues.

Since each configured flow rule with the RSS action may target a different
set of queues, the PMD must have the ability to dynamically allocate
several parent queues, one per RSS group.

If isolated mode was requested the default RSS parent queue isn't created
in this case.

Refactor RSS parent queue allocations (currently limited to a single
parent) in preparation for flow API RSS action support.

Signed-off-by: Vasily Philipov <vasilyf@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
7 years agonet/mlx4: implement isolated mode from flow API
Vasily Philipov [Wed, 5 Jul 2017 08:14:09 +0000 (11:14 +0300)]
net/mlx4: implement isolated mode from flow API

The user must request isolated mode before device configuration.

Signed-off-by: Vasily Philipov <vasilyf@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
7 years agonet/vmxnet3: avoid code duplication
Chas Williams [Thu, 29 Jun 2017 19:35:50 +0000 (15:35 -0400)]
net/vmxnet3: avoid code duplication

Refactor vmxnet3_post_rx_bufs() to call vmxnet3_renew_desc()
to update the newly allocated mbufs.  While here, relocate the
relevant comments to vmxnet3_renew_desc().

Signed-off-by: Chas Williams <ciwillia@brocade.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/mlx4: fix mbuf poisoning in debug code
Vasily Philipov [Wed, 5 Jul 2017 11:49:22 +0000 (14:49 +0300)]
net/mlx4: fix mbuf poisoning in debug code

In debug mode, all mbuf ol_flags are temporarily enabled while sitting
in the Rx queue to detect otherwise silent data corruption, however
some of them are special (indirect and control) and must be cleared
before returning mbufs to the pool to avoid crashing.

Fixes: 7fae69eeff13 ("mlx4: new poll mode driver")
CC: stable@dpdk.org
Signed-off-by: Vasily Philipov <vasilyf@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
7 years agonet/i40e: fix incorrect PF Rx bytes
Qi Zhang [Wed, 5 Jul 2017 06:48:06 +0000 (02:48 -0400)]
net/i40e: fix incorrect PF Rx bytes

Internal Rx packet bytes is over counted, CRC size is not excluded,
that cause incorrect Rx bytes or even negative value.

Fixes: 0bcdc44510ef ("net/i40e: exclude internal packet's byte count")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
7 years agoapp/testpmd: add cmd for dedicated LACP Rx/Tx queues
Tomasz Kulasek [Tue, 4 Jul 2017 16:46:27 +0000 (17:46 +0100)]
app/testpmd: add cmd for dedicated LACP Rx/Tx queues

Add new command to support enable/disable of dedicated Tx/Rx queue on
each slave of a bond device for LACP control plane traffic.

    set bonding lacp dedicated_queues <port_id> [enable|disable]

When enabled this option creates dedicated queues on each slave device
for LACP control plane traffic. This removes the need to filter control
plane packets in the data path.

Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
7 years agonet/bonding: add dedicated HW queues for LACP control
Tomasz Kulasek [Tue, 4 Jul 2017 16:46:26 +0000 (17:46 +0100)]
net/bonding: add dedicated HW queues for LACP control

Add support for hardware flow classification of LACP control plane
traffic to be redirect to a dedicated receive queue on each slave which
is not visible to application. Also enables a dedicate transmit queue
for LACP traffic which allows complete decoupling of control and data
paths.

This only applies to bonding devices running in mode 4
(link-aggregation-802.3ad).

Introduce two new APIs to support enable/disabled of dedicated
queues.

- rte_eth_bond_8023ad_dedicated_queues_enable
- rte_eth_bond_8023ad_dedicated_queues_disable

rte_eth_bond_8023ad_dedicated_queues_enable must be called before
bonding port is configured or started to reserved and configure the
dedicated queues.

When this option is enabled all slaves must support flow filtering
by Ethernet type and support one additional Tx and Rx queue on
each slave.

Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
7 years agonet/bonding: use ptype flags for LACP Rx filtering
Tomasz Kulasek [Tue, 4 Jul 2017 16:46:25 +0000 (17:46 +0100)]
net/bonding: use ptype flags for LACP Rx filtering

Use packet types flags in mbuf to provide hint for filtering of LACP
control plane traffic from the data path.

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
7 years agonet/bonding: fix number of bonding Tx/Rx queues
Declan Doherty [Tue, 4 Jul 2017 16:46:24 +0000 (17:46 +0100)]
net/bonding: fix number of bonding Tx/Rx queues

This patch fixes the maximum number of Tx an Rx queues supported by a
bonding device return by the rte_eth_dev_info_get function.

The bonding device now calculates the maximum number of supported Tx
and Rx queues based on the slaves bound to the bonded device, with the
minimum values of Tx and Rx queues from the device slaves being the
bonded devices maximum, as each slave must be able to support the same
number of Tx and Rx queues.

Fixes: 2efb58cbab6e ("bond: new link bonding library")
Cc: stable@dpdk.org
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
7 years agonet/ena/base: initialize memory in the allocation macros
Alexander Matushevsky [Tue, 4 Jul 2017 13:51:53 +0000 (15:51 +0200)]
net/ena/base: initialize memory in the allocation macros

Uninitialized memory could cause memory corruption, by indicating
completion of the invalid mbuf.

Fixes: 3d3edc265fc8 ("net/ena: make coherent memory allocation NUMA-aware")
Cc: stable@dpdk.org
Signed-off-by: Alexander Matushevsky <matua@amazon.com>
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
7 years agonet/ena: fix cleanup of the Tx bufs
Michal Krawczyk [Tue, 4 Jul 2017 13:51:52 +0000 (15:51 +0200)]
net/ena: fix cleanup of the Tx bufs

After cleanup of the mbuf on Tx path, queue was still pointing to this
mbuf and upon cleanup of the Tx buffers, it was being freed second time.

Moreover, to make sure that upon interrupt all mbufs will be freed,
whole ring is being cleaned up instead of part of it - originally only
range between head and tail was being cleaned up.

Fixes: 1173fca25af9 ("ena: add polling-mode driver")
Cc: stable@dpdk.org
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
7 years agonet/i40e: support VLAN stripping for VF
Beilei Xing [Tue, 4 Jul 2017 08:26:16 +0000 (16:26 +0800)]
net/i40e: support VLAN stripping for VF

VLAN stripping configuration is supported only for DPDK PF
previously. Since kernel PF supports VLAN stripping now, this
patch adds VLAN stripping support for both DPDK PF and kernel
PF.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
7 years agonet/qede: update PMD version to 2.5.1.1
Rasesh Mody [Sat, 1 Jul 2017 19:30:02 +0000 (12:30 -0700)]
net/qede: update PMD version to 2.5.1.1

Update the PMD version.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede: add missing check for VNI
Rasesh Mody [Sat, 1 Jul 2017 19:30:01 +0000 (12:30 -0700)]
net/qede: add missing check for VNI

Add missing check for VNI field while adding unicast filter.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede: set mdump flag
Rasesh Mody [Sat, 1 Jul 2017 19:30:00 +0000 (12:30 -0700)]
net/qede: set mdump flag

Set allow management FW dump flag during HW prepare.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede: change debug verbosity of messages
Rasesh Mody [Sat, 1 Jul 2017 19:29:59 +0000 (12:29 -0700)]
net/qede: change debug verbosity of messages

Convert DP_NOTICE() to DP_ERR() as appropriate in PMD files.
Change DP_NOTICE() macro to make use of boolean flag to log
it as error message or informational message.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede: add comments traces and format changes
Rasesh Mody [Sat, 1 Jul 2017 19:29:58 +0000 (12:29 -0700)]
net/qede: add comments traces and format changes

Changes include
 - comment modifications
 - adds tracing during initialization
 - adds/removes new lines

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede: limit ring size to 32k
Harish Patil [Sat, 1 Jul 2017 19:29:57 +0000 (12:29 -0700)]
net/qede: limit ring size to 32k

Since nb_max is a u16 it can store value up to 65535 only (not 64K),
but this value is not a power-of-2. So limit the ring sizes to 32K.

Signed-off-by: Harish Patil <harish.patil@cavium.com>
7 years agonet/qede: add notifying HW errors
Harish Patil [Sat, 1 Jul 2017 19:29:56 +0000 (12:29 -0700)]
net/qede: add notifying HW errors

Log HW errmsg on the stdout and do minimal handling to prevent HW
attentions from being reasserted.

Signed-off-by: Harish Patil <harish.patil@cavium.com>
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede: fix DMA memory leak
Harish Patil [Sat, 1 Jul 2017 19:29:55 +0000 (12:29 -0700)]
net/qede: fix DMA memory leak

Implement the macro OSAL_DMA_FREE_COHERENT to release DMA memories.
Track all DMA memory allocations using an array of memzone pointers and
use that to free memory resources along with other resource deallocation.
With this change there is no need to alter the base code to additionally
pass an unique string needed for memzone creation.

Fixes: ec94dbc57362 ("qede: add base driver")
Cc: stable@dpdk.org
Signed-off-by: Harish Patil <harish.patil@cavium.com>
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/bonding: use ethdev API to get socket
Jan Blunck [Fri, 30 Jun 2017 14:34:49 +0000 (15:34 +0100)]
net/bonding: use ethdev API to get socket

The bonded device does not have to be a PCI device. Use the rte_ethdev
functions instead.

Signed-off-by: Wen Chiu <wchiu@brocade.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Jan Blunck <jblunck@infradead.org>
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
7 years agonet/bonding: avoid allocating mempool on unknown socket
Eric Kinzie [Fri, 30 Jun 2017 14:34:48 +0000 (15:34 +0100)]
net/bonding: avoid allocating mempool on unknown socket

If the numa node is unknown, use the value from rte_socket_id() to avoid
an allocation failure.

Signed-off-by: Eric Kinzie <ekinzie@brocade.com>
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
7 years agonet/qede: add Tx offloads for MPLS-in-UDP packets
Harish Patil [Tue, 27 Jun 2017 07:21:32 +0000 (00:21 -0700)]
net/qede: add Tx offloads for MPLS-in-UDP packets

Add support for inner/outer L3/L4 TX csum offload for MPLS-in-UDP packets.
The driver checks for PKT_TX_TUNNEL_MPLSINUDP in Tx ol_flags and updates TX
BD elements with appropriate offsets/length of tunnel headers.
The pseudo csum calculation is removed from qede_xmit_prep_pkts() since its
not needed.

Signed-off-by: Harish Patil <harish.patil@cavium.com>
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agombuf: introduce new Tx offload flag for MPLS-in-UDP
Harish Patil [Tue, 27 Jun 2017 07:21:31 +0000 (00:21 -0700)]
mbuf: introduce new Tx offload flag for MPLS-in-UDP

Some PMDs need to know the tunnel type in order to handle advance TX
features. This patch adds a new TX offload flag for MPLS-in-UDP packets.

Signed-off-by: Harish Patil <harish.patil@cavium.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
7 years agonet/bnxt: fix copy/pasted error message
Ajit Khaparde [Fri, 30 Jun 2017 14:20:21 +0000 (09:20 -0500)]
net/bnxt: fix copy/pasted error message

Fix an error message. Probably a copy/paste error.

Fixes: 36735a932ca7 ("net/bnxt: support set VF QOS and MAC anti spoof")

Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
7 years agonet/bnxt: fix set link config
Ajit Khaparde [Fri, 30 Jun 2017 14:20:20 +0000 (09:20 -0500)]
net/bnxt: fix set link config

bnxt_hwrm_port_phy_cfg() was not setting enables appropriately.
This was causing undesired issues with link config.
This patch takes care of that.

Fixes: 7bc8e9a227cc ("net/bnxt: support async link notification")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
7 years agonet/bnxt: fix autoneg on 10GBase-T links
Ajit Khaparde [Fri, 30 Jun 2017 14:20:19 +0000 (09:20 -0500)]
net/bnxt: fix autoneg on 10GBase-T links

We are not passing proper speed mask causing autoneg to not work
properly on 10GBase-T links. Use supported speeds from phy_qcfg
for auto mask to fix this.

Fixes: 7bc8e9a227cc ("net/bnxt: support async link notification")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
7 years agonet/bnxt: fix get link config
Ajit Khaparde [Fri, 30 Jun 2017 14:20:18 +0000 (09:20 -0500)]
net/bnxt: fix get link config

This patch fixes the get link configuration code.
bnxt_get_hwrm_link_config was using wrong macros and wrongly
deriving link speed based on link status which was causing
incorrect link information to be displayed in few scenarios.

Fixes: 7bc8e9a227cc ("net/bnxt: support async link notification")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
7 years agonet/bnxt: fix automatic clearing of VF stats
Ajit Khaparde [Fri, 30 Jun 2017 14:20:17 +0000 (09:20 -0500)]
net/bnxt: fix automatic clearing of VF stats

Add code to avoid automatic clearing of VF stats on a function
reset or a stat context free.

Add rte_pmd_bnxt_set_vf_persist_stats() PMD specific API.

Fixes: dd46c6bbd5d6 ("net/bnxt: support get and clear VF specific stats")

Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
7 years agonet/bnxt: enable default VNIC allocation
Ajit Khaparde [Fri, 30 Jun 2017 14:20:16 +0000 (09:20 -0500)]
net/bnxt: enable default VNIC allocation

Previously, no VNICs were allocated as the default VNIC,
even if they were configured as one.  This patch fixes that error.

Fixes: db678d5c2b54 ("net/bnxt: add HWRM VNIC configure")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
7 years agonet/bnxt: fix calculation of VNICs
Ajit Khaparde [Fri, 30 Jun 2017 14:20:15 +0000 (09:20 -0500)]
net/bnxt: fix calculation of VNICs

We used the default as a work-around for the 4-byte MTU VNICs,
but we filter those out now. So fix the calculation of VNICs
accordingly.

Fixes: ff63ebbb67a7 ("net/bnxt: determine the Rx status of VF")

Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
7 years agonet/bnxt: fix MTU configuration
Ajit Khaparde [Fri, 30 Jun 2017 14:20:14 +0000 (09:20 -0500)]
net/bnxt: fix MTU configuration

Set the MTU of the device to MAX size possible.

Fixes: b7778e8a1c00 ("net/bnxt: refactor to properly allocate resources for PF/VF")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
7 years agonet/bnxt: support Stratus VF device
Ajit Khaparde [Fri, 30 Jun 2017 14:20:13 +0000 (09:20 -0500)]
net/bnxt: support Stratus VF device

This patch adds support for Stratus VF devices.
Other than adding the VF device ID, we also are adding
support for short message format.

The new short firmware message of size 16 bytes points to a location
in host memory that contains the firmware message that the driver
wants the adapter to process. This indirection requires the
firmware to DMA the message into its own memory for processing.

When the firmware receives a Short Command Format, it will DMA the
firmware message from host memory into its internal memory and then
processes the message as it would have if it received the message
directly in the firmware communication channel.

With BCM57454, the number of VFs increase to 1K and so the requirement
for firmware communication channel memory on adapter becomes expensive.
The short firmware message saves the amount of memory required to support
1K VFs on adapter.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
7 years agonet/mlx: update C compliance standard
Adrien Mazarguil [Fri, 30 Jun 2017 17:19:08 +0000 (19:19 +0200)]
net/mlx: update C compliance standard

This commit addresses a compilation issue against Glibc >= 2.25, which
implements assert() through a nonstandard ({ }) construct. Such constructs
can normally not be used without __extension__ keyword when -pedantic is
enabled, as is the case when compiling mlx4 and mlx5 PMDs in debug mode.

While assert.h checks for the compiler ability to support GNU extensions,
Clang, unlike GCC, does not allow the above syntax when combining
-std=gnu99 with -pedantic.

Work around missing keyword by moving these PMDs to a stricter compliance
standard without GNU extensions but properly checked by Glibc. Doing so is
supported on the DPDK side since includes have been cleaned up.

Even in C11, using types other than _Bool or signed/unsigned int for
bit-fields is an extension. Some GCC versions complain about that when
-pedantic checks are enabled.

The RTE_STD_C11 macro correctly prevented this issue with C99 but not with
C11 as it becomes a no-op. Forcing the extension keyword addresses it.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Tested-by: Yongseok Koh <yskoh@mellanox.com>
7 years agonet/bonding: change link status check to no-wait
Declan Doherty [Wed, 28 Jun 2017 10:15:50 +0000 (11:15 +0100)]
net/bonding: change link status check to no-wait

In 2 modes (802.3ad and TLB) of the link bonding driver, monitoring of
link status is used to determine the active slaves to use. These
functions are currently using the rte_link_link_get which could block
for up to 9 seconds, depending on the slave device.

In the 802.3ad periodic callback and in the TLB slave callback the
link status of slaves are checked using rte_eth_link_get function.

This patch changes to the no-wait version of the link get function to
avoid the possible issues which could be introduced if this call was
to block for an extended period of time.

Fixes: 46fb43683679 ("bond: add mode 4")
Fixes: 7c76a747e68c ("bond: add mode 5")
Cc: stable@dpdk.org
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
7 years agonet/i40e: fix division by 0
Yong Wang [Fri, 23 Jun 2017 10:57:47 +0000 (06:57 -0400)]
net/i40e: fix division by 0

In function i40e_vsi_config_tc_queue_mapping(), if 'enabled_tcmap' is 0,
'total_tc' might be 0. Then 'total_tc' might be used in a division
by 0 in "qpnum_per_tc = i40e_align_floor(vsi->nb_qps / total_tc)".

Fix it by changing 'total_tc' from 0 to 1 just as func
i40e_vsi_update_queue_mapping() does.

Fixes: 4861cde46116 ("i40e: new poll mode driver")
Cc: stable@dpdk.org
Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/ixgbe: improve link state check on VF
Liang-Min Larry Wang [Wed, 28 Jun 2017 02:22:10 +0000 (10:22 +0800)]
net/ixgbe: improve link state check on VF

In current implementation, when checking VF link state, PF state
is checked too, although the function has a parameter to tell
if PF state checking is needed.
But in some scenario, user may not care about the PF state.
This patch enables the unused parameter to only check the VF
link state.

Signed-off-by: Liang-Min Larry Wang <liang-min.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
7 years agonet/ark: fix stats reset
John Miller [Wed, 28 Jun 2017 10:08:24 +0000 (06:08 -0400)]
net/ark: fix stats reset

Repairs a bug in the stats_reset where the wrong queue was
being passed into Tx reset.

Fixes: 727b3fe292bc ("net/ark: integrate PMD")
Cc: stable@dpdk.org
Signed-off-by: John Miller <john.miller@atomicrules.com>
7 years agonet/ark: support setting MTU
John Miller [Wed, 28 Jun 2017 10:08:23 +0000 (06:08 -0400)]
net/ark: support setting MTU

Allows a user extension to set a callback for the set_mtu
operation.

Signed-off-by: John Miller <john.miller@atomicrules.com>
7 years agonet/ark: allow unique user data for each port
John Miller [Wed, 28 Jun 2017 10:08:22 +0000 (06:08 -0400)]
net/ark: allow unique user data for each port

This change allows a user extension to provide unique private
callback data for all ports.

Arkville is a single-function multi-port device.  User_data resides
in the singleton Arkville structure.  This structure is shared across
all ports.

With this patch, we are providing a unique user pointer for each port
rather than a common pointer across multiple ports.

Signed-off-by: John Miller <john.miller@atomicrules.com>
7 years agonet/cxgbe: fix supported speed capabilities
Rahul Lakkireddy [Wed, 28 Jun 2017 04:37:41 +0000 (10:07 +0530)]
net/cxgbe: fix supported speed capabilities

Use port type to determine the supported speed capabilities.

Fixes: e274f5732225 ("ethdev: add speed capabilities")

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
7 years agonet/cxgbe: update supported port module types
Rahul Lakkireddy [Wed, 28 Jun 2017 04:37:40 +0000 (10:07 +0530)]
net/cxgbe: update supported port module types

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
7 years agonet/vmxnet3: preserve configured MAC address
George Wilkie [Thu, 15 Jun 2017 12:17:42 +0000 (08:17 -0400)]
net/vmxnet3: preserve configured MAC address

When starting a vmxnet3 device, it is always writing the permanent MAC
address, even if a different MAC address was configured.  Write from
the device data instead which holds the current one.

Signed-off-by: George Wilkie <gwilkie@brocade.com>
Acked-by: Shrikrishna Khare <skhare@vmware.com>
7 years agonet/vmxnet3: fix receive queue memory leak
Mandeep Rohilla [Thu, 15 Jun 2017 12:17:41 +0000 (08:17 -0400)]
net/vmxnet3: fix receive queue memory leak

This addresses an mbuf leak in an error condition during packet
receive.

Fixes: dfaff37fc46d ("vmxnet3: import new vmxnet3 poll mode driver implementation")
Cc: stable@dpdk.org
Signed-off-by: Mandeep Rohilla <mrohilla@brocade.com>
Acked-by: Shrikrishna Khare <skhare@vmware.com>
7 years agonet/vmxnet3: make event processing less noisy
Robert Shearman [Thu, 15 Jun 2017 12:16:11 +0000 (08:16 -0400)]
net/vmxnet3: make event processing less noisy

Make vmxnet3_process_events less noisy by removing logging when there
are no events to process and by making link, device-change and debug
events DEBUG level rather than ERR.

Change these to use PMD_DRV_LOG instead of PMD_INIT_LOG since they
don't happen at device init.

Signed-off-by: Robert Shearman <rshearma@brocade.com>
Acked-by: Shrikrishna Khare <skhare@vmware.com>
7 years agonet/vmxnet3: generate link-state change notifications
Robert Shearman [Thu, 15 Jun 2017 12:16:10 +0000 (08:16 -0400)]
net/vmxnet3: generate link-state change notifications

Generate link-state change notifications by listening to interrupts
generated by the device. Make use of the existing
vmxnet3_process_events function that was compiled out, but change it
to call vmxnet3_dev_link_update on a VMXNET3_ECR_LINK event and to not
be so noisy in its log messages.

Enable interrupts on starting the device, using a new helper function,
vmxnet3_enable_intr, based on vmxnet3_disable_intr and validated
against the FreeBSD driver.

Keep track of the number of interrupts registered for to avoid
hardcoding these in vmxnet3_enable/disable_intr and to provision for
any future rxq intr support.

Factor out the guts of vmxnet3_dev_link_update minus the started check
to allow the new function to be called from vmxnet3_dev_start in the
lsc-enabled case to ensure that the link state is correctly set from
the actual state at that point.

Signed-off-by: Robert Shearman <rshearma@brocade.com>
7 years agonet/vmxnet3: implement extended stats
Robert Shearman [Thu, 15 Jun 2017 12:16:09 +0000 (08:16 -0400)]
net/vmxnet3: implement extended stats

Implement xstats_get() to allow a number of driver-specific Tx and Rx
stats to be retrieved.

Signed-off-by: Robert Shearman <rshearma@brocade.com>
Acked-by: Shrikrishna Khare <skhare@vmware.com>
7 years agonet/vmxnet3: retain counters on restart
Nachiketa Prachanda [Thu, 15 Jun 2017 12:16:08 +0000 (08:16 -0400)]
net/vmxnet3: retain counters on restart

Most NICs like virtio, igb/ixgbe etc. don't reset counters on
dev_start and arguably this helps in monitoring the counters
across a longer time span with multiple device start/stops.
vmxnet3 behavior is opposite to that and counters are reset by
the host side implementation each time the device is restarted.

Change the driver to save the counters in its private context
before it is reset by writing CMD_ACTIVATE to REG_CMD.

Signed-off-by: Nachiketa Prachanda <nprachan@brocade.com>
Acked-by: Shrikrishna Khare <skhare@vmware.com>
7 years agonet/tap: restore state of remote device when closing
Thomas Monjalon [Tue, 27 Jun 2017 12:33:15 +0000 (14:33 +0200)]
net/tap: restore state of remote device when closing

When exiting a DPDK application, the TAP remote was left
with the link down even if it was initially up.

The device flags of the remote netdevice are saved when probing,
and restored when calling the close function.
The remote state is not set down when calling the stop function anymore.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
7 years agoapp/testpmd: enable DDP remove profile feature
Andrey Chilikin [Wed, 28 Jun 2017 08:15:27 +0000 (09:15 +0100)]
app/testpmd: enable DDP remove profile feature

New command 'ddp del (port) (profile_path)' removes previously
loaded profile and deletes it from the list of the loaded profiles.

Signed-off-by: Andrey Chilikin <andrey.chilikin@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
7 years agonet/i40e: extended list of operations for DDP processing
Andrey Chilikin [Wed, 28 Jun 2017 08:15:26 +0000 (09:15 +0100)]
net/i40e: extended list of operations for DDP processing

This patch adds ability to remove already loaded profile
or write profile without registering it

Signed-off-by: Andrey Chilikin <andrey.chilikin@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
7 years agoapp/testpmd: update DDP add command parameters
Andrey Chilikin [Tue, 27 Jun 2017 12:06:48 +0000 (13:06 +0100)]
app/testpmd: update DDP add command parameters

This patch adds optional output file path to 'ddp add' command:
'ddp add (port) (profile_path[,output_path])'

Signed-off-by: Andrey Chilikin <andrey.chilikin@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/i40e/base: update base code info
Jingjing Wu [Tue, 27 Jun 2017 13:29:18 +0000 (21:29 +0800)]
net/i40e/base: update base code info

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e: use set switch AQ instead of register setting
Jingjing Wu [Tue, 27 Jun 2017 13:29:17 +0000 (21:29 +0800)]
net/i40e: use set switch AQ instead of register setting

TPID can be set by set_switch_config aq, change the TPID setting
by set_switch_config on new FW release.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e/base: extend processing of DDP
Jingjing Wu [Tue, 27 Jun 2017 13:29:16 +0000 (21:29 +0800)]
net/i40e/base: extend processing of DDP

This patch adds extended processing of DDP packages:
 - Execution of adminq command sections to support AQ-depended profiles,
   for example, for programming cloud filters types.
 - Ability to write a profile without registering it in the list of
   applied profiles, to be used for AQ-depended profiles.
 - Profile rollback is implemented to support restoration of original
   parser/analyzer configuration without the need of core reset,
   for example, for deploying new profile without resetting device.
 - Search for a specific section in a profile, to be used by driver
   to access metadata sections with description of PCTYPE/PTYPEs
   defined in the profile.

Signed-off-by: Andrey Chilikin <andrey.chilikin@intel.com>
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e/base: add EEPROM checksum verification
Jingjing Wu [Tue, 27 Jun 2017 13:29:15 +0000 (21:29 +0800)]
net/i40e/base: add EEPROM checksum verification

This patch ensures PFs mutually exclusive access to NVM.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e/base: avoid reset timeout issue
Jingjing Wu [Tue, 27 Jun 2017 13:29:14 +0000 (21:29 +0800)]
net/i40e/base: avoid reset timeout issue

This patch allows detection of upcoming core reset in case NIC gets
stuck while performing FLR reset. The i40e_pf_reset() function returns
I40E_ERR_NOT_READY when global reset was detected.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e/base: avoid potential null pointer dereference
Jingjing Wu [Tue, 27 Jun 2017 13:29:13 +0000 (21:29 +0800)]
net/i40e/base: avoid potential null pointer dereference

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e/base: use admin queue for setting LEDs behavior
Jingjing Wu [Tue, 27 Jun 2017 13:29:12 +0000 (21:29 +0800)]
net/i40e/base: use admin queue for setting LEDs behavior

Instead of accessing register directly, use newly added AQC in
order to blink LEDs. Introduce and utilize a new flag to prevent
excessive API version checking.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e/base: support switch parameters
Jingjing Wu [Tue, 27 Jun 2017 13:29:11 +0000 (21:29 +0800)]
net/i40e/base: support switch parameters

Adds double VLAN tagging ethertype fields to Set Switch Parameters AQ
command.  These were added in firmware API 1.7.

Callers of i40e_aq_set_switch_config() can specify the ethertypes to
use by filling out the corresponding fields in struct i40e_hw.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e/base: update FW AQ API version to 1.7
Jingjing Wu [Tue, 27 Jun 2017 13:29:10 +0000 (21:29 +0800)]
net/i40e/base: update FW AQ API version to 1.7

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e/base: track id can be 0
Jingjing Wu [Tue, 27 Jun 2017 13:29:09 +0000 (21:29 +0800)]
net/i40e/base: track id can be 0

track_id == 0 is valid for “read only” profiles when
profile does not have any “write” commands.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e/base: report supported link modes
Jingjing Wu [Tue, 27 Jun 2017 13:29:08 +0000 (21:29 +0800)]
net/i40e/base: report supported link modes

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e/base: add new PHY types for 25G AOC and ACC
Jingjing Wu [Tue, 27 Jun 2017 13:29:07 +0000 (21:29 +0800)]
net/i40e/base: add new PHY types for 25G AOC and ACC

This patch adds new phy types for 25G Active Optical Cables (AOC) and
Active Copper Cables (ACC) support.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e/base: store the requested FEC information
Jingjing Wu [Tue, 27 Jun 2017 13:29:06 +0000 (21:29 +0800)]
net/i40e/base: store the requested FEC information

Store information about FEC modes, that were requested. It will be used
in printing link status information function and this way there is no
need to call admin queue there.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e/base: add support for Adaptive Virtual Function
Jingjing Wu [Tue, 27 Jun 2017 13:29:05 +0000 (21:29 +0800)]
net/i40e/base: add support for Adaptive Virtual Function

Add device id define and mac_type assignment needed for Adaptive
Virtual Function.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>