dpdk.git
7 years agonet/i40e: set VF TC max bandwidth from PF
Wenzhuo Lu [Fri, 24 Feb 2017 03:24:30 +0000 (11:24 +0800)]
net/i40e: set VF TC max bandwidth from PF

Set a specific TC's max bandwidth on a VF.
User can call the API to set VF TC's max bandwidth
from PF.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e: allocate VF TC bandwidth from PF
Wenzhuo Lu [Fri, 24 Feb 2017 03:24:29 +0000 (11:24 +0800)]
net/i40e: allocate VF TC bandwidth from PF

Allocate all TCs' relative bandwidth (percentage) on
a specific VF.
It can be taken as relative min bandwidth setting.
User can call the API to set VF TC's min bandwidth
from PF.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e: set VF max bandwidth from PF
Wenzhuo Lu [Fri, 24 Feb 2017 03:24:28 +0000 (11:24 +0800)]
net/i40e: set VF max bandwidth from PF

Support setting VF max bandwidth from PF.
User can call the API on PF to set a specific VF's
max bandwidth.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agodoc: add liquidio
Shijith Thotton [Sat, 25 Mar 2017 06:24:57 +0000 (11:54 +0530)]
doc: add liquidio

Add liquidio driver documentation and update 17.05 release notes.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
7 years agonet/liquidio: add API to add and remove VLAN port
Shijith Thotton [Sat, 25 Mar 2017 06:24:56 +0000 (11:54 +0530)]
net/liquidio: add API to add and remove VLAN port

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
7 years agonet/liquidio: add API to close device
Shijith Thotton [Sat, 25 Mar 2017 06:24:55 +0000 (11:54 +0530)]
net/liquidio: add API to close device

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
7 years agonet/liquidio: add API to stop device
Shijith Thotton [Sat, 25 Mar 2017 06:24:54 +0000 (11:54 +0530)]
net/liquidio: add API to stop device

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
7 years agonet/liquidio: add APIs for hardware stats
Shijith Thotton [Sat, 25 Mar 2017 06:24:53 +0000 (11:54 +0530)]
net/liquidio: add APIs for hardware stats

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
7 years agonet/liquidio: support Tx stats
Shijith Thotton [Sat, 25 Mar 2017 06:24:52 +0000 (11:54 +0530)]
net/liquidio: support Tx stats

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
7 years agonet/liquidio: support Rx stats
Shijith Thotton [Sat, 25 Mar 2017 06:24:51 +0000 (11:54 +0530)]
net/liquidio: support Rx stats

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
7 years agonet/liquidio: add APIs to configure UDP tunnel port
Shijith Thotton [Sat, 25 Mar 2017 06:24:50 +0000 (11:54 +0530)]
net/liquidio: add APIs to configure UDP tunnel port

Add APIs to configure VXLAN port and enable tunnel checksum.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
7 years agonet/liquidio: add APIs to set link up and down
Shijith Thotton [Sat, 25 Mar 2017 06:24:49 +0000 (11:54 +0530)]
net/liquidio: add APIs to set link up and down

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
7 years agonet/liquidio: add APIs to enable and disable multicast
Shijith Thotton [Sat, 25 Mar 2017 06:24:48 +0000 (11:54 +0530)]
net/liquidio: add APIs to enable and disable multicast

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
7 years agonet/liquidio: add API to validate VF MTU
Shijith Thotton [Sat, 25 Mar 2017 06:24:47 +0000 (11:54 +0530)]
net/liquidio: add API to validate VF MTU

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
7 years agonet/liquidio: add API to get device info
Shijith Thotton [Sat, 25 Mar 2017 06:24:46 +0000 (11:54 +0530)]
net/liquidio: add API to get device info

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
7 years agonet/liquidio: support RSS
Shijith Thotton [Sat, 25 Mar 2017 06:24:45 +0000 (11:54 +0530)]
net/liquidio: support RSS

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
7 years agonet/liquidio: add API to control Rx
Shijith Thotton [Sat, 25 Mar 2017 06:24:44 +0000 (11:54 +0530)]
net/liquidio: add API to control Rx

Enable or disable packet reception.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
7 years agonet/liquidio: add APIs to alloc and send control command
Shijith Thotton [Sat, 25 Mar 2017 06:24:43 +0000 (11:54 +0530)]
net/liquidio: add APIs to alloc and send control command

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
7 years agonet/liquidio: add APIs to start device and update link
Shijith Thotton [Sat, 25 Mar 2017 06:24:42 +0000 (11:54 +0530)]
net/liquidio: add APIs to start device and update link

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
7 years agonet/liquidio: add API to release Tx queue
Shijith Thotton [Sat, 25 Mar 2017 06:24:41 +0000 (11:54 +0530)]
net/liquidio: add API to release Tx queue

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
7 years agonet/liquidio: add API to flush IQ
Shijith Thotton [Sat, 25 Mar 2017 06:24:40 +0000 (11:54 +0530)]
net/liquidio: add API to flush IQ

API to flush instruction queue checks how many packets reached device
and frees associated host buffers using request list.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
7 years agonet/liquidio: add Tx data path for multiple segments
Shijith Thotton [Sat, 25 Mar 2017 06:24:39 +0000 (11:54 +0530)]
net/liquidio: add Tx data path for multiple segments

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
7 years agonet/liquidio: add Tx data path for single segment
Shijith Thotton [Sat, 25 Mar 2017 06:24:38 +0000 (11:54 +0530)]
net/liquidio: add Tx data path for single segment

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
7 years agonet/liquidio: add APIs to enable and disable IO queues
Shijith Thotton [Sat, 25 Mar 2017 06:24:37 +0000 (11:54 +0530)]
net/liquidio: add APIs to enable and disable IO queues

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
7 years agonet/liquidio: add APIs for SG list
Shijith Thotton [Sat, 25 Mar 2017 06:24:36 +0000 (11:54 +0530)]
net/liquidio: add APIs for SG list

Add APIs to setup and free Scatter-Gather list. SG list is used while
sending packets with multiple segments.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
7 years agonet/liquidio: add API to setup Tx queue
Shijith Thotton [Sat, 25 Mar 2017 06:24:35 +0000 (11:54 +0530)]
net/liquidio: add API to setup Tx queue

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
7 years agonet/liquidio: add API to release Rx queue
Shijith Thotton [Sat, 25 Mar 2017 06:24:34 +0000 (11:54 +0530)]
net/liquidio: add API to release Rx queue

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
7 years agonet/liquidio: add Rx data path
Shijith Thotton [Sat, 25 Mar 2017 06:24:33 +0000 (11:54 +0530)]
net/liquidio: add Rx data path

Add APIs to receive packets and re-fill ring buffers.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
7 years agonet/liquidio: initialize Rx queue
Shijith Thotton [Sat, 25 Mar 2017 06:24:32 +0000 (11:54 +0530)]
net/liquidio: initialize Rx queue

Initialize Rx queue registers and allocate packet buffers for Rx queue.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
7 years agonet/liquidio: add API to setup Rx queue
Shijith Thotton [Sat, 25 Mar 2017 06:24:31 +0000 (11:54 +0530)]
net/liquidio: add API to setup Rx queue

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
7 years agonet/liquidio: add API to configure device
Shijith Thotton [Sat, 25 Mar 2017 06:24:30 +0000 (11:54 +0530)]
net/liquidio: add API to configure device

Add API to configure device and initialize ethernet device operations.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
7 years agonet/liquidio: add API to send packet to device
Shijith Thotton [Sat, 25 Mar 2017 06:24:29 +0000 (11:54 +0530)]
net/liquidio: add API to send packet to device

Add API to send control and data packets to device. Request list keeps
track of host buffers to be freed till it reaches device.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
7 years agonet/liquidio: add APIs for response list
Shijith Thotton [Sat, 25 Mar 2017 06:24:28 +0000 (11:54 +0530)]
net/liquidio: add APIs for response list

Add APIs to setup and process response list. Response list holds soft
commands waiting for response from device. Entries of this list are
processed to check for command response or timeout.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
7 years agonet/liquidio: add APIs to allocate and free soft command
Shijith Thotton [Sat, 25 Mar 2017 06:24:27 +0000 (11:54 +0530)]
net/liquidio: add APIs to allocate and free soft command

Get buffers from SC buffer pool and create soft command. Buffers are
freed to the pool once the command reaches device.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
7 years agonet/liquidio: add APIs to allocate and free SC buffer pool
Shijith Thotton [Sat, 25 Mar 2017 06:24:26 +0000 (11:54 +0530)]
net/liquidio: add APIs to allocate and free SC buffer pool

Soft command (SC) holds device control command and related information.
SC buffer pool holds buffers which are used during soft command
allocation.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
7 years agonet/liquidio: add API to setup IQ
Shijith Thotton [Sat, 25 Mar 2017 06:24:25 +0000 (11:54 +0530)]
net/liquidio: add API to setup IQ

Map instruction queue registers and set queue size.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
7 years agonet/liquidio: add APIs to allocate and free IQ
Shijith Thotton [Sat, 25 Mar 2017 06:24:24 +0000 (11:54 +0530)]
net/liquidio: add APIs to allocate and free IQ

Instruction queue (IQ) is used to send control and data packets to
device from host. IQ 0 is used to send device configuration commands
during initialization and later re-allocated as per application
requirement.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
7 years agonet/liquidio: add API for VF FLR
Shijith Thotton [Sat, 25 Mar 2017 06:24:23 +0000 (11:54 +0530)]
net/liquidio: add API for VF FLR

VF sends Function Level Reset request to PF using mbox and PF does the
reset.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
7 years agonet/liquidio: add API for PF VF handshake
Shijith Thotton [Sat, 25 Mar 2017 06:24:22 +0000 (11:54 +0530)]
net/liquidio: add API for PF VF handshake

Handshake with PF kernel driver to check driver version compatibility.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
7 years agonet/liquidio: add API to setup mbox registers
Shijith Thotton [Sat, 25 Mar 2017 06:24:21 +0000 (11:54 +0530)]
net/liquidio: add API to setup mbox registers

Map and initialize mbox registers.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
7 years agonet/liquidio: add mbox APIs for PF VF communication
Shijith Thotton [Sat, 25 Mar 2017 06:24:20 +0000 (11:54 +0530)]
net/liquidio: add mbox APIs for PF VF communication

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
7 years agonet/liquidio: add API to setup IO queue registers
Shijith Thotton [Sat, 25 Mar 2017 06:24:19 +0000 (11:54 +0530)]
net/liquidio: add API to setup IO queue registers

Set default configuration values for input and output queue registers.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
7 years agonet/liquidio: add API to disable IO queues
Shijith Thotton [Sat, 25 Mar 2017 06:24:18 +0000 (11:54 +0530)]
net/liquidio: add API to disable IO queues

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
7 years agonet/liquidio: initialize
Shijith Thotton [Sat, 25 Mar 2017 06:24:17 +0000 (11:54 +0530)]
net/liquidio: initialize

Default device configuration and initialization code.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
7 years agonet/liquidio/base: read and write register
Shijith Thotton [Sat, 25 Mar 2017 06:24:16 +0000 (11:54 +0530)]
net/liquidio/base: read and write register

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
7 years agonet/liquidio: register VF
Shijith Thotton [Sat, 25 Mar 2017 06:24:15 +0000 (11:54 +0530)]
net/liquidio: register VF

Register LiquidIO PMD (net_liovf) and define APIs to init and uninit.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
7 years agonet/liquidio: add log
Shijith Thotton [Sat, 25 Mar 2017 06:24:14 +0000 (11:54 +0530)]
net/liquidio: add log

Add debug options to config file. Define macros used for log and make
use of config file options to enable them.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
7 years agonet/liquidio/base: add hardware register definitions
Shijith Thotton [Sat, 25 Mar 2017 06:24:13 +0000 (11:54 +0530)]
net/liquidio/base: add hardware register definitions

Add HW register definitions for LiquidIO II CN23XX adapter.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
7 years agonet/liquidio: add skeleton
Shijith Thotton [Sat, 25 Mar 2017 06:24:12 +0000 (11:54 +0530)]
net/liquidio: add skeleton

Add makefile and config file options to compile PMD. Add feature and
version map file. Update maintainers file to claim responsibility.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
7 years agonet/ixgbe: fix TC bandwidth setting
Wenzhuo Lu [Fri, 24 Mar 2017 02:51:03 +0000 (10:51 +0800)]
net/ixgbe: fix TC bandwidth setting

4 and 8 TCs are supported on ixgbe. By default there're
8 TCs. So when initializing the device, the bandwidth for
8 TCs is set.
When changing the TC number, it's only considered setting
the bandwidth for 4 TCs. If the user change the number
from 4 to 8, the TCs' bandwidth is not right.

Fixes: 0807f80d35d0 ("ixgbe: DCB / flow control")
Cc: stable@dpdk.org
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
7 years agonet/tap: add link status notification
Pascal Mazon [Wed, 22 Mar 2017 08:40:01 +0000 (09:40 +0100)]
net/tap: add link status notification

As tap is a virtual device, there's no physical way a link can be cut.
However, it has an associated kernel netdevice and possibly a remote
netdevice too. These netdevices link status may change outside of the
DPDK scope, through an external command such as:

  ip link set dev tapX down

This commit implements link status notification through netlink.

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
7 years agonet/tap: improve link update
Pascal Mazon [Wed, 22 Mar 2017 08:40:00 +0000 (09:40 +0100)]
net/tap: improve link update

Reflect device link status according to the state of the tap netdevice
and the remote netdevice (if any). If both are UP and RUNNING, then the
device link status is set to ETH_LINK_UP, otherwise ETH_LINK_DOWN.

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
7 years agonet/tap: add remote netdevice traffic capture
Pascal Mazon [Thu, 23 Mar 2017 08:42:11 +0000 (09:42 +0100)]
net/tap: add remote netdevice traffic capture

By default, a tap netdevice is of no use when not fed by a separate
process. The ability to automatically feed it from another netdevice
allows applications to capture any kind of traffic normally destined to
the kernel stack.

This patch implements this ability through a new optional "remote"
parameter.

Packets matching filtering rules created with the flow API are matched
on the remote device and redirected to the tap PMD, where the relevant
action will be performed.

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: Olga Shern <olgas@mellanox.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
7 years agonet/tap: support segmented mbufs
Pascal Mazon [Thu, 16 Mar 2017 08:59:21 +0000 (09:59 +0100)]
net/tap: support segmented mbufs

Support for segmented packets (scatter/gather) is mandatory for most
purposes, regardless of the MTU size. Tx packets are often the result of
mbuf concatenation, and an mbuf is not necessarily large enough for Rx
packets to fit in a single one.

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
7 years agonet/tap: do not send packets larger than MTU
Pascal Mazon [Wed, 15 Mar 2017 15:09:08 +0000 (16:09 +0100)]
net/tap: do not send packets larger than MTU

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
7 years agonet/thunderx: sync mailbox definitions with Linux PF driver
Jerin Jacob [Mon, 20 Mar 2017 14:10:40 +0000 (19:40 +0530)]
net/thunderx: sync mailbox definitions with Linux PF driver

- bgx_link_status mbox definition was changed in Linux
commit 1cc702591bae ("net: thunderx: Add ethtool support")
- NIC_MBOX_MSG_RES_BIT related changes were never part of Linux PF driver

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
7 years agonet/tap: add basic flow API patterns and actions
Pascal Mazon [Thu, 23 Mar 2017 08:33:57 +0000 (09:33 +0100)]
net/tap: add basic flow API patterns and actions

Supported flow rules are now mapped to TC rules on the tap netdevice.
The netlink message used for creating the TC rule is stored in struct
rte_flow. That way, by simply changing a metadata in it, we can require
for the rule deletion without further parsing.

Supported items:
- eth: src and dst (with variable masks), and eth_type (0xffff mask).
- vlan: vid, pcp, tpid, but not eid.
- ipv4/6: src and dst (with variable masks), and ip_proto (0xffff mask).
- udp/tcp: src and dst port (0xffff) mask.

Supported actions:
- DROP
- QUEUE
- PASSTHRU

It is generally not possible to provide a "last" item. However, if the
"last" item, once masked, is identical to the masked spec, then it is
supported.

Only IPv4/6 and MAC addresses can use a variable mask. All other
items need a full mask (exact match).

Support for VLAN requires kernel headers >= 4.9, checked using
auto-config.sh.

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: Olga Shern <olgas@mellanox.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
7 years agonet/tap: add netlink back-end for flow API
Pascal Mazon [Thu, 23 Mar 2017 08:33:56 +0000 (09:33 +0100)]
net/tap: add netlink back-end for flow API

Each kernel netdevice may have queueing disciplines set for it, which
determine how to handle the packet (mostly on egress). That's part of
the TC (Traffic Control) mechanism.

Through TC, it is possible to set filter rules that match specific
packets, and act according to what is in the rule. This is a perfect
candidate to implement the flow API for the tap PMD, as it has an
associated kernel netdevice automatically.

Each flow API rule will be translated into its TC counterpart.

To leverage TC, it is necessary to communicate with the kernel using
netlink. This patch introduces a library to help that communication.

Inside netlink.c, functions are generic for any netlink messaging.
Inside tcmsgs.c, functions are specific to deal with TC rules.

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: Olga Shern <olgas@mellanox.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
7 years agonet/tap: add preliminary support for flow API
Pascal Mazon [Thu, 23 Mar 2017 08:33:55 +0000 (09:33 +0100)]
net/tap: add preliminary support for flow API

The flow API provides the ability to classify packets received by a tap
netdevice.

This patch only implements skeleton functions for flow API support, no
patterns are supported yet.

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: Olga Shern <olgas@mellanox.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
7 years agonet/tap: move private elements to external header
Pascal Mazon [Thu, 23 Mar 2017 08:33:54 +0000 (09:33 +0100)]
net/tap: move private elements to external header

In the next patch, access to struct pmd_internals will be necessary in
tap_flow.c to store the flows.

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: Olga Shern <olgas@mellanox.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
7 years agonet/mlx5: fix reusing Rx/Tx queues
Yongseok Koh [Tue, 21 Mar 2017 17:50:51 +0000 (10:50 -0700)]
net/mlx5: fix reusing Rx/Tx queues

When configuring Rx/Tx queue, if queue already exists, it is reused. But if
the queue size is changed, it must be resized to not access/overwrite
invalid memory.

Fixes: 2e22920b85d9 ("mlx5: support non-scattered Tx and Rx")
Cc: stable@dpdk.org
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
7 years agonet/i40e: fix VLAN filter
Wenzhuo Lu [Wed, 22 Mar 2017 08:39:07 +0000 (16:39 +0800)]
net/i40e: fix VLAN filter

VLAN filter is not working on i40e because driver need to
disable the VLAN promiscuous mode and set the VLAN filter
table.

Fixes: 5f2b0e3f7656 ("net/i40e: set VF VLAN filter from PF")
Cc: stable@dpdk.org
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
7 years agonet/i40e/base: new AQ commands for cloud filter
Jingjing Wu [Wed, 22 Mar 2017 09:24:59 +0000 (17:24 +0800)]
net/i40e/base: new AQ commands for cloud filter

Add new admin queue function and extended fields for cloud filter:
 - Add admin queue function for Replace filter command (Opcode: 0x025F)
 - Define big buffer for extended general fields in Add/Remove
   Cloud filters command

Signed-off-by: Laura Stroe <laura.stroe@intel.com>
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e/base: add VF offload flags
Jingjing Wu [Wed, 22 Mar 2017 09:24:58 +0000 (17:24 +0800)]
net/i40e/base: add VF offload flags

This patch adds:
 - ENCAP offload negotiation flag. Use the existing ENCAP_CSUM offload
   flag to negotiate GSO_UDP_TUNNEL_CSUM capability and create new ENCAP
   flag for negotiating offloads for encapsulated packets
 - RX_ENCAP_CSUM offload negotiation flag for VF to negotiate RX
   checksum capability for tunnelled packet types.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e/base: reduce wait time for adminq command
Jingjing Wu [Wed, 22 Mar 2017 09:24:57 +0000 (17:24 +0800)]
net/i40e/base: reduce wait time for adminq command

When sending an adminq command, we wait for the command to complete in
a loop. This loop waits for an entire millisecond, when in practice the
adminq command is processed often much faster.

Change the loop to use i40e_usec_delay instead, and wait for 50 usecs
each time instead. This appears to be about the minimum time required,
based on some manual observation and testing.

The primary benefit of this change is reducing latency of various
operations in the PF driver, especially when related to having a large
number of VFs enabled.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e/base: new AQ commands for PPP
Jingjing Wu [Wed, 22 Mar 2017 09:24:56 +0000 (17:24 +0800)]
net/i40e/base: new AQ commands for PPP

Add admin queue functions for Pipeline Personalization Profile AQ
commands:
 - Write Recipe Command buffer (Opcode: 0x0270)
 - Get Applied Profiles list (Opcode: 0x0271)

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e/base: fix potential out of bound array access
Jingjing Wu [Wed, 22 Mar 2017 09:24:55 +0000 (17:24 +0800)]
net/i40e/base: fix potential out of bound array access

This is fix for klocwork issue where dcbcfg->numapps could
be greater than size of array (i.e dcbcfg->app[I40E_DCBX_MAX_APPS]).
The fix makes sure the array is not accessed past size of array
(i.e. I40E_DCBX_MAX_APPS).

Fixes: 166dceeeeafc ("i40e/base: add parsing for CEE DCBX TLVs")
Cc: stable@dpdk.org
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e/base: control register read/write on X722
Jingjing Wu [Wed, 22 Mar 2017 09:24:54 +0000 (17:24 +0800)]
net/i40e/base: control register read/write on X722

The X722 doesn't support the AQ command to read/write the control
register so enable it to bypass the check and use the direct read/write
method.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e/base: define bit for HW ATR evict control
Jingjing Wu [Wed, 22 Mar 2017 09:24:53 +0000 (17:24 +0800)]
net/i40e/base: define bit for HW ATR evict control

On X722, we can control whether or not the hardware performs ATR
eviction. Define the correct bit so we can twiddle it.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/bonding: reduce slave starvation on Rx poll
Keith Wiles [Tue, 21 Mar 2017 15:12:12 +0000 (10:12 -0500)]
net/bonding: reduce slave starvation on Rx poll

When polling the bonded ports for RX packets the old driver would
always start with the first slave in the list. If the requested
number of packets is filled on the first port in a two port config
then the second port could be starved or have larger number of
missed packet errors.

The code attempts to start with a different slave each time RX poll
is done to help eliminate starvation of slave ports. The effect of
the previous code was much lower performance for two slaves in the
bond then just the one slave.

The performance drop was detected when the application can not poll
the rings of Rx packets fast enough and the packets per second for
two or more ports was at the threshold throughput of the application.
At this threshold the slaves would see very little or no drops in
the case of one slave. Then enable the second slave you would see
a large drop rate on the two slave bond and reduction in throughput.

Signed-off-by: Keith Wiles <keith.wiles@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
7 years agonet/nfp: fix Rx interrupt
Alejandro Lucero [Tue, 21 Mar 2017 10:43:21 +0000 (10:43 +0000)]
net/nfp: fix Rx interrupt

Current code enables RX interrupts even if this it not
requested.

Fixes: ea121b28316d ("net/nfp: add Rx interrupts")
Cc: stable@dpdk.org
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
7 years agonet/nfp: fix packet/data length conversion
Alejandro Lucero [Tue, 21 Mar 2017 10:43:20 +0000 (10:43 +0000)]
net/nfp: fix packet/data length conversion

Chained mbufs hold data_len as the length of that particular mbuf
and pkt_len as the full packet length including all the chained
mbufs. It is not clear from the mbuf definition if pkt_len should
be set for all the mbufs in a chain, but code there for handling
mbufs suggests just the first mbuf requires to have pkt_len set.

NFP PMD was assuming pkt_len is set in all the chained mbufs and
unit tests for gather dma were building mbufs with pkt_len always
set. This patch gets rid of that assumption.

Fixes: b812daadad0d ("nfp: add Rx and Tx")
Cc: stable@dpdk.org
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
7 years agonet/nfp: clean Tx descriptor flags
Alejandro Lucero [Tue, 21 Mar 2017 10:43:19 +0000 (10:43 +0000)]
net/nfp: clean Tx descriptor flags

When LSO, not doing this can led to firmware disruption. It does
not show as error because TCP ends up sending data again later on.

Fixes: 9ba3d0ae2090 ("net/nfp: add TSO support")
Cc: stable@dpdk.org
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
7 years agonet/qede/base: fix to use NULL pointer
Rasesh Mody [Sat, 18 Mar 2017 06:57:50 +0000 (23:57 -0700)]
net/qede/base: fix to use NULL pointer

Use OSAL NULL where appropriate

Fixes: 22d07d939c3c ("net/qede/base: update")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: fix resource lock minimum value
Rasesh Mody [Sat, 18 Mar 2017 06:57:49 +0000 (23:57 -0700)]
net/qede/base: fix resource lock minimum value

Fixes: ababb5203de2 ("net/qede/base: semantic/formatting changes")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: fix sriov typo
Rasesh Mody [Sat, 18 Mar 2017 06:53:34 +0000 (23:53 -0700)]
net/qede/base: fix sriov typo

Typo in ecore_sriov.c; Ending line with , instead of ;

Fixes: 379cbb2c446a ("net/qede/base: semantic change")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: refactor return path
Rasesh Mody [Sat, 18 Mar 2017 06:53:33 +0000 (23:53 -0700)]
net/qede/base: refactor return path

No need to return - base on return at end of function.

Fixes: 22d07d939c3c ("net/qede/base: update")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: fix typo
Rasesh Mody [Sat, 18 Mar 2017 06:53:32 +0000 (23:53 -0700)]
net/qede/base: fix typo

Fixes: 22d07d939c3c ("net/qede/base: update")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: fix first VF index calculation
Rasesh Mody [Sat, 18 Mar 2017 06:53:31 +0000 (23:53 -0700)]
net/qede/base: fix first VF index calculation

When a server doesn't support ARI, VF offsets begin at a much higher
number. As a result, ecore miscalculates the first_vf_in_pf and
initialization fails since base driver incorrectly learns there are
no SBs for its VF [as its VFs are out of range].

Fixes: 22d07d939c3c ("net/qede/base: update")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: fix remove the unneeded conversion to LE
Rasesh Mody [Sat, 18 Mar 2017 06:53:30 +0000 (23:53 -0700)]
net/qede/base: fix remove the unneeded conversion to LE

Remove the unneeded conversion to LE when writing to the 32-bit
XSDM_REG_OPERATION_GEN register

Fixes: ec94dbc57362 ("qede: add base driver")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: fix to remove redundant memset
Rasesh Mody [Sat, 18 Mar 2017 06:53:29 +0000 (23:53 -0700)]
net/qede/base: fix to remove redundant memset

Fixes: 22d07d939c3c ("net/qede/base: update")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: fix out-of-bound memory access
Rasesh Mody [Sat, 18 Mar 2017 06:53:28 +0000 (23:53 -0700)]
net/qede/base: fix out-of-bound memory access

Fix out-of-bound memory access on Management FW interaction for
resource allocation

Fixes: 252b88b58f70 ("net/qede/base: add selftest and query sensor info")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: fix DORQ attention mask
Rasesh Mody [Sat, 18 Mar 2017 06:53:27 +0000 (23:53 -0700)]
net/qede/base: fix DORQ attention mask

Fix Doorbell Queue(DORQ) attention mask

Fixes: e6051bd6b07d ("qede: add interrupt handling support")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: fix printout
Rasesh Mody [Sat, 18 Mar 2017 06:53:26 +0000 (23:53 -0700)]
net/qede/base: fix printout

Fixes: ec94dbc57362 ("qede: add base driver")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: add attention bits for AH chip
Rasesh Mody [Sat, 18 Mar 2017 06:53:25 +0000 (23:53 -0700)]
net/qede/base: add attention bits for AH chip

add attention bits for CHIP_NUM_AH_xxx

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: fix to prevent VF promisc config
Rasesh Mody [Sat, 18 Mar 2017 06:50:23 +0000 (23:50 -0700)]
net/qede/base: fix to prevent VF promisc config

VFs are seeing the number of MACs available to them as '0',
and as a result configure themselves as PROMISC. This fix is to
prevent that.

Fixes: 86a2265e59d7 ("qede: add SRIOV support")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: fix index printing of multi-bit attentions
Rasesh Mody [Sat, 18 Mar 2017 06:50:22 +0000 (23:50 -0700)]
net/qede/base: fix index printing of multi-bit attentions

Fix the logic for identifying which bit amongst the Multi-bit
attention sources is set.

Fixes: e6051bd6b07d ("qede: add interrupt handling support")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: fix numbering L2 VF queues
Rasesh Mody [Sat, 18 Mar 2017 06:50:21 +0000 (23:50 -0700)]
net/qede/base: fix numbering L2 VF queues

There are some constellations where Due to lack of resource allocation
in MFW, There would be an insufficient number of L2 queues for all the
VFs.

This introduces a new feature ECORE_VF_L2_QUE which correctly numbers
the number of VF queues. Notice it might be larger than the actual
number of VFs in configuration space, in which case its the ecore
client responsibility not to try activating that many.

As part of the fix, also correct the nubmering of the VF queues. As
their numbering is dependent on the SBs of the PF, which might only be
partially used by L2 [as half would be assigned for RDMA which doesn't
require L2 queues], we make the numbering consecutive with that of the
L2 queues only.

Fixes: ec94dbc57362 ("qede: add base driver")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: fix VF init after malicious VF FLR
Rasesh Mody [Sat, 18 Mar 2017 06:50:20 +0000 (23:50 -0700)]
net/qede/base: fix VF init after malicious VF FLR

Fix VF init after malicious VF FLR.

Fixes: 40c926ba2626 ("net/qede/base: support to initiate PF FLR")
Fixes: 86a2265e59d7 ("qede: add SRIOV support")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: fix printout
Rasesh Mody [Sat, 18 Mar 2017 06:50:19 +0000 (23:50 -0700)]
net/qede/base: fix printout

Prints in ecore_get_dev_info showed only chip revision,
and did that as number instead of letter.
I.e.,  BB A0 --> BB0, BB B0 --> BB1, AH A0 --> AH0, AH A1 --> AH0.

Correct the printing scheme into
{AH, BB} {A, B}{0, 1}

Fixes: ec94dbc57362 ("qede: add base driver")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: fix TM block ILT initialization
Rasesh Mody [Sat, 18 Mar 2017 06:50:18 +0000 (23:50 -0700)]
net/qede/base: fix TM block ILT initialization

Fix Timer(TM) block Internal Lookup Table(or ILT for logical to
physical address translation) initialization for SRIOV's coexistence
with other protocols.

Fixes: ec94dbc57362 ("qede: add base driver")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: fix forcing driver default resc allocation
Rasesh Mody [Sat, 18 Mar 2017 06:50:17 +0000 (23:50 -0700)]
net/qede/base: fix forcing driver default resc allocation

Remove the forcing of the driver's default resource allocation.

Fixes: 77f7222124de ("net/qede: add PCI ids for new chip variant")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: fix to set pointers to NULL after freeing
Rasesh Mody [Sat, 18 Mar 2017 06:50:16 +0000 (23:50 -0700)]
net/qede/base: fix to set pointers to NULL after freeing

Set pointers to NULL after freeing the allocations. Change OSAL_FREE
macro to take care of this and cleanup relevant code.

Fixes: 26ae839d06e9 ("qede: add DCBX support")
Fixes: ec94dbc57362 ("qede: add base driver")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: fix incorrect typecasting of flag
Rasesh Mody [Sat, 18 Mar 2017 06:48:36 +0000 (23:48 -0700)]
net/qede/base: fix incorrect typecasting of flag

dcbx-update-flag is incorrectly converted to boolean before assigining
it to ramrod data, fix this typecasting. Also, added more debug
messages in the dcbx code paths.

Fixes: 26ae839d06e9 ("qede: add DCBX support")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/sfc: implement simple EF10 native Tx datapath
Andrew Rybchenko [Mon, 20 Mar 2017 10:15:19 +0000 (10:15 +0000)]
net/sfc: implement simple EF10 native Tx datapath

The datapath does not support VLAN insertion, TSO and multi-segment
mbufs.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
7 years agonet/sfc: make multi-segment support a Tx datapath feature
Andrew Rybchenko [Mon, 20 Mar 2017 10:15:18 +0000 (10:15 +0000)]
net/sfc: make multi-segment support a Tx datapath feature

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
7 years agonet/sfc: implement EF10 native Tx datapath
Andrew Rybchenko [Mon, 20 Mar 2017 10:15:17 +0000 (10:15 +0000)]
net/sfc: implement EF10 native Tx datapath

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: David Riddoch <driddoch@solarflare.com>
7 years agonet/sfc: make TSO a datapath-dependent feature
Andrew Rybchenko [Mon, 20 Mar 2017 10:15:16 +0000 (10:15 +0000)]
net/sfc: make TSO a datapath-dependent feature

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
7 years agonet/sfc: make VLAN insertion a datapath-dependent feature
Andrew Rybchenko [Mon, 20 Mar 2017 10:15:15 +0000 (10:15 +0000)]
net/sfc: make VLAN insertion a datapath-dependent feature

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
7 years agonet/sfc: factor out libefx-based Tx datapath
Andrew Rybchenko [Mon, 20 Mar 2017 10:15:14 +0000 (10:15 +0000)]
net/sfc: factor out libefx-based Tx datapath

Split control and datapath to make datapath substitutable and
possibly reusable with alternative control path.

libefx-based Tx datapath is bound to libefx control path, but
it should be possible to use other datapaths with alternative
control path(s).

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>