dpdk.git
6 years agonet/enic: remove extern in function declarations
John Daley [Thu, 8 Mar 2018 02:46:53 +0000 (18:46 -0800)]
net/enic: remove extern in function declarations

Signed-off-by: John Daley <johndale@cisco.com>
Reviewed-by: Hyong Youb Kim <hyonkim@cisco.com>
6 years agonet/sfc: support DROP action in flow API
Roman Zhukov [Tue, 27 Feb 2018 13:11:19 +0000 (13:11 +0000)]
net/sfc: support DROP action in flow API

Signed-off-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: support drop filters on EF10 family NICs
Roman Zhukov [Tue, 27 Feb 2018 13:11:18 +0000 (13:11 +0000)]
net/sfc/base: support drop filters on EF10 family NICs

Add support for filters which drop packets when forming MCDI request
for a filter.

Signed-off-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agodoc: add sfc flow API support for tunnels in release notes
Andrew Rybchenko [Tue, 6 Mar 2018 15:24:59 +0000 (15:24 +0000)]
doc: add sfc flow API support for tunnels in release notes

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc: avoid creation of ineffective flow rules
Roman Zhukov [Tue, 6 Mar 2018 15:24:58 +0000 (15:24 +0000)]
net/sfc: avoid creation of ineffective flow rules

Despite being versatile, the hardware support for filtering has a number
of special properties which must be taken into account. Namely, there is
a known set of valid filters which don't take any effect despite being
accepted by the hardware.

The combinations of match flags and field values which can describe the
exceptional filters are as follows:
- ETHER_TYPE or ETHER_TYPE | LOC_MAC with IPv4 or IPv6 EtherType
- ETHER_TYPE | IP_PROTO or ETHER_TYPE | IP_PROTO | LOC_MAC with UDP or
TCP IP protocol value
- The same combinations with OUTER_VID and/or INNER_VID

These exceptional filters can be expressed in terms of RTE flow rules.
If the user creates such a flow rule, no traffic will hit the underlying
filter, and no errors will be reported.

This patch adds a means to prevent such ineffective flow rules from
being created.

Signed-off-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
6 years agonet/sfc: multiply of specs with an unknown destination MAC
Roman Zhukov [Tue, 6 Mar 2018 15:24:57 +0000 (15:24 +0000)]
net/sfc: multiply of specs with an unknown destination MAC

To filter all traffic, need to create two hardware filter specifications
with both unknown unicast and unknown multicast destination MAC address
match flags.

In terms of RTE flow API, this would require adding multiple flow rules
with corresponding ETH items. In order to avoid such a complication, the
patch implements a mechanism to auto-complete an underlying filter
representation of a flow rule in order to create additional filter
specifications featuring the missing match flags.

Signed-off-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
6 years agonet/sfc: multiply of specs w/o inner frame destination MAC
Roman Zhukov [Tue, 6 Mar 2018 15:24:56 +0000 (15:24 +0000)]
net/sfc: multiply of specs w/o inner frame destination MAC

Knowledge of a network identifier is not sufficient to construct a
workable hardware filter for encapsulated traffic. It's obligatory to
specify one of the match flags associated with inner frame destination
MAC. If the address is unknown, then one needs to specify either unknown
unicast or unknown multicast destination match flag.

In terms of RTE flow API, this would require adding multiple flow rules
with corresponding ETH items besides the tunnel item. In order to avoid
such a complication, the patch implements a mechanism to auto-complete
an underlying filter representation of a flow rule in order to create
additional filter specifications featuring the missing match flags.

Signed-off-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
6 years agonet/sfc: multiply of specs with an unknown EtherType
Roman Zhukov [Tue, 6 Mar 2018 15:24:55 +0000 (15:24 +0000)]
net/sfc: multiply of specs with an unknown EtherType

Hardware filter specification for encapsulated traffic must contain
EtherType. In terms of RTE flow API, this would require L3 item to be
used in the flow rule. In the simplest case, if the user needs to filter
encapsulated traffic without knowledge of exact EtherType, they will
have to create multiple variants of the flow rule featuring all possible
L3 items (IPv4, IPv6), respectively. In order to hide the gory details
and avoid such a complication, this patch implements a mechanism to
auto-complete the filter specifications if need be.

Signed-off-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
6 years agonet/sfc: add infrastructure to make many filters from flow
Roman Zhukov [Tue, 6 Mar 2018 15:24:54 +0000 (15:24 +0000)]
net/sfc: add infrastructure to make many filters from flow

Not all flow rules can be expressed in one hardware filter, so some flow
rules have to be expressed in terms of multiple hardware filters. This
patch provides a means to produce a filter spec template from the flow
rule which then can be used to produce a set of fully elaborated specs
to be inserted.

Signed-off-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
6 years agonet/sfc: support inner frame ETH in flow API filters
Roman Zhukov [Tue, 6 Mar 2018 15:24:53 +0000 (15:24 +0000)]
net/sfc: support inner frame ETH in flow API filters

Support destination MAC address match in inner frames.

Signed-off-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
6 years agonet/sfc: support GENEVE in flow API filters
Roman Zhukov [Tue, 6 Mar 2018 15:24:52 +0000 (15:24 +0000)]
net/sfc: support GENEVE in flow API filters

Exact match of virtual network identifier is supported by parser.
IP protocol match are enforced to UDP.
Only Ethernet protocol type is supported.

Signed-off-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
6 years agonet/sfc: support NVGRE in flow API filters
Roman Zhukov [Tue, 6 Mar 2018 15:24:51 +0000 (15:24 +0000)]
net/sfc: support NVGRE in flow API filters

Exact match of virtual subnet ID is supported by parser.
IP protocol match are enforced to GRE.

Signed-off-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
6 years agonet/sfc: support VXLAN in flow API filters
Roman Zhukov [Tue, 6 Mar 2018 15:24:50 +0000 (15:24 +0000)]
net/sfc: support VXLAN in flow API filters

Exact match of VXLAN network identifier is supported by parser.
IP protocol match are enforced to UDP.

Signed-off-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
6 years agonet/sfc/base: distinguish filters for encapsulated packets
Roman Zhukov [Tue, 6 Mar 2018 15:24:49 +0000 (15:24 +0000)]
net/sfc/base: distinguish filters for encapsulated packets

Add filter match flag to distinguish filters applied only to
encapsulated packets.

Match flags set should allow to determine whether a filter
is supported or not. The problem is that if specification
has supported set outer match flags and specified
encapsulation without any inner flags, check says that it
is supported, and filter insertion is performed. However,
there is no filtering of the encapsulated traffic. A new
flag is added to solve this problem and separate the
filters for the encapsulated packets.

Signed-off-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Mark Spender <mspender@solarflare.com>
6 years agonet/sfc/base: support VXLAN filter creation
Vijay Srivastava [Tue, 6 Mar 2018 15:24:48 +0000 (15:24 +0000)]
net/sfc/base: support VXLAN filter creation

Signed-off-by: Vijay Srivastava <vijays@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: support VNI/VSID and inner frame local MAC
Roman Zhukov [Tue, 6 Mar 2018 15:24:47 +0000 (15:24 +0000)]
net/sfc/base: support VNI/VSID and inner frame local MAC

This supports VNI/VSID and inner frame local MAC fields to
match in VXLAN, GENEVE, or NVGRE packets.

Signed-off-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
6 years agonet/sfc/base: support filters for encapsulated packets
Roman Zhukov [Tue, 6 Mar 2018 15:24:46 +0000 (15:24 +0000)]
net/sfc/base: support filters for encapsulated packets

This adds filters for encapsulated packets to the list
returned by ef10_filter_supported_filters().

Signed-off-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
6 years agonet/cxgbe: rework and use 32-bit port capability
Rahul Lakkireddy [Wed, 28 Feb 2018 18:04:52 +0000 (23:34 +0530)]
net/cxgbe: rework and use 32-bit port capability

The new code uses the new 32-bit Port Capabilities exclusively and
only translates to/from the old 16-bit Port Capabilities at the last
point possible when talking to older Firmware.

For the old versus new Firmware issue, we use the new FW_PARAMS_CMD[PFVF,
CAPS32] command to tell the Firmware that we want Asynchronous Port Status
updates to use the new 32-bit version of the Port Information message.  If
we get an error, we know we're dealing with older Firmware, and if not,
we'll start getting th new 32-bit Port Capability message formats.

Also, refactor t4_handle_fw_rpl() to handle new 32-bit Port Capability
replies from firmware in t4_handle_get_port_info().

Original work by Surendra Mobiya <surendra@chelsio.com>

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
6 years agonet/cxgbe: update link config for 32-bit port capability
Rahul Lakkireddy [Wed, 28 Feb 2018 18:04:51 +0000 (23:34 +0530)]
net/cxgbe: update link config for 32-bit port capability

Update link configuration API to prepare for 32-bit port capability
support. Continue using 16-bit port capability for older firmware.

Original work by Surendra Mobiya <surendra@chelsio.com>

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
6 years agonet/cxgbe: update link Forward Error Correction (FEC)
Kumar Sanghvi [Wed, 28 Feb 2018 18:04:50 +0000 (23:34 +0530)]
net/cxgbe: update link Forward Error Correction (FEC)

Normally, firmware reads various Forward Error Correction parameters
from a Transceiver Module i2c EPROM and uses a couple of IEEE Standards
(802.3bj for 100Gb/s and 802.3by for 25Gb/s) to interpret those
parameters and come up with supported and default FEC settings.
Firmware then sends these FEC parameters to the Host Driver which gives
the Host Administrator an opportunity to change them if necessary in
order to establish a Link with a Switch which may have made a
non-standard FEC decision.

This commit recognizes "auto" as a discrete FEC mode which can be
used to explicitly select the IEEE 802.3 standard based FEC selection.

Original work by Surendra Mobiya <surendra@chelsio.com>

Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
6 years agonet/cxgbe: support getting RSS hash configuration and key
Kumar Sanghvi [Wed, 28 Feb 2018 18:04:49 +0000 (23:34 +0530)]
net/cxgbe: support getting RSS hash configuration and key

Original work by Surendra Mobiya <surendra@chelsio.com>

Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
6 years agonet/cxgbe: support updating RSS hash configuration and key
Kumar Sanghvi [Wed, 28 Feb 2018 18:04:48 +0000 (23:34 +0530)]
net/cxgbe: support updating RSS hash configuration and key

Add firmware API for updating RSS hash configuration and key.  Move
RSS hash configuration from cxgb4_write_rss() to a separate function
cxgbe_write_rss_conf().

Also, rename cxgb4_write_rss() to cxgbe_write_rss() for consistency.

Original work by Surendra Mobiya <surendra@chelsio.com>

Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
6 years agonet/cxgbe: fix secondary process initialization
Kumar Sanghvi [Wed, 28 Feb 2018 18:04:47 +0000 (23:34 +0530)]
net/cxgbe: fix secondary process initialization

Attach to rte_eth_dev devices allocated by Primary process for
Ports other than Port-0 in the secondary process.

Save the Primary rte_eth_dev device eth_dev_data as part of txq
structure needed for tx path.

Fixes: 8318984927ff ("cxgbe: add pmd skeleton")
Cc: stable@dpdk.org
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
6 years agonet/cxgbe: rework ethdev device allocation
Rahul Lakkireddy [Wed, 28 Feb 2018 18:04:46 +0000 (23:34 +0530)]
net/cxgbe: rework ethdev device allocation

Rework rte_eth_dev allocation for other ports under same PF.

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
6 years agonet/vdev_netvsc: fix routed devices probing
Matan Azrad [Tue, 27 Feb 2018 14:22:03 +0000 (14:22 +0000)]
net/vdev_netvsc: fix routed devices probing

NetVSC netdevices which are already routed should not be probed because
they are used for management purposes by the HyperV.

The corrupted code got the routed devices from the system file
/proc/net/route and wrongly parsed only the odd lines, so devices which
their routes were in even lines, were considered as unrouted devices
and were probed.

Use linux netlink lib to detect the routed NetVSC devices instead of
file parsing.

Fixes: 31182fadfb21 ("net/vdev_netvsc: skip routed netvsc probing")
Cc: stable@dpdk.org
Suggested-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Matan Azrad <matan@mellanox.com>
6 years agoethdev: remove versioning of filter control function
Kirill Rybalchenko [Tue, 27 Feb 2018 14:18:27 +0000 (14:18 +0000)]
ethdev: remove versioning of filter control function

In 18.02 release the ABI of ethdev component was changed.
To keep compatibility with previous versions of the library
the versioning of rte_eth_dev_filter_ctrl function was implemented.

As soon as deprecation note was issued in 18.02 release, there is
no need to keep compatibility with previous versions.
Remove the versioning of rte_eth_dev_filter_ctrl function.

Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoethdev: fix string length in name comparison
Mohammad Abdul Awal [Tue, 27 Feb 2018 08:58:27 +0000 (08:58 +0000)]
ethdev: fix string length in name comparison

The current code compares two strings upto the length of 1st string
(searched name). If the 1st string is prefix of 2nd string (existing name),
the string comparison returns the port_id of earliest prefix matches.
This patch fixes the bug by using strcmp instead of strncmp.

Fixes: 9c5b8d8b9fe ("ethdev: clean port id retrieval when attaching")
Cc: stable@dpdk.org
Signed-off-by: Mohammad Abdul Awal <mohammad.abdul.awal@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
6 years agonet/qede: fix alloc from socket 0
Pascal Mazon [Mon, 26 Feb 2018 08:01:10 +0000 (09:01 +0100)]
net/qede: fix alloc from socket 0

In case osal_dma_alloc_coherent() or osal_dma_alloc_coherent_aligned() are
called from a management thread, core_id turn out to be LCORE_ID_ANY, and
the resulting socket for alloc will be socket 0.

This is not desirable when using a NIC from socket 1 which might very
likely be configured to use memory from that socket only.
In that case, allocation will fail.

To address this, use master lcore instead when called from mgmt thread.
The associated socket should have memory available.

Fixes: ec94dbc57362 ("qede: add base driver")
Cc: stable@dpdk.org
Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: Harish Patil <harish.patil@cavium.com>
Acked-by: Harish Patil <harish.patil@cavium.com>
6 years agodoc: fix NFP NIC guide grammar
Alejandro Lucero [Thu, 22 Feb 2018 12:15:53 +0000 (12:15 +0000)]
doc: fix NFP NIC guide grammar

My english is far worse than those from the marketing team.

Fixes: 80bc1752f16e ("nfp: add guide")
Fixes: d625beafc8be ("doc: update NFP with PF support information")
Fixes: 80987c40fd28 ("config: enable nfp driver on Linux")
Cc: stable@dpdk.org
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
6 years agonet/nfp: fix link speed capabilities
Alejandro Lucero [Thu, 22 Feb 2018 11:57:20 +0000 (11:57 +0000)]
net/nfp: fix link speed capabilities

Mixing numeric macros with bit shifts macros is not a good idea.

Fixes: 011411586e03 ("net/nfp: extend speed capabilities advertised")
Cc: stable@dpdk.org
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
6 years agonet/nfp: fix barrier location
Alejandro Lucero [Thu, 22 Feb 2018 11:30:39 +0000 (11:30 +0000)]
net/nfp: fix barrier location

The barrier needs to be after reading the DD bit. It has not been
a problem because the potential reads which can not happen before
reading the DD bit seem to be far enough, so the compiler is not
rescheduling them. However, a refactoring could make this problem
to arise.

Fixes: b812daadad0d ("nfp: add Rx and Tx")
Cc: stable@dpdk.org
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
6 years agonet/nfp: fix assigning port id in mbuf
Alejandro Lucero [Thu, 22 Feb 2018 11:13:48 +0000 (11:13 +0000)]
net/nfp: fix assigning port id in mbuf

Although this can be done by the app, because other PMDs are doing it,
apps expect this behaviour from the PMD.

Fixes: b812daadad0d ("nfp: add Rx and Tx")
Cc: stable@dpdk.org
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
6 years agonet/sfc: remove void pointer cast
Zhiyong Yang [Mon, 26 Feb 2018 08:11:03 +0000 (16:11 +0800)]
net/sfc: remove void pointer cast

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/bnxt: remove void pointer cast
Zhiyong Yang [Mon, 26 Feb 2018 08:11:02 +0000 (16:11 +0800)]
net/bnxt: remove void pointer cast

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agonet/e1000: remove void pointer cast
Zhiyong Yang [Mon, 26 Feb 2018 08:11:01 +0000 (16:11 +0800)]
net/e1000: remove void pointer cast

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agonet/ixgbe: remove void pointer cast
Zhiyong Yang [Mon, 26 Feb 2018 08:11:00 +0000 (16:11 +0800)]
net/ixgbe: remove void pointer cast

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoflow_classify: remove void pointer cast
Zhiyong Yang [Mon, 26 Feb 2018 08:10:59 +0000 (16:10 +0800)]
flow_classify: remove void pointer cast

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agonet/octeontx: fix uninitialized variable in port open
Santosh Shukla [Tue, 20 Feb 2018 17:14:16 +0000 (22:44 +0530)]
net/octeontx: fix uninitialized variable in port open

Coverity issue: 195045
Fixes: f18b146c498d ("net/octeontx: create ethdev ports")
Cc: stable@dpdk.org
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
6 years agonet/octeontx: fix null pointer dereference
Santosh Shukla [Tue, 20 Feb 2018 17:14:15 +0000 (22:44 +0530)]
net/octeontx: fix null pointer dereference

Coverity issue: 195040
Fixes: f18b146c498d ("net/octeontx: create ethdev ports")
Cc: stable@dpdk.org
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
6 years agonet/bonding: fix primary slave port id storage type
Gowrishankar Muthukrishnan [Tue, 6 Mar 2018 09:37:04 +0000 (15:07 +0530)]
net/bonding: fix primary slave port id storage type

primary_slave_port_id is uint16_t which needs to be correctly stored
with the same data type of input parameter in bond_ethdev_configure.

In powerpc, creating bond pmd results in below error due to wrong
cast on input param. This is reproducible, only when using shared
libraries.

sudo -E LD_LIBRARY_PATH=$PWD/$RTE_TARGET/lib $RTE_TARGET/app/testpmd \
  -l 0,8 --socket-mem=1024,1024 \
  --vdev 'net_tap0,iface=dpdktap0' --vdev 'net_tap1,iface=dpdktap1' \
  --vdev 'net_bonding0,mode=1,slave=0,slave=1,primary=0,socket_id=1' \
  -d $RTE_TARGET/lib/librte_pmd_tap.so \
  -d $RTE_TARGET/lib/librte_mempool_ring.so -- --forward-mode=rxonly

Configuring Port 0 (socket 0)
PMD: net_tap0: 0x70a854070280: TX configured queues number: 1
PMD: net_tap0: 0x70a854070280: RX configured queues number: 1
Port 0: 86:EA:6D:52:3E:DB
Configuring Port 1 (socket 0)
PMD: net_tap1: 0x70a854074300: TX configured queues number: 1
PMD: net_tap1: 0x70a854074300: RX configured queues number: 1
Port 1: 42:9A:B8:49:B6:00
Configuring Port 2 (socket 1)
EAL: Failed to set primary slave port 7424 on bonded device net_bonding0
Fail to configure port 2
EAL: Error - exiting with code: 1
  Cause: Start ports failed

Fixes: f8244c6399 ("ethdev: increase port id range")
Cc: stable@dpdk.org
Signed-off-by: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agonet/sfc/base: sync MCDI headers and TLV layout
Andrew Rybchenko [Tue, 20 Feb 2018 07:34:38 +0000 (07:34 +0000)]
net/sfc/base: sync MCDI headers and TLV layout

Regenerate MCDI and TLV layout headers from firmwaresrc to
pick up DPDK firmware variant and related Rx queue and filtering
extensions.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: add signed image layout support
Andy Moreton [Tue, 20 Feb 2018 07:34:37 +0000 (07:34 +0000)]
net/sfc/base: add signed image layout support

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: add firmware image layout option
Andy Moreton [Tue, 20 Feb 2018 07:34:36 +0000 (07:34 +0000)]
net/sfc/base: add firmware image layout option

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: add outer IP ID parameter to TSOv2 descriptor
Vijay Srivastava [Tue, 20 Feb 2018 07:34:35 +0000 (07:34 +0000)]
net/sfc/base: add outer IP ID parameter to TSOv2 descriptor

Set outer_ip_id in the TX option descriptor for encapsulated packets.

Signed-off-by: Vijay Srivastava <vijays@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: add encapsulated TSOv2 capability
Vijay Srivastava [Tue, 20 Feb 2018 07:34:34 +0000 (07:34 +0000)]
net/sfc/base: add encapsulated TSOv2 capability

Signed-off-by: Vijay Srivastava <vijays@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: support CTPIO stats
Andy Moreton [Tue, 20 Feb 2018 07:34:33 +0000 (07:34 +0000)]
net/sfc/base: support CTPIO stats

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: regenerate headers to pick up CTPIO stats
Andy Moreton [Tue, 20 Feb 2018 07:34:32 +0000 (07:34 +0000)]
net/sfc/base: regenerate headers to pick up CTPIO stats

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: add bit to indicate CTPIO availability
Guido Barzini [Tue, 20 Feb 2018 07:34:31 +0000 (07:34 +0000)]
net/sfc/base: add bit to indicate CTPIO availability

Signed-off-by: Guido Barzini <gbarzini@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: add CTPIO statistics
Guido Barzini [Tue, 20 Feb 2018 07:34:30 +0000 (07:34 +0000)]
net/sfc/base: add CTPIO statistics

Signed-off-by: Guido Barzini <gbarzini@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: run genfwdef to update headers
Andy Moreton [Tue, 20 Feb 2018 07:34:29 +0000 (07:34 +0000)]
net/sfc/base: run genfwdef to update headers

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: document the event type for CTPIO sends
Guido Barzini [Tue, 20 Feb 2018 07:34:28 +0000 (07:34 +0000)]
net/sfc/base: document the event type for CTPIO sends

Document the TX_EV_TYPE used for TX completion events corresponding
to CTPIO sends.

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: add 1.3V voltage and current sensors
Andy Moreton [Tue, 20 Feb 2018 07:34:27 +0000 (07:34 +0000)]
net/sfc/base: add 1.3V voltage and current sensors

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: provide a flag for controlling CTPIO mode
Guido Barzini [Tue, 20 Feb 2018 07:34:26 +0000 (07:34 +0000)]
net/sfc/base: provide a flag for controlling CTPIO mode

Either cut-through or store-and-forward mode.

Signed-off-by: Guido Barzini <gbarzini@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: add Medford2 support for tunnel encapsulations
Andy Moreton [Tue, 20 Feb 2018 07:34:25 +0000 (07:34 +0000)]
net/sfc/base: add Medford2 support for tunnel encapsulations

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: add Medford2 support for licensing
Andy Moreton [Tue, 20 Feb 2018 07:34:24 +0000 (07:34 +0000)]
net/sfc/base: add Medford2 support for licensing

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: add Medford2 support for external port numbers
Andy Moreton [Tue, 20 Feb 2018 07:34:23 +0000 (07:34 +0000)]
net/sfc/base: add Medford2 support for external port numbers

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: group Medford external port mapping entries
Andy Moreton [Tue, 20 Feb 2018 07:34:22 +0000 (07:34 +0000)]
net/sfc/base: group Medford external port mapping entries

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: clarify port mode names and masks
Andy Moreton [Tue, 20 Feb 2018 07:34:21 +0000 (07:34 +0000)]
net/sfc/base: clarify port mode names and masks

New port mode names are defined for Medford2 and later, and
the existing names are aliased to them. Add comments with the
numeric port mode to clarify the external port modes table.

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: support Medford2 event timer semantics
Andy Moreton [Tue, 20 Feb 2018 07:34:20 +0000 (07:34 +0000)]
net/sfc/base: support Medford2 event timer semantics

The event timer interface has changed for Medford2 - for
details see bug66418 comment 9. Update the common code to
use the new timer semantics for Medford2.

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: support FEC mode settings
Andy Moreton [Tue, 20 Feb 2018 07:34:19 +0000 (07:34 +0000)]
net/sfc/base: support FEC mode settings

Medford2 controllers support control and reporting of
FEC modes for 25G and higher links. See SF-109306-TC
for suggested usage in client code.

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: remove obsolete comments
Andy Moreton [Tue, 20 Feb 2018 07:34:18 +0000 (07:34 +0000)]
net/sfc/base: remove obsolete comments

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: move VI window size config to ef10 NIC board
Andy Moreton [Tue, 20 Feb 2018 07:34:17 +0000 (07:34 +0000)]
net/sfc/base: move VI window size config to ef10 NIC board

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: move privilege config to ef10 NIC board config
Andy Moreton [Tue, 20 Feb 2018 07:34:16 +0000 (07:34 +0000)]
net/sfc/base: move privilege config to ef10 NIC board config

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: move vector config to ef10 NIC board config
Andy Moreton [Tue, 20 Feb 2018 07:34:15 +0000 (07:34 +0000)]
net/sfc/base: move vector config to ef10 NIC board config

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: move limits config to ef10 NIC board config
Andy Moreton [Tue, 20 Feb 2018 07:34:14 +0000 (07:34 +0000)]
net/sfc/base: move limits config to ef10 NIC board config

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: move Tx config to ef10 NIC board config
Andy Moreton [Tue, 20 Feb 2018 07:34:13 +0000 (07:34 +0000)]
net/sfc/base: move Tx config to ef10 NIC board config

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: move Rx config to ef10 NIC board config
Andy Moreton [Tue, 20 Feb 2018 07:34:12 +0000 (07:34 +0000)]
net/sfc/base: move Rx config to ef10 NIC board config

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: move datapath config to ef10 NIC board cfg
Andy Moreton [Tue, 20 Feb 2018 07:34:11 +0000 (07:34 +0000)]
net/sfc/base: move datapath config to ef10 NIC board cfg

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: move PHY/link config to ef10 NIC board cfg
Andy Moreton [Tue, 20 Feb 2018 07:34:10 +0000 (07:34 +0000)]
net/sfc/base: move PHY/link config to ef10 NIC board cfg

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: move legacy board config to ef10 NIC board cfg
Andy Moreton [Tue, 20 Feb 2018 07:34:09 +0000 (07:34 +0000)]
net/sfc/base: move legacy board config to ef10 NIC board cfg

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: move MAC address config to ef10 NIC board cfg
Andy Moreton [Tue, 20 Feb 2018 07:34:08 +0000 (07:34 +0000)]
net/sfc/base: move MAC address config to ef10 NIC board cfg

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: move PF/VF config to ef10 NIC board config
Andy Moreton [Tue, 20 Feb 2018 07:34:07 +0000 (07:34 +0000)]
net/sfc/base: move PF/VF config to ef10 NIC board config

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: move port config to ef10 NIC board config
Andy Moreton [Tue, 20 Feb 2018 07:34:06 +0000 (07:34 +0000)]
net/sfc/base: move port config to ef10 NIC board config

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: add ef10 NIC board config method
Andy Moreton [Tue, 20 Feb 2018 07:34:05 +0000 (07:34 +0000)]
net/sfc/base: add ef10 NIC board config method

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: use correct name for frame truncation event
Andy Moreton [Tue, 20 Feb 2018 07:34:04 +0000 (07:34 +0000)]
net/sfc/base: use correct name for frame truncation event

The RX_ECC_ERR flag in RX events was misnamed, as it
reported frame truncation. Use the new RX_TRUNC_ERR
name for this flag.

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: remove MAC stats size define
Andy Moreton [Tue, 20 Feb 2018 07:34:03 +0000 (07:34 +0000)]
net/sfc/base: remove MAC stats size define

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc: size MAC stats DMA buffer to support Medford2
Andrew Rybchenko [Tue, 20 Feb 2018 07:34:02 +0000 (07:34 +0000)]
net/sfc: size MAC stats DMA buffer to support Medford2

Medford2 supports more MAC stats than previous HW. So DMA
buffer must be sized properly.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: resolve code analysis warnings
Richard Houldsworth [Tue, 20 Feb 2018 07:34:01 +0000 (07:34 +0000)]
net/sfc/base: resolve code analysis warnings

Minimal changes adding buffer size checks and simplifying checksum
processing.

Signed-off-by: Richard Houldsworth <rhouldsworth@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: decode Medford2 FEC stats if available
Andy Moreton [Tue, 20 Feb 2018 07:34:00 +0000 (07:34 +0000)]
net/sfc/base: decode Medford2 FEC stats if available

Decode Medford2 FEC stats if available in MAC stats DMA buffer.

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: run mkconfig.py to add FEC MAC stats
Andy Moreton [Tue, 20 Feb 2018 07:33:59 +0000 (07:33 +0000)]
net/sfc/base: run mkconfig.py to add FEC MAC stats

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: use MAC stats DMA buffer size when decoding
Andy Moreton [Tue, 20 Feb 2018 07:33:58 +0000 (07:33 +0000)]
net/sfc/base: use MAC stats DMA buffer size when decoding

On Medford2 and later the MAC stats buffer has been enlarged.
Use the MAC stats DMA buffer size to ensure that the stats END
generation count is read from the correct location, and that
over-reading of the DMA buffer is prevented.

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: use MAC stats DMA buffer size from caps
Andy Moreton [Tue, 20 Feb 2018 07:33:57 +0000 (07:33 +0000)]
net/sfc/base: use MAC stats DMA buffer size from caps

For Medford2 the DMA buffer used for one-shot or periodic MAC stats
has been extended. Ensure the MAC stats DMA buffer size is large
enough to hold the number of stats counters supported by firmware.

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: improve robustness of MAC stats get via MCDI
Andy Moreton [Tue, 20 Feb 2018 07:33:56 +0000 (07:33 +0000)]
net/sfc/base: improve robustness of MAC stats get via MCDI

Previously the code relied on the callers of efx_mcdi_mac_stats
to provide a DMA buffer or NULL depending on the action. Fix
this so that the DMA buffer is only passed in the request when
needed, and that an error is reported for a missing DMA buffer.

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: retrieve number of MAC stats from NIC
Andy Moreton [Tue, 20 Feb 2018 07:33:55 +0000 (07:33 +0000)]
net/sfc/base: retrieve number of MAC stats from NIC

This reports the number of stats (and hence the DMA buffer size)
for MAC stats. If MC_GET_CAPABABILITIES_V4 is not supported then
use the legacy Siena-compatible MC_CMD_MAC_NSTATS value.

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: refactor EF10 get datapath capabilities
Andy Moreton [Tue, 20 Feb 2018 07:33:54 +0000 (07:33 +0000)]
net/sfc/base: refactor EF10 get datapath capabilities

Inline efx_mcdi_get_capabilities() to prepare for reading
newer capabilities response versions.

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: handle new speeds in link events
Andy Moreton [Tue, 20 Feb 2018 07:33:53 +0000 (07:33 +0000)]
net/sfc/base: handle new speeds in link events

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: add efsys macro to get memory region size
Andy Moreton [Tue, 20 Feb 2018 07:33:52 +0000 (07:33 +0000)]
net/sfc/base: add efsys macro to get memory region size

EFSYS_MEM_SIZE() reports the DMA mapped size of an efsys_mem_t
allocated region (the allocation size may be different due to
memory allocator and DMA alignment restrictions).

This ensures that common code internals have explicit knowledge
of the usable size of DMA mapped memory regions.

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: add new loopback modes
Andy Moreton [Tue, 20 Feb 2018 07:33:51 +0000 (07:33 +0000)]
net/sfc/base: add new loopback modes

Report supported loopback modes for new Medford2 link speeds.

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: support new link modes
Andy Moreton [Tue, 20 Feb 2018 07:33:50 +0000 (07:33 +0000)]
net/sfc/base: support new link modes

Add basic support for new link modes for Medford2.

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: simplify loopback type checking
Andy Moreton [Tue, 20 Feb 2018 07:33:49 +0000 (07:33 +0000)]
net/sfc/base: simplify loopback type checking

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: report memory BAR number
Andy Moreton [Tue, 20 Feb 2018 07:33:48 +0000 (07:33 +0000)]
net/sfc/base: report memory BAR number

On Medford and earlier controllers the BAR layout is:
  PF BAR 0: (32bit I/O) I/O mapped registers
  PF BAR 2: (64bit Mem) Memory mapped registers (VI aperture)
  PF BAR 4: (64bit Mem) MSI-X tables

  VF BAR 0: (64bit Mem) Memory mapped registers (VI aperture)
  VF BAR 2: (64bit Mem) MSI-X tables

On Medford2, the layout is:
  PF/VF BAR 0: (64bit Mem) Memory mapped registers (VI aperture)
  PF/VF BAR 2: (64bit Mem) MSI-X tables

Make the VI aperture BAR number available for drivers that need it.
Remove EFX_MEM_BAR define as it it is not correct on all platforms.

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: update notes on interrupt testing on VFs
Andy Moreton [Tue, 20 Feb 2018 07:33:47 +0000 (07:33 +0000)]
net/sfc/base: update notes on interrupt testing on VFs

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: fix too long line
Andrew Rybchenko [Tue, 20 Feb 2018 07:33:46 +0000 (07:33 +0000)]
net/sfc/base: fix too long line

Fixes: 6f619653b9b1 ("net/sfc/base: import MCDI implementation")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: refactoring eliminating code analysis warnings
Richard Houldsworth [Tue, 20 Feb 2018 07:33:45 +0000 (07:33 +0000)]
net/sfc/base: refactoring eliminating code analysis warnings

Addresses most of the warnings reported by the sfn windows driver.

Signed-off-by: Richard Houldsworth <rhouldsworth@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: update hardware headers for Medford2
Andy Moreton [Tue, 20 Feb 2018 07:33:44 +0000 (07:33 +0000)]
net/sfc/base: update hardware headers for Medford2

The changes to efx_regs_ef10.h are auto-generated and include:

 - Updated event RX_L4_CLASS which is now 2 bits (was 3).
   The encoding of TCP, UDP and UNKNOWN are unchanged so
   the narrower Medford2 field definition is compatible with
   all controllers.

 - Fix definition of FATSOv2 option descriptors. These were
   added manually and differ from the auto-generated values
   in some fields (not yet used in common code). The field
   definitions have been corrected to agree with the Linux net
   driver headers and SF-108452-SW.

The remaining changes adapt the common code to use the updated
headers.

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: add method to make checksum option descriptors
Mark Spender [Tue, 20 Feb 2018 07:33:43 +0000 (07:33 +0000)]
net/sfc/base: add method to make checksum option descriptors

Signed-off-by: Mark Spender <mspender@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: improve comments for EF10 ext port mapping
Richard Houldsworth [Tue, 20 Feb 2018 07:33:42 +0000 (07:33 +0000)]
net/sfc/base: improve comments for EF10 ext port mapping

Signed-off-by: Richard Houldsworth <rhouldsworth@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: support runtime VI window size
Andy Moreton [Tue, 20 Feb 2018 07:33:41 +0000 (07:33 +0000)]
net/sfc/base: support runtime VI window size

Medford2 uses a configurable VI window size, and requires
updates to register accesses to use a runtime VI window size
rather than the *_STEP register constants used for earlier
controllers.

Update the common code to query the VI window size via MCDI,
and add new EFX_BAR_VI_* accessor macros for per-VI registers.

The existing EFX_BAR_TBL_* macros can be used for non-VI
register tables (and for code that can never be called for
a Medford2 controller e.g. Siena-only code).

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: add Medford2 support to MON module
Andy Moreton [Tue, 20 Feb 2018 07:33:40 +0000 (07:33 +0000)]
net/sfc/base: add Medford2 support to MON module

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: add Medford2 support to VPD module
Andy Moreton [Tue, 20 Feb 2018 07:33:39 +0000 (07:33 +0000)]
net/sfc/base: add Medford2 support to VPD module

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