Nelson Escobar [Thu, 16 Jun 2016 19:19:05 +0000 (12:19 -0700)]
net/enic: support scattered Rx
For performance reasons, this patch uses 2 VIC RQs per RQ presented to
DPDK.
The VIC requires that each descriptor be marked as either a start of
packet (SOP) descriptor or a non-SOP descriptor. A one RQ solution
requires skipping descriptors when receiving small packets and results
in bad performance when receiving many small packets.
The 2 RQ solution makes use of the VIC feature that allows a receive
on primary queue to 'spill over' into another queue if the receive is
too large to fit in the buffer assigned to the descriptor on the
primary queue. This means that there is no skipping of descriptors
when receiving small packets and results in much better performance.
Signed-off-by: Nelson Escobar <neescoba@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
Beilei Xing [Thu, 16 Jun 2016 13:36:28 +0000 (21:36 +0800)]
net/e1000: configure outer VLAN TPID field
This patch enables configuring the outer TPID for double VLAN.
Note that all other TPID values, for single VLANs or inner VLAN in the
QinQ case, are read only.
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Harish Patil [Thu, 16 Jun 2016 05:47:11 +0000 (22:47 -0700)]
net/qede: update version to 8.7.9.0_1.1.0.1
Signed-off-by: Harish Patil <harish.patil@qlogic.com>
Sony Chacko [Thu, 16 Jun 2016 05:47:10 +0000 (22:47 -0700)]
net/qede: enable VF-VF traffic with unmatched dest address
This patch enables VF to VF traffic with unmatched destination addresses.
The steps to enable this are:
- Enable promiscuous mode filter settings.
- Check for VF mode and enable promiscuous mode settings for VF.
- Check filter configuration to ensure conflicting filter modes
are not set.
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Harish Patil [Thu, 16 Jun 2016 05:47:09 +0000 (22:47 -0700)]
net/qede: support 100G
- Add device id to the PCI table
- Add polling for the slowpath events for CMT mode device
- Add prerequisites to allow 100g mode
* Min number of queues needed is 2
* Only even number of queues are allowed
- Update documentation
Signed-off-by: Harish Patil <harish.patil@qlogic.com>
Sony Chacko [Thu, 16 Jun 2016 05:47:07 +0000 (22:47 -0700)]
net/qede: set MTU
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
[NIC overview doc update]
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Sony Chacko [Thu, 16 Jun 2016 05:47:06 +0000 (22:47 -0700)]
net/qede: query RSS redirection table
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Sony Chacko [Thu, 16 Jun 2016 05:47:05 +0000 (22:47 -0700)]
net/qede: update RSS redirection table
Add support for configuring the RSS redirection table and update
corresponding documentation.
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Sony Chacko [Thu, 16 Jun 2016 05:47:04 +0000 (22:47 -0700)]
net/qede: get RSS hash configuration
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Sony Chacko [Thu, 16 Jun 2016 05:47:03 +0000 (22:47 -0700)]
net/qede: support RSS hash configuration
Add support for setting hash configuration based on adapter capability
and update corresponding NIC documentation.
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Konstantin Ananyev [Wed, 15 Jun 2016 12:58:37 +0000 (13:58 +0100)]
net/ixgbe: fix missed packet types on Rx
ixgbe PMD RX function(s) misses some packet types that are:
- correctly recognised by the underlying HW.
- marked as supported by ixgbe_dev_supported_ptypes_get().
Fixes:
9586ebd358d5 ("ixgbe: replace some offload flags with packet type")
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Tested-by: Olivier Matz <olivier.matz@6wind.com>
Chen Jing D(Mark) [Wed, 8 Jun 2016 08:43:50 +0000 (16:43 +0800)]
doc: remove Match Interface in fm10k guide
Intel stopped supporting Match Interface, remove reference to it in the
documentation.
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Nelson Escobar [Tue, 14 Jun 2016 23:55:34 +0000 (16:55 -0700)]
net/enic: fix releasing mbufs when tearing down Rx queue
When trying to release the mbufs, the function was incorrectly
iterating over the max size configured instead of the actual size
of the ring.
Fixes:
947d860c821f ("enic: improve Rx performance")
Signed-off-by: Nelson Escobar <neescoba@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
Nelson Escobar [Tue, 14 Jun 2016 23:54:05 +0000 (16:54 -0700)]
net/enic: improve packet type identification
- add l4 ptypes to the ones we report as supporting
- report/use RTE_PTYPE_L3_IPV4_EXT_UNKNOWN and
RTE_PTYPE_L3_IPV6_EXT_UNKNOWN instead of RTE_PTYPE_L3_IPV4 and
RTE_PTYPE_L3_IPV6 as vic can't distinguish between packets with
extentions and those without extentions.
- correctly set the ptype bits set on packets that are both tcp/udp
and a frag
- set RTE_PTYPE_L4_NONFRAG on ip packets we know are not udp, tcp,
or fragments.
Fixes:
947d860c821f ("enic: improve Rx performance")
Signed-off-by: Nelson Escobar <neescoba@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
Zhe Tao [Tue, 14 Jun 2016 05:24:16 +0000 (13:24 +0800)]
net/i40e: fix offload flags for vector Rx
The flags for RSS and flow director are not set correctly in the vector
Rx function, so applications which use these flags will not work
correctly.
The problem is caused by incorrect constants for masking,
shuffling and shifting the descriptor bytes, to create the resultant
flags in the mbuf. Correcting the constants fixes the problem
Fixes:
9ed94e5bb04e ("i40e: add vector Rx")
Signed-off-by: Zhe Tao <zhe.tao@intel.com>
Reviewed-by: Piotr Azarewicz <piotrx.t.azarewicz@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Ricardo Salveti [Mon, 18 Apr 2016 03:06:06 +0000 (00:06 -0300)]
net/xenvirt: support dynamic page size
PAGE_SIZE constant is not defined on ARM since multiple values
are possible, so DPDK needs to dynamically get the page size.
Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Charles (Chas) Williams [Fri, 10 Jun 2016 22:18:52 +0000 (18:18 -0400)]
net/bnx2x: fix MSIX vector and VF resource counts
If MSIX is available, the vector count given by the table size is one
less than the actual count. This count also limits the receive and
transmit queue resources the VF can support.
Fixes:
540a211084a7 ("bnx2x: driver core")
Signed-off-by: Charles (Chas) Williams <ciwillia@brocade.com>
Acked-by: Harish Patil <harish.patil@qlogic.com>
Eric Kinzie [Fri, 27 May 2016 19:44:06 +0000 (12:44 -0700)]
app/test: add external state machine in mode 4
This adds test cases for exercising the external state machine API to
the mode 4 autotest.
Signed-off-by: Eric Kinzie <ehkinzie@gmail.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Eric Kinzie [Fri, 27 May 2016 19:44:05 +0000 (12:44 -0700)]
net/bonding: allow external state machine in mode 4
Provide functions to allow an external 802.3ad state machine to transmit
and receive LACPDUs and to set the collection/distribution flags on
slave interfaces.
Signed-off-by: Eric Kinzie <ehkinzie@gmail.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Eric Kinzie [Sat, 7 May 2016 03:45:24 +0000 (20:45 -0700)]
net/bonding: inherit maximum Rx packet length
Instead of a hard-coded maximum receive length, allow the bonded interface
to inherit this limit from the slave interfaces. This allows
an application that uses jumbo frames to pass realistic values to
rte_eth_dev_configure without causing an error.
Before the bonding interface is configured, allow slaves with any
max_rx_pktlen to be added and remember the lowest of these values as
a candidate value. During dev_configure, set the bond device's
max_rx_pktlen to the candidate value. After this point only slaves
with a max_rx_pktlen greater or equal to that of the bonding device
can be added.
If all slaves are removed, the bond device's pktlen is cleared.
Signed-off-by: Eric Kinzie <ehkinzie@gmail.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Jerin Jacob [Fri, 17 Jun 2016 13:29:53 +0000 (18:59 +0530)]
doc: add ThunderX nicvf
Updated doc/guides/nics/overview.rst, doc/guides/nics/thunderx.rst
and release notes
Changed "*" to "P" in overview.rst to capture the partially supported
feature as "*" creating alignment issues with Sphinx table
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Jerin Jacob [Fri, 17 Jun 2016 13:29:52 +0000 (18:59 +0530)]
net/thunderx: add device start/stop and close
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
Jerin Jacob [Fri, 17 Jun 2016 13:29:51 +0000 (18:59 +0530)]
net/thunderx: support Tx queue start and stop
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
Jerin Jacob [Fri, 17 Jun 2016 13:29:50 +0000 (18:59 +0530)]
net/thunderx: support Rx queue start and stop
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
Jerin Jacob [Fri, 17 Jun 2016 13:29:49 +0000 (18:59 +0530)]
net/thunderx: get Rx queue count
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
Jerin Jacob [Fri, 17 Jun 2016 13:29:48 +0000 (18:59 +0530)]
net/thunderx: query supported packet types
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
Jerin Jacob [Fri, 17 Jun 2016 13:29:47 +0000 (18:59 +0530)]
net/thunderx: add single and multi-segment Rx
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Jerin Jacob [Fri, 17 Jun 2016 13:29:46 +0000 (18:59 +0530)]
net/thunderx: add single and multi-segment Tx
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
Jerin Jacob [Fri, 17 Jun 2016 13:29:45 +0000 (18:59 +0530)]
net/thunderx: add statistics
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Jerin Jacob [Fri, 17 Jun 2016 13:29:44 +0000 (18:59 +0530)]
net/thunderx: support promiscuous mode
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
Jerin Jacob [Fri, 17 Jun 2016 13:29:43 +0000 (18:59 +0530)]
net/thunderx: support MTU configuration
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Jerin Jacob [Fri, 17 Jun 2016 13:29:42 +0000 (18:59 +0530)]
net/thunderx: support RSS and RETA query and update
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Jerin Jacob [Fri, 17 Jun 2016 13:29:41 +0000 (18:59 +0530)]
net/thunderx: add Tx queue setup and release
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
Jerin Jacob [Fri, 17 Jun 2016 13:29:40 +0000 (18:59 +0530)]
net/thunderx: add Rx queue setup and release
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Jerin Jacob [Fri, 17 Jun 2016 13:29:39 +0000 (18:59 +0530)]
net/thunderx: get device infos
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Jerin Jacob [Fri, 17 Jun 2016 13:29:38 +0000 (18:59 +0530)]
net/thunderx: support ethdev configure
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Jerin Jacob [Fri, 17 Jun 2016 13:29:37 +0000 (18:59 +0530)]
net/thunderx: support register dump
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
Jerin Jacob [Fri, 17 Jun 2016 13:29:36 +0000 (18:59 +0530)]
net/thunderx: add link status and update
Extended the nicvf_interrupt function to respond
NIC_MBOX_MSG_BGX_LINK_CHANGE mbox message from PF and update
struct rte_eth_link accordingly.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Jerin Jacob [Fri, 17 Jun 2016 13:29:35 +0000 (18:59 +0530)]
net/thunderx: add PMD skeleton
Introduce driver initialization and enable build infrastructure for
nicvf pmd driver.
By default, It is enabled only for defconfig_arm64-thunderx-*
config as it is an inbuilt NIC device.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
Jerin Jacob [Fri, 17 Jun 2016 13:29:34 +0000 (18:59 +0530)]
net/thunderx/base: add statistics
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
Jerin Jacob [Fri, 17 Jun 2016 13:29:33 +0000 (18:59 +0530)]
net/thunderx/base: add RSS and RETA configuration
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
Jerin Jacob [Fri, 17 Jun 2016 13:29:32 +0000 (18:59 +0530)]
net/thunderx/base: add hardware API
add nicvf hardware specific APIs for initialization and configuration.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
Jerin Jacob [Fri, 17 Jun 2016 13:29:31 +0000 (18:59 +0530)]
net/thunderx/base: add mailbox for PF/VF communication
DPDK nicvf driver doesn't have access to NIC's PF address space.
Introduce a mailbox mechanism to communicate with PF driver through
shared 128bit register interface.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
Jerin Jacob [Fri, 17 Jun 2016 13:29:30 +0000 (18:59 +0530)]
net/thunderx/base: implement platform abstraction
implement DPDK based platform abstraction for base code
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
Jerin Jacob [Fri, 17 Jun 2016 13:29:29 +0000 (18:59 +0530)]
net/thunderx/base: add HW register definitions
add HW register definitions of ThunderX inbuilt NIC
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
Jerin Jacob [Fri, 17 Jun 2016 13:29:28 +0000 (18:59 +0530)]
net/thunderx/base: add HW constants
add HW constants of ThunderX inbuilt NIC
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
Xiao Wang [Mon, 6 Jun 2016 09:00:47 +0000 (17:00 +0800)]
net/fm10k: fix promiscuous receive for VF
When app tries to change promisc/allmulti setting, fm10k will check if a
valid glort is acquired, and exit without doing anything if not.
For VFs, this glort value is not necessary, and so the check can be
removed. This saves having unnecessary failures of the API call, as well as
saving the time taken for the mailbox communication between VF and PF in
the case when the glort check passes.
Fixes:
df02ba864695 ("fm10k: support promiscuous mode")
Signed-off-by: Wang Xiao W <xiao.w.wang@intel.com>
Acked-by: Jing Chen <jing.d.chen@intel.com>
Olivier Matz [Mon, 13 Jun 2016 11:24:29 +0000 (13:24 +0200)]
net/xenvirt: fix build after mempool changes
The field elt_va_start has been removed from the mempool structure,
and it was not replaced in xenvirt.
Fix this by getting the mempool objects address by using the address of
the first memory chunk list.
Note that it won't work with mempool composed of several chunks,
but it was already the case before.
Fixes:
84121f197187 ("mempool: store memory chunks in a list")
Reported-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Ajit Khaparde [Wed, 15 Jun 2016 21:23:38 +0000 (14:23 -0700)]
net/bnxt: add flow control operations
Add flow_ctrl_get and flow_ctrl_set dev_ops.
Uses the bnxt_set_hwrm_link_config() HWRM API added in earlier patch.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Reviewed-by: David Christensen <david.christensen@broadcom.com>
Ajit Khaparde [Wed, 15 Jun 2016 21:23:37 +0000 (14:23 -0700)]
net/bnxt: add RSS hash configuration
Add rss_hash_update and rss_hash_conf_get dev_ops
Uses the bnxt_hwrm_vnic_rss_cfg() HWRM API added in the previous patch.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Reviewed-by: David Christensen <david.christensen@broadcom.com>
Ajit Khaparde [Wed, 15 Jun 2016 21:23:36 +0000 (14:23 -0700)]
net/bnxt: add RSS redirection table operations
Add code to Update/query reta dev_ops
Uses the bnxt_hwrm_vnic_rss_cfg() HWRM API added earlier.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Reviewed-by: David Christensen <david.christensen@broadcom.com>
Ajit Khaparde [Wed, 15 Jun 2016 21:23:35 +0000 (14:23 -0700)]
net/bnxt: add link state operations
Adds dev_ops to set link Up or Down as appropriate.
Uses the bnxt_set_hwrm_link_config() API added previously.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Reviewed-by: David Christensen <david.christensen@broadcom.com>
Ajit Khaparde [Wed, 15 Jun 2016 21:23:34 +0000 (14:23 -0700)]
net/bnxt: add MAC address
This patch adds dev_ops to Add/Remove MAC addresses.
These use the bnxt_hwrm_set_filter() defined previously
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Reviewed-by: David Christensen <david.christensen@broadcom.com>
Ajit Khaparde [Wed, 15 Jun 2016 21:23:33 +0000 (14:23 -0700)]
net/bnxt: free memory in close operation
This patch adds code to free all resources except the one corresponding
to HWRM, which are required to notify the HWRM that the driver is unloaded
(these are freed in uninit()).
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Reviewed-by: David Christensen <david.christensen@broadcom.com>
Ajit Khaparde [Wed, 15 Jun 2016 21:23:32 +0000 (14:23 -0700)]
net/bnxt: add multicast
This patch adds dev_ops to enable/disable multicast traffic.
Uses the bnxt_hwrm_cfa_l2_set_rx_mask() API added earlier.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Reviewed-by: David Christensen <david.christensen@broadcom.com>
Ajit Khaparde [Wed, 15 Jun 2016 21:23:31 +0000 (14:23 -0700)]
net/bnxt: add promiscuous mode
This patch adds the promiscuous mode enable and disable dev_ops.
Uses the bnxt_hwrm_cfa_l2_set_rx_mask() API added in an earlier commit.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Reviewed-by: David Christensen <david.christensen@broadcom.com>
Ajit Khaparde [Wed, 15 Jun 2016 21:23:30 +0000 (14:23 -0700)]
net/bnxt: add start/stop/link update operations
This patch adds code to add the start, stop and link update dev_ops.
Also adds wrapper functions like bnxt_init_chip(), bnxt_init_nic(),
bnxt_alloc_mem(), bnxt_free_mem()
The BNXT driver will now minimally pass traffic with testpmd.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Reviewed-by: David Christensen <david.christensen@broadcom.com>
Ajit Khaparde [Wed, 15 Jun 2016 21:23:29 +0000 (14:23 -0700)]
net/bnxt: query PHY configuration
Add HWRM calls to query the port's PHY and link configuration.
New HWRM call:
bnxt_hwrm_port_phy_qcfg
This command queries the PHY configuration for the port
Also adding helper function like bnxt_get_hwrm_link_config()
and bnxt_parse_hw_link_speed() parse the link state.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Reviewed-by: David Christensen <david.christensen@broadcom.com>
Ajit Khaparde [Wed, 15 Jun 2016 21:23:28 +0000 (14:23 -0700)]
net/bnxt: allocate rings and groups
Add a top level functions to initialize ring groups, and functions
to allocate and free all the rings via HWRM.
A ring group is identified by an index. It consists of Rx or Tx ring id,
completion ring id and a statistics context. Once a ring group is
initialized, use this group index while creating the rings in the ASIC
using the appropriate HWRM API added via earlier patches.
Functions added:
bnxt_free_cp_ring
Calls the HWRM function generic ring free with arguments specific
to a completion ring and sanitizes the host completion structure
bnxt_free_all_hwrm_rings
Frees all the HWRM allocated hardware rings
bnxt_free_all_hwrm_resources
Frees all the resources allocated via the HRM in the hardware
bnxt_alloc_hwrm_rings
Allocates all the HWRM rings needed in the current configuration
This should be the last functionality needed to add start/stop
device operations.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Reviewed-by: David Christensen <david.christensen@broadcom.com>
Ajit Khaparde [Wed, 15 Jun 2016 21:23:27 +0000 (14:23 -0700)]
net/bnxt: set L2 filters
New HWRM call:
bnxt_clear_hwrm_vnic_filters
This patch adds code to set and clear L2 filters from the
corresponding VNIC. These filters will determine the Rx flows
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Reviewed-by: David Christensen <david.christensen@broadcom.com>
Ajit Khaparde [Wed, 15 Jun 2016 21:23:26 +0000 (14:23 -0700)]
net/bnxt: free statistics context
Add function and associated structures and definitions to free
statistics context from the ASIC.
New HWRM call:
bnxt_hwrm_stat_ctx_free
This command is used to free a stat context.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Reviewed-by: David Christensen <david.christensen@broadcom.com>
Ajit Khaparde [Wed, 15 Jun 2016 21:23:25 +0000 (14:23 -0700)]
net/bnxt: add ring group alloc/free
Add HWRM API for ring group alloc/free functions, associated structs and
definitions.
This API allocates and does basic preparation for a ring group in ASIC.
A ring group is identified by an index. It consists of Rx ring id,
completion ring id and a statistics context.
New HWRM calls:
bnxt_hwrm_ring_grp_alloc
Allocates and does basic preparation for a ring group
bnxt_hwrm_ring_grp_free
Frees and does cleanup resources of a ring group
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Reviewed-by: David Christensen <david.christensen@broadcom.com>
Ajit Khaparde [Wed, 15 Jun 2016 21:23:24 +0000 (14:23 -0700)]
net/bnxt: add ring alloc/free
Add HWRM API calls to allocate and free TX, RX and Completion rings
in the hardware along with the associated structs and definitions.
This informs the hardware of how the specific rings were set up in the
host and allocates them in the HWRM, setting up the doorbell registers
etc. as needed, returning an ID for the ring.
Basic ring alloc/free calls:
bnxt_hwrm_ring_alloc
This command allocates and does basic preparation for a ring.
bnxt_hwrm_ring_free
This command is used to free a ring and associated resources.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Reviewed-by: David Christensen <david.christensen@broadcom.com>
Ajit Khaparde [Wed, 15 Jun 2016 21:23:23 +0000 (14:23 -0700)]
net/bnxt: add stats context allocation
Add HWRM API code to allocate a statistics context in the ASIC.
This API will be called by the previously submitted "add statistics
operations patch".
New HWRM call:
bnxt_hwrm_stat_ctx_alloc:
This command allocates and does basic preparation for a stat
context.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Reviewed-by: David Christensen <david.christensen@broadcom.com>
Ajit Khaparde [Wed, 15 Jun 2016 21:23:22 +0000 (14:23 -0700)]
net/bnxt: set L2 Rx mask
Add API to set/clear L2 Rx mask.
New HWRM calls:
bnxt_hwrm_cfa_l2_clear_rx_mask
bnxt_hwrm_cfa_l2_set_rx_mask
These HWRM APIs allow setting and clearing of Rx masks in L2 context
per VNIC.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Reviewed-by: David Christensen <david.christensen@broadcom.com>
Ajit Khaparde [Wed, 15 Jun 2016 21:23:21 +0000 (14:23 -0700)]
net/bnxt: configure RSS
New HWRM call:
bnxt_hwrm_vnic_rss_cfg:
Used to enable RSS configuration of the VNIC.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Reviewed-by: David Christensen <david.christensen@broadcom.com>
Ajit Khaparde [Wed, 15 Jun 2016 21:23:20 +0000 (14:23 -0700)]
net/bnxt: allow configuration of a VNIC
This patch adds APIs to allow configuration of a VNIC.
The functions alloc and free the Class of Service or COS and
Load Balance context corresponding to the VNIC in the chip.
New HWRM calls:
bnxt_hwrm_vnic_ctx_alloc:
Used to allocate COS/Load Balance context of VNIC
bnxt_hwrm_vnic_ctx_free:
Used to free COS/Load Balance context of VNIC
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Reviewed-by: David Christensen <david.christensen@broadcom.com>
Ajit Khaparde [Wed, 15 Jun 2016 21:23:19 +0000 (14:23 -0700)]
net/bnxt: add HWRM VNIC configure
This patch configures the properties and actions of the VNIC
allocated by vnic_alloc function from the previous patch.
bnxt_hwrm_vnic_cfg:
Configure the VNIC structure in hardware.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Reviewed-by: David Christensen <david.christensen@broadcom.com>
Ajit Khaparde [Wed, 15 Jun 2016 21:23:18 +0000 (14:23 -0700)]
net/bnxt: add HWRM VNIC free
In this patch we add a new HWRM API to free a VNIC.
New HWRM call:
bnxt_hwrm_vnic_free:
Frees a vnic allocated by the bnxt_hwrm_vnic_alloc() function.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Reviewed-by: David Christensen <david.christensen@broadcom.com>
Ajit Khaparde [Wed, 15 Jun 2016 21:23:17 +0000 (14:23 -0700)]
net/bnxt: add HWRM VNIC alloc
This requires a group info array in struct bnxt, so add that, we can save
the max size from the func_qcap response, and alloc/free in init/uninit
New HWRM call:
bnxt_hwrm_vnic_alloc:
Allocates a VNIC resource in the hardware.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Reviewed-by: David Christensen <david.christensen@broadcom.com>
Ajit Khaparde [Wed, 15 Jun 2016 21:23:16 +0000 (14:23 -0700)]
net/bnxt: add HWRM function reset command
Add bnxt_hwrm_func_reset() function and supporting structs and macros.
New HWRM calls:
bnxt_hwrm_func_reset:
This command puts the function into the reset state.
In the reset state, global and port related features of the
chip are not available.
This command resets a hardware function (PCIe function) and
frees any resources used by the function. This command initiated by
the driver prepare the function for re-use. This command may also be
initiated by a driver prior to doing it's own configuration.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Reviewed-by: David Christensen <david.christensen@broadcom.com>
Ajit Khaparde [Wed, 15 Jun 2016 21:23:15 +0000 (14:23 -0700)]
net/bnxt: allocate Rx/Tx and completion rings
Perform allocation and free()ing of ring and information structures
for the TX, RX, and completion rings. The previous patches had
so far provided top level stubs and generic ring support, while this
patch does the real allocation and freeing of the memory specific to
each different type of generic ring.
For example bnxt_init_tx_ring_struct() or bnxt_init_rx_ring_struct() is
now allocating memory based on the socked_id being provided.
bnxt_tx_queue_setup_op() or bnxt_rx_queue_setup_op() have gone through
some reformatting to perform a graceful cleanup in case memory
allocation fails.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Reviewed-by: David Christensen <david.christensen@broadcom.com>
Ajit Khaparde [Wed, 15 Jun 2016 21:23:14 +0000 (14:23 -0700)]
net/bnxt: add initial Rx code
This patch adds initial implementation of rx_pkt_burst() function for Rx.
bnxt_recv_pkts() is the top level function for doing Rx.
This patch also adds code to allocate rings in the ASIC.
For each Rx queue allocated in the PMD driver, a corresponding ring
in hardware will be created. Every time a frame is received a Rx ring
is selected based on the hardware configuration like RSS, MAC or VLAN,
COS and such. The hardware uses a completion ring to indicate the
availability of a packet.
This patch also brings in functions like bnxt_init_one_rx_ring()
bnxt_init_rx_ring_struct() which initializes various structures before
a Rx can begin.
bnxt_init_rxbds() initializes the Rx Buffer Descriptors while
bnxt_alloc_rx_data() allocates a buffer in the host to receive the
incoming packet.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Reviewed-by: David Christensen <david.christensen@broadcom.com>
Ajit Khaparde [Wed, 15 Jun 2016 21:23:13 +0000 (14:23 -0700)]
net/bnxt: add initial Tx code
Initial implementation of tx_pkt_burst for transmit.
bnxt_xmit_pkts() is the top level function that is called during Tx.
bnxt_handle_tx_cp() is used to check and process the Tx completions
generated for the Tx Buffer Descriptors sent by the hardware.
This patch also adds code to allocate rings in the hardware.
For each Tx queue allocated in the PMD driver, a corresponding ring
in hardware will be created. Every time a Tx request is initiated
via the bnxt_xmit_pkts() call, a Buffer Descriptor is created and
is sent to the hardware via the associated Tx ring.
On completing the Tx operation, the hardware will generates the status
in the form of a completion. This completion is processed by the
bnxt_handle_tx_cp() function.
Functions like bnxt_init_tx_ring_struct() and bnxt_init_one_tx_ring()
are used to initialize various members of the structure before
starting Tx operations.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Reviewed-by: David Christensen <david.christensen@broadcom.com>
Ajit Khaparde [Wed, 15 Jun 2016 21:23:12 +0000 (14:23 -0700)]
net/bnxt: add statistics
Add the bnxt_stats_get_op() and bnxt_stats_reset_op() dev_ops to
get and reset statistics. It also brings in the associated HWRM calls
to handle the requests appropriately.
We also have the bnxt_free_stats() function which will be used in the
follow on patches to free the memory allocated by the driver for
statistics.
New HWRM calls:
bnxt_hwrm_stat_clear:
This command clears statistics of a context
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Reviewed-by: David Christensen <david.christensen@broadcom.com>
Ajit Khaparde [Wed, 15 Jun 2016 21:23:11 +0000 (14:23 -0700)]
net/bnxt: add Rx queue create/destroy
In this patch we are adding the bnxt_rx_queue_setup_op() and
bnxt_rx_queue_release_op() functions. These will be tied to the
rx_queue_setup and rx_queue_release dev_ops in a subsequent patch.
In these functions we allocate/free memory for the RX queues.
This still requires support to create a RX ring in the ASIC which
will be completed in a future commit. Each Rx queue created via the
rx_queue_setup dev_op will have an associated Rx ring in the hardware.
The Rx logic in the hardware picks a Rx ring for each Rx frame received
by the hardware depending on the properties like RSS, MAC and VLAN
settings configured in the hardware. These packets in the end arrive
on the Rx queue corresponding to the Rx ring in the hardware.
We are also adding some functions like bnxt_mq_rx_configure()
bnxt_free_rx_mbufs() and bnxt_free_rxq_stats() which will be used in
subsequent patches.
We are also adding hwrm_vnic_rss_cfg_* structures, which will be used
in subsequent patches to enable RSS configuration.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Reviewed-by: David Christensen <david.christensen@broadcom.com>
Ajit Khaparde [Wed, 15 Jun 2016 21:23:10 +0000 (14:23 -0700)]
net/bnxt: add Tx queue create/destroy
In this patch we are adding the bnxt_tx_queue_setup_op() and
bnxt_tx_queue_release_op() functions. These will be tied to the
tx_queue_setup and tx_queue_release dev_ops in a subsequent patch.
In these functions we allocate/free memory for the TX queues.
This still requires support to create a TX ring in the ASIC which
will be completed in a future commit. Each Tx queue created via the
tx_queue_setup dev_op will have an associated Tx ring in the hardware.
A Tx request coming on the Tx queue gets sent to the corresponding
Tx ring in the ASIC for subsequent transmission.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Reviewed-by: David Christensen <david.christensen@broadcom.com>
Ajit Khaparde [Wed, 15 Jun 2016 21:23:09 +0000 (14:23 -0700)]
net/bnxt: add L2 filter alloc/init/free
Add the L2 filter structure and the alloc/init/free functions for
dealing with them.
A filter is used to identify traffic that contains a matching set of
parameters like unicast or broadcast MAC address or a VLAN tag amongst
other things which then allows the ASIC to direct the incoming traffic
to an appropriate VNIC or Rx ring.
New HWRM calls:
bnxt_hwrm_clear_filter:
Free a L2 filter.
bnxt_hwrm_set_filter
Allocate an An L2 filter or a L2 context.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Reviewed-by: David Christensen <david.christensen@broadcom.com>
Ajit Khaparde [Wed, 15 Jun 2016 21:23:08 +0000 (14:23 -0700)]
net/bnxt: add completion ring
Structures, macros, and functions for working with completion rings
in the driver.
Completion Ring is used by the Ethernet controller to provide the
status of transmitted & received packets, report errors, report
status changes to the host software, and inter-function forwarding
requests. In addition to the generic ring features, a completion ring
can have a statistics context that has statistics periodically DMAed
to host memory, along with a consumer index.
bnxt_handle_async_event() handles completions not related to a specific
transmit or receive ring such as link status changes which arrive on
the default completion ring.
Other physical or virtual functions on the same device may send an HWRM
command forward request. In this case, we will pass it through
unvalidated. In the future, we will be able to have the PF monitor and
control VF access to the HWRM interface if needed.
New HWRM Calls:
bnxt_hwrm_exec_fwd_resp:
Execute an encapsulated command and forward the response.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Reviewed-by: David Christensen <david.christensen@broadcom.com>
Ajit Khaparde [Wed, 15 Jun 2016 21:23:07 +0000 (14:23 -0700)]
net/bnxt: declare generic ring structs
Declare generic ring structures and a free() function. These are
generic ring management functions which will be used to create Tx,
Rx and Completion rings in the subsequent patches, and tie them to
the HWRM managed ring resources.
This generic ring structure is shared all the ring types and tracks
the the host Buffer Descriptors (BDs) and the HWRM assigned ID.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Reviewed-by: David Christensen <david.christensen@broadcom.com>
Ajit Khaparde [Wed, 15 Jun 2016 21:23:06 +0000 (14:23 -0700)]
net/bnxt: add VNIC functions and structs
Add functions to allocate, initialize, and free vnics.
A VNIC represents a virtual interface. It is a resource in the RX path
of the chip and is used to setup various target actions such as RSS,
MAC filtering etc. for the physical function in use.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Reviewed-by: David Christensen <david.christensen@broadcom.com>
Ajit Khaparde [Wed, 15 Jun 2016 21:23:05 +0000 (14:23 -0700)]
net/bnxt: add device configure operation
The dev_configure_op function calls bnxt_set_hwrm_link_config() to
setup the PHY. This calls the new bnxt_parse_eth_link_*() functions
to translate from the DPDK macro values to those used by HWRM calls,
then calls bnxt_hwrm_port_phy_cfg() to issue the HWRM call.
New HWRM calls:
bnxt_hwrm_port_phy_cfg:
This command configures the PHY device for the port.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Reviewed-by: David Christensen <david.christensen@broadcom.com>
Ajit Khaparde [Wed, 15 Jun 2016 21:23:04 +0000 (14:23 -0700)]
net/bnxt: get device infos
Gets device info from the bp structure filled in the init() function.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Reviewed-by: David Christensen <david.christensen@broadcom.com>
Ajit Khaparde [Wed, 15 Jun 2016 21:23:03 +0000 (14:23 -0700)]
net/bnxt: add driver register/unregister
Move init() cleanup into uninit() function
Fix .dev_private_size
New HWRM calls:
bnxt_hwrm_func_driver_register:
This command is used by the function driver to register
its information with the HWRM.
bnxt_hwrm_func_driver_unregister:
This command is used by the function driver to unregister
with the HWRM.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Reviewed-by: David Christensen <david.christensen@broadcom.com>
Ajit Khaparde [Wed, 15 Jun 2016 21:23:02 +0000 (14:23 -0700)]
net/bnxt: add hardware resource manager init code
Start adding support to use the HWRM API.
Hardware Resource Manager or HWRM in short, is a set of API provided
by the firmware running in the ASIC to manage the various resources.
Initial commit just performs necessary HWRM queries for init, then
fails as before.
Now that struct bnxt is non-zero size, we can set dev_private_size
correctly.
The used HWRM calls so far:
bnxt_hwrm_func_qcaps:
This command returns capabilities of a function.
bnxt_hwrm_ver_get:
This function is called by a driver to determine the HWRM
interface version supported by the HWRM firmware, the
version of HWRM firmware implementation, the name of HWRM
firmware, the versions of other embedded firmwares, and
the names of other embedded firmwares, etc. Gets the
firmware version and interface specifications. Returns
an error if the firmware on the device is not supported
by the driver and ensures the response space is large
enough for the largest possible response.
bnxt_hwrm_queue_qportcfg:
This function is called by a driver to query queue
configuration of a port.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Reviewed-by: David Christensen <david.christensen@broadcom.com>
Ajit Khaparde [Wed, 15 Jun 2016 21:23:01 +0000 (14:23 -0700)]
net/bnxt: add driver for Broadcom NetXtreme-C devices
This patch adds the initial skeleton for bnxt driver along with the
nic guide, and ties the driver into the build system.
At this point, the driver simply fails init.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Reviewed-by: David Christensen <david.christensen@broadcom.com>
[Release Note Addition]
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Wenzhuo Lu [Wed, 1 Jun 2016 01:53:09 +0000 (09:53 +0800)]
net/igb: support VF mailbox interrupt for link up/down
When using kernel PF and DPDK VF, when the PF driver finds the link
state changes, up -> down or down -> up, the driver will send a
message to VF by mailbox. This link state change may be
triggered by PHY disconnection/reconnection, user config change
like *ifconfig down/up* or interface parameter, like MTU change.
This patch enables the support of the mailbox interrupt,
so VF driver can receive the message for link up/down.
After VF receives this message, VF port need to be reset to
recover. This needs to be handled by the application so this patch
allows the app to register a reset callback so it can reset the VF port.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Wenzhuo Lu [Wed, 1 Jun 2016 01:53:08 +0000 (09:53 +0800)]
net/ixgbe: support VF mailbox interrupt for link up/down
When using kernel PF and DPDK VF, when the PF driver finds the link
state changes, up -> down or down -> up, the driver will send a
message to VF by mailbox. This link state change may be
triggered by PHY disconnection/reconnection, user config change
like *ifconfig down/up* or interface parameter, like MTU change.
This patch enables the support of the mailbox interrupt,
so VF driver can receive the message for link up/down.
After VF receives this message, VF port need to be reset to
recover. This needs to be handled by the application so this patch
allows the app to register a reset callback so it can reset the VF port.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Helin Zhang [Tue, 14 Jun 2016 13:56:37 +0000 (14:56 +0100)]
net/i40e/base: document latest base code version
Update the documentation and comments with brief details on the base
code version included in this release.
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Helin Zhang [Tue, 14 Jun 2016 13:53:07 +0000 (14:53 +0100)]
net/i40e/base: support disabling links on all ports
Add a flag which can be used to tell the firmware to disable the link on
all ports.
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Helin Zhang [Tue, 24 May 2016 06:23:08 +0000 (14:23 +0800)]
net/i40e/base: allow PF to configure RSS for VF
Add opcodes and structures to support RSS configuration
by PF driver on behalf of the VF drivers.
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Helin Zhang [Tue, 24 May 2016 06:23:07 +0000 (14:23 +0800)]
net/i40e/base: add input set mask definitions
Adds input set mask definitions for RSS, flow director
and flex bytes.
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Helin Zhang [Tue, 24 May 2016 06:23:06 +0000 (14:23 +0800)]
net/i40e/base: increase supported AQ API version
Increase the supported AQ API version to 1.5
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Helin Zhang [Tue, 24 May 2016 06:23:05 +0000 (14:23 +0800)]
net/i40e/base: add more device capabilities for NVM mgmt
Adds more device capabilities for NVM management.
- if update is available
- if security check is needed
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Helin Zhang [Tue, 24 May 2016 06:23:04 +0000 (14:23 +0800)]
net/i40e/base: fix debug output of adminq commands
Fixes hex printout in the debug output
Fixes:
f388b435bc33 ("i40e/base: clean adminq debug")
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Helin Zhang [Tue, 24 May 2016 06:23:03 +0000 (14:23 +0800)]
net/i40e/base: fix printing the number of MSIX vectors
Correct the number of MSIX vector in debug info.
Fixes:
889bc9f0cd3a ("i40e/base: unify the capability function")
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Helin Zhang [Tue, 24 May 2016 06:23:02 +0000 (14:23 +0800)]
net/i40e/base: support new devices
Add new device IDs and PHY types.
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Helin Zhang [Tue, 24 May 2016 06:23:01 +0000 (14:23 +0800)]
net/i40e/base: fix error with mirror rule ID 0
Remove a problematic mirror rule ID check. The check
returned an error if the mirror rule ID is 0, which is
a valid value.
Fixes:
0bf2dbbe077c ("i40e/base: support mirroring rules")
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Helin Zhang [Tue, 24 May 2016 06:23:00 +0000 (14:23 +0800)]
net/i40e/base: allow egress traffic mirroring
Allow egress traffic to be mirrored to VSIs in promiscuous mode, as latest
firmware supports that from API version 1.5.
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Helin Zhang [Tue, 24 May 2016 06:22:59 +0000 (14:22 +0800)]
net/i40e/base: fix Geneve VNI for HW use
The hardware doesn't layout the Geneve VNI (Virtual Network
Identifier) quite the same as the VxLAN VNI, so it needs to
adjust it before sending through the Admin Queue commands as the
workaround.
Fixes:
8db9e2a1b232 ("i40e: base driver")
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>