Commit Graph

7194 Commits

Author SHA1 Message Date
Leyi Rong
53c7ea0c53 net/ice/base: add function to configure MIB
Decouple ice_cfg_lldp_mib_change from the ice_init_dcb function call.

Signed-off-by: Chinh T Cao <chinh.t.cao@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-06-28 20:31:48 +02:00
Leyi Rong
83a148038e net/ice/base: include DIR flag in extraction sequence
Once upon a time, the ice_flow_create_xtrct_seq() function in ice_flow.c
extracted only protocol fields explicitly specified by the caller of the
ice_flow_add_prof() function via its struct ice_flow_seg_info instances.

However, to support different ingress and egress flow profiles with the
same matching criteria, it would be necessary to also match on the
packet Direction metadata. The primary reason was because there could
not be more than one HW profile with the same CDID, PTG, and VSIG. The
Direction metadata was not a parameter used to select HW profile IDs.

Thus, for ACL, the direction flag would need to be added to the
extraction sequence. This information will be use later as one criteria
for ACL scenario entry matching.

Signed-off-by: Chinh T Cao <chinh.t.cao@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-06-28 20:31:48 +02:00
Ilya Maximets
75b66decdb eal: fix positive error codes from probe/remove
According to API, 'rte_dev_probe()' and 'rte_dev_remove()' must
return 0 or negative error code. Bus code returns positive values
if device wasn't recognized by any driver, so the result of
'bus->plug/unplug()' must be converted. 'local_dev_probe()' and
'local_dev_remove()' also has their internal API, so the conversion
should be done there.

Positive on remove means that device not found by driver.
Positive on probe means that there are no suitable buses/drivers,
i.e. device is not supported.

Users of these API fixed to provide a good example by respecting
DPDK API. This also will allow to catch such issues in the future.

Fixes: a3ee360f44 ("eal: add hotplug add/remove device")
Fixes: 244d513071 ("eal: enable hotplug on multi-process")
Cc: stable@dpdk.org

Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
2019-06-29 21:28:38 +02:00
David Marchand
18218713bf enforce experimental tag at beginning of declarations
Putting a '__attribute__((deprecated))' in the middle of a function
prototype does not result in the expected result with gcc (while clang
is fine with this syntax).

$ cat deprecated.c
void * __attribute__((deprecated)) incorrect() { return 0; }
__attribute__((deprecated)) void *correct(void) { return 0; }
int main(int argc, char *argv[]) { incorrect(); correct(); return 0; }
$ gcc -o deprecated.o -c deprecated.c
deprecated.c: In function ‘main’:
deprecated.c:3:1: warning: ‘correct’ is deprecated (declared at
deprecated.c:2) [-Wdeprecated-declarations]
 int main(int argc, char *argv[]) { incorrect(); correct(); return 0; }
 ^

Move the tag on a separate line and make it the first thing of function
prototypes.
This is not perfect but we will trust reviewers to catch the other not
so easy to detect patterns.

sed -i \
     -e '/^\([^#].*\)\?__rte_experimental */{' \
     -e 's//\1/; s/ *$//; i\' \
     -e __rte_experimental \
     -e '/^$/d}' \
     $(git grep -l __rte_experimental -- '*.h')

Special mention for rte_mbuf_data_addr_default():

There is either a bug or a (not yet understood) issue with gcc.
gcc won't drop this inline when unused and rte_mbuf_data_addr_default()
calls rte_mbuf_buf_addr() which itself is experimental.
This results in a build warning when not accepting experimental apis
from sources just including rte_mbuf.h.

For this specific case, we hide the call to rte_mbuf_buf_addr() under
the ALLOW_EXPERIMENTAL_API flag.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
2019-06-29 19:04:48 +02:00
David Marchand
cfe3aeb170 remove experimental tags from all symbol definitions
We had some inconsistencies between functions prototypes and actual
definitions.
Let's avoid this by only adding the experimental tag to the prototypes.
Tests with gcc and clang show it is enough.

git grep -l __rte_experimental |grep \.c$ |while read file; do
	sed -i -e '/^__rte_experimental$/d' $file;
	sed -i -e 's/  *__rte_experimental//' $file;
	sed -i -e 's/__rte_experimental  *//' $file;
done

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2019-06-29 19:04:43 +02:00
David Marchand
136ab94a5b net/atlantic: add missing experimental API tags
Those symbols are declared in the library map but the prototypes are
missing the experimental tag.
Without it, existing users won't notice it is experimental.

Fixes: ec0dec44ec ("net/atlantic: enable MACsec configuration")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2019-06-29 19:04:37 +02:00
Rasesh Mody
fabeca044f net/bnx2x: fix icc build
Fix a compilation issue seen with icc 19

Signed-off-by: Rasesh Mody <rmody@marvell.com>
2019-06-26 09:14:24 +02:00
Stephen Hemminger
8db9a3145b net/qede: fix warnings from invalid assert
This driver had a bogus assert which could never happen.
This triggers "expression is always false warnings" with some
compilers which causes build failure.
Just remove it.

Fixes: 2af14ca79c ("net/qede: support 100G")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Rasesh Mody <rmody@marvell.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
2019-06-24 12:25:03 +01:00
Stephen Hemminger
19927e56a8 net/bnx2x: fix warnings from invalid assert
This driver had a bogus assert which could never happen.
This triggers "expression is always false warnings" with some
compilers which causes build failure.
Just remove it.

Fixes: 6041aa619f ("net/bnx2x: fix poll link status")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Rasesh Mody <rmody@marvell.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
2019-06-24 12:24:24 +01:00
Tiwei Bie
c3a954eb74 net/virtio: fix packets check in mergeable packed Rx
We should check the descriptor state instead of vq's internal
free count (i.e. the number of descriptors that we haven't made
available) for the remaining mergeable packets.

Fixes: a76290c8f1 ("net/virtio: implement Rx path for packed queues")
Cc: stable@dpdk.org

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
2019-06-20 23:42:04 +02:00
Tiwei Bie
1cbc164ebd net/virtio: fix memory leak in mergeable packed Rx
When there is no enough segments for a packet in mergeable
packed Rx path, we should free the whole mbuf chain instead
of just recycling the last segment.

Fixes: a76290c8f1 ("net/virtio: implement Rx path for packed queues")
Cc: stable@dpdk.org

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
2019-06-20 23:42:04 +02:00
Tiwei Bie
674effd868 net/virtio: fix memory leak in mergeable Rx
When there is no enough segments for a packet in mergeable
Rx path, we should free the whole mbuf chain instead of just
recycling the last segment.

Fixes: bcac5aa207 ("net/virtio: improve batching in mergeable path")
Cc: stable@dpdk.org

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
2019-06-20 23:42:04 +02:00
Tiwei Bie
18e8c0fa91 net/virtio: fix memory leak in in-order Rx
When there is no enough segments for a packet in in-order
mergeable Rx path, we should free the whole mbuf chain instead
of just recycling the last segment.

Fixes: e5f456a98d ("net/virtio: support in-order Rx and Tx")
Cc: stable@dpdk.org

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
2019-06-20 23:42:04 +02:00
Dilshod Urazov
3f8fb60474 net/virtio: move VLAN tag insertion to Tx prepare
VLAN tag insertion should be in Tx prepare, not in Tx burst functions.
One of Tx prepare goals is to be able to do preparations in advance
(possibly on different CPU core) and then transmit it fast.
Also Tx prepare can report that a packet does not pass Tx offloads
check. E.g. has no enough headroom to insert VLAN header.

Fixes: 4fb7e803eb ("ethdev: add Tx preparation")
Cc: stable@dpdk.org

Signed-off-by: Dilshod Urazov <dilshod.urazov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
2019-06-20 23:42:04 +02:00
Dilshod Urazov
00a5ea02e1 net/virtio: add Tx preparation
Virtio requires pseudo-header checksum in TCP/UDP checksum to do
offload, but it was lost when Tx prepare is introduced. Also
rte_validate_tx_offload() should be used to validate Tx offloads.

Also it is incorrect to do virtio_tso_fix_cksum() after prepend
to mbuf without taking prepended size into account, since layer 2/3/4
lengths provide incorrect offsets after prepend.

Fixes: 4fb7e803eb ("ethdev: add Tx preparation")
Cc: stable@dpdk.org

Signed-off-by: Dilshod Urazov <dilshod.urazov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
2019-06-20 23:42:04 +02:00
Tiwei Bie
7f468b2ebf net/virtio: release port upon close
Set RTE_ETH_DEV_CLOSE_REMOVE upon probe so all the private
resources for the port can be freed by rte_eth_dev_close().

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2019-06-20 23:42:04 +02:00
Tiwei Bie
3484c8d859 net/virtio: unmap device on initialization error
We should unmap the device when we failed to initialize the device.

Fixes: 6ba1f63b5a ("virtio: support specification 1.0")
Cc: stable@dpdk.org

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2019-06-20 23:42:04 +02:00
Tiwei Bie
535f8a109a net/virtio: unmap port IO for legacy device
For legacy devices, we should also unmap the port IO
resource on device removal.

Fixes: b8f04520ad ("virtio: use PCI ioport API")
Cc: stable@dpdk.org

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2019-06-20 23:42:04 +02:00
Tiwei Bie
2b38151f74 net/virtio: fix queue memory leak on error
We should free queues when we failed to initialize the virtio device.

Fixes: 26b683b4f7 ("net/virtio: setup Rx queue interrupts")
Cc: stable@dpdk.org

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2019-06-20 23:42:04 +02:00
Lavanya Govindarajan
0d8063fef6 net/iavf: move compile time define to configuration
DEBUG_DUMP_DESC flag is commented out in IAVF Makefile and to enable
it user needs to edit the Makefile. It is felt that this method is not
good. Hence removing this flag from IAVF makefile and adding a flag
CONFIG_RTE_LIBRTE_IAVF_DEBUG_DUMP_DESC to config/common_base.

Signed-off-by: Lavanya Govindarajan <lavanyax.govindarajan@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-06-20 23:42:04 +02:00
Stephen Hemminger
fe1d9ecb30 net/i40e: remove empty queue stats mapping set devops
This driver was inserting its own stub for queue_stats_mapping which
did nothing but cause this device to return a different errno
than every other device driver.  All devices that don't implement
queue stats mapping should return the same error.

Maybe the plan originally was to implement something, if that
ever happens, just put in the right code.

Fixes: 4861cde461 ("i40e: new poll mode driver")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2019-06-20 23:42:04 +02:00
David Marchand
448fab12fb net/ice: fix dropped packets statistics name
Copy/paste from i40e, let's align with the fix on i40e.

Fixes: a37bde5631 ("net/ice: support statistics")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Eelco Chaudron <echaudro@redhat.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-06-20 23:42:04 +02:00
David Marchand
61e5456cdf net/i40e: fix dropped packets statistics name
i40e and i40evf currently use two different names for the statistic on
dropped packets on the rx and tx sides.
Let's prefer i40evf so that all statistics are suffixed with _packets.

This also avoids a statistic name conflict in OVS.

Fixes: f4a91c38b4 ("i40e: add extended stats")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Eelco Chaudron <echaudro@redhat.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2019-06-20 23:42:04 +02:00
Andy Pei
ad57c785c8 net/ipn3ke: fix null pointer dereference
In 'ipn3ke_hw_tm_node_wr()', elements of 'n->parent_node' are accessed
but 'n->parent_node' can be NULL.

After applying this patch, this null pointer dereference is avoided.

Coverity issue: 337921
Fixes: c820468ac9 ("net/ipn3ke: support TM")
Cc: stable@dpdk.org

Signed-off-by: Andy Pei <andy.pei@intel.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
2019-06-20 23:42:04 +02:00
Andy Pei
320eecbc7f net/ipn3ke: fix accessing variable before null check
Check input argument "rte_eth_dev *ethdev", to be sure variable is not
NULL before operating on it.

Coverity issue: 337922
Fixes: 70d6b7f550 ("net/ipn3ke: add representor")
Cc: stable@dpdk.org

Signed-off-by: Andy Pei <andy.pei@intel.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
2019-06-20 23:42:04 +02:00
Andy Pei
50ade1a714 net/ipn3ke: delete identical branch
Whether the if statement is true or not, the operation is identical.
It is unnecessary to check the if statement, so just delete the if
statement.

Coverity issue: 337928
Fixes: c820468ac9 ("net/ipn3ke: support TM")
Cc: stable@dpdk.org

Signed-off-by: Andy Pei <andy.pei@intel.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
2019-06-20 23:42:04 +02:00
Beilei Xing
bd70c45153 net/ice: support Tx checksum offload for tunnel
Enable Tx checksum offload for tunneling packets by configuring
tunneling parameters in Tx descriptors, including outer L3/L4 checksum
offload.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-06-20 23:42:04 +02:00
Beilei Xing
b066f1d62d net/i40e: allow VF to configure pctype mapping
This patch allows VF to get/update/reset pctype mapping info.

Cc: stable@dpdk.org

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-06-20 23:42:04 +02:00
Stephen Hemminger
5e811a1a39 net/netvsc: initialize VF spinlock
The VF spinlock was never initialized. It works because it is
in zmalloc'd memory and an unlocked lock on x86 is 0.
But for good practice, all spinlock's should be initialized.

Fixes: dc7680e859 ("net/netvsc: support integrated VF")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
2019-06-20 23:42:04 +02:00
Gautam Dawar
5f6bd80769 net/sfc/base: add APIs for PTP privilege configuration
Implement the efx_proxy_auth_privilege_mask_get() to get a function's
privilege mask and efx_proxy_auth_privilege_modify() to add/remove
privileges for a function specified by PF and VF index.

Signed-off-by: Gautam Dawar <gdawar@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2019-06-20 23:42:04 +02:00
Gautam Dawar
03b8724119 net/sfc/base: provide API to fetch vPort statistics
Hypervisor should be able to track VF statistics.

Signed-off-by: Gautam Dawar <gdawar@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2019-06-20 23:42:04 +02:00
Gautam Dawar
ea94d14dbe net/sfc/base: provide APIs to configure and reset vPort
Implement functions to set vPort VLAN and MAC address and reset the vPort.

Signed-off-by: Gautam Dawar <gdawar@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2019-06-20 23:42:04 +02:00
Gautam Dawar
addbac71a0 net/sfc/base: provide proxy APIs to client drivers
Implement the APIs for PROXY_CMD, PROXY_COMPLETE and PRIVILEGE_MASK
messages to allow client drivers authorize VF operations like set MAC,
set MTU etc. with firmware.

Signed-off-by: Gautam Dawar <gdawar@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2019-06-20 23:42:04 +02:00
Gautam Dawar
47ac8ca735 net/sfc/base: implement proxy auth MCDI event handling
Add the capability to receive MCDI proxy event from firmware and
invoke the client driver registered function to handle it.

Signed-off-by: Gautam Dawar <gdawar@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2019-06-20 23:42:04 +02:00
Gautam Dawar
18c8e84d77 net/sfc/base: support proxy auth operations for SR-IOV
VMware expects that certain kind of configurations made on the VFs are
authorized by the ESXi before these are applied e.g. assigning a MAC
address to the VF, setting MTU etc. Firmware supports a feature called
MCDI proxy which will be used to implement this authorization check.
The proxy auth module is governed by EFSYS_OPT_MCDI_PROXY_AUTH switch.
This patch adds the framework for proxy auth module along with the APIs
required for SR-IOV initialization.

Signed-off-by: Gautam Dawar <gdawar@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2019-06-20 23:42:04 +02:00
Gautam Dawar
05fa170a2b net/sfc/base: support data path with EVB module
ef10_nic_init() allocates a vAdaptor for the physical port in current
flow. In case of SR-IOV, this vAdaptor must be created for the PF as the
vSwitch is allocated on the physical port. So, the call to
efx_mcdi_vadaptor_alloc() should be avoided in ef10_nic_init() in SR-IOV
flow. To achieve this, for SR-IOV use case, the vSwitch is created
before NIC initialization and its handle is used to prevent vAdaptor
allocation in ef10_nic_init(). This approach has been taken to minimize
the changes in NIC initialization flow.

This is also the case with Linux driver where vSwitch creation happens
before NIC initialization.

Also, when DMA queues need to be allocated for Tx/Rx functionality
(MC_CMD_INIT_RXQ / MC_CMD_INIT_TXQ), the correct vPort is selected
based on efx_vswitch_t property of efx_nic_t structure - vport
corresponding to PF in case of SR-IOV use case and EVB_PORT_ID_ASSIGNED
for physical port.

Signed-off-by: Gautam Dawar <gdawar@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2019-06-20 23:42:04 +02:00
Gautam Dawar
4625c4f527 net/sfc/base: factor out upstream port vAdaptor allocation
Separate out vAdaptor allocation from ef10_nic_init() as it is not
required for SR-IOV use case. In case of SR-IOV, vAdaptor is allocated
early along with vSwitch creation and vPort configuration.

Signed-off-by: Gautam Dawar <gdawar@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2019-06-20 23:42:04 +02:00
Gautam Dawar
d1708933bb net/sfc/base: implement vSwitch create/destroy
The vSwitch create API takes an array of num_vports client driver
allocated vPort config entries where entry at index 0 contains the PF
configuration and rest num_vports-1 entries refer to vPort configuration
for VFs 0 to (num_vports-2). The required hierarchy
(vswitch/vport/vadaptor) is created within this API. The destroy API
tears down this hierarchy and releases memory for the vSwitch object.

Signed-off-by: Gautam Dawar <gdawar@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2019-06-20 23:42:04 +02:00
Gautam Dawar
5a6c39eea6 net/sfc/base: add EVB module vSwitch/vPort/vAdaptor ops
Implement functions to allocate and free vSwitch, vPort and vAdaptor.
Also, implement functions to add and delete vPort MAC address and EVB
port assign.

Most of the efx_evb_ops_t functions take vSwitch ID as a parameter for
future enhancements. Currently, firmware doesn't implement vSwitch
identifier and hence this parameter is unused for EF10 architecture
implementation.

Signed-off-by: Gautam Dawar <gdawar@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2019-06-20 23:42:04 +02:00
Gautam Dawar
f0bda0cd68 net/sfc/base: add MCDI wrappers for vPort and vSwitch in EVB
Add the functions to implement the vPort and vSwitch MCDI calls.

Signed-off-by: Gautam Dawar <gdawar@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2019-06-20 23:42:04 +02:00
Gautam Dawar
4f12e20c85 net/sfc/base: introduce EVB module for SR-IOV
Implement the framework for Enterprise Virtual Briding (EVB) module.
SR-IOV augments the software virtual switch with NIC capabilities
supported from EVB module.
Further patches will add APIs to create and destroy EVB switching
hierarchy required for SR-IOV and APIs to set vPort properties like MAC,
VLAN etc.

Signed-off-by: Gautam Dawar <gdawar@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2019-06-20 23:42:04 +02:00
Gautam Dawar
5895208db6 net/sfc/base: export the zero-based MCDI port number
Proxy authorization module for SR-IOV requires one instance of proxy
data structures per card. In order to achieve this, proxy data
structures will be allocated only for primary port (port id 0) and other
secondary ports in the card will access those data structures through
reference to primary port. Accordingly, the port number obtained from
efx_mcdi_get_port_assignment is stored in NIC configuration as
enc_mcdi_port.

Signed-off-by: Gautam Dawar <gdawar@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2019-06-20 23:42:04 +02:00
Kevin Lampis
a53e5d85ee net/sfc/base: add definition of OEM TLV
Allows to enable additional functionality related to this OEM
(e.g. vendor extensions to VPD, NC-SI etc.)

Signed-off-by: Kevin Lampis <klampis@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2019-06-20 23:42:04 +02:00
Paul Fox
e0857044dd net/sfc/base: add definition of bundle metadata partition
Signed-off-by: Paul Fox <pfox@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2019-06-20 23:42:04 +02:00
Richard Houldsworth
8c25c8594f net/sfc/base: add background mode firmware updating
Request firmware updates be performed in background mode.
In this mode MCDI to the function processing the update
remains accessible and the client polls for completion.
This is supported for lengthy partition updates such as
MCFW and bundles. The MC ignores the flags used for this
mode for other partition updates.

Signed-off-by: Richard Houldsworth <rhouldsworth@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2019-06-20 23:42:04 +02:00
Richard Houldsworth
55e569ebc6 net/sfc/base: transition to the extensible NVRAM info API
Old NVRAM info API required function prototype too often.

Signed-off-by: Richard Houldsworth <rhouldsworth@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2019-06-20 23:42:04 +02:00
Richard Houldsworth
a1856e0d9f net/sfc/base: support direct FW update for bundle partitions
All signed images other than for the MCFW partition should
be written fully to the partition with no rearrangement.

Signed-off-by: Richard Houldsworth <rhouldsworth@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2019-06-20 23:42:04 +02:00
Richard Houldsworth
80f66b9432 net/sfc/base: add firmware ID header
Add definitions header for reflash header IDs. This is required to
support different handling modes for signed firmware images.

Signed-off-by: Richard Houldsworth <rhouldsworth@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2019-06-20 23:42:04 +02:00
Andrew Rybchenko
04ab83ea5a net/sfc/base: update MCDI headers
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2019-06-20 23:42:04 +02:00
Richard Houldsworth
ca7b214cc5 net/sfc/base: add NVRAM info
Add function to query partition characteristics.
Refactor efx_nvram_size to share implementation.

Signed-off-by: Richard Houldsworth <rhouldsworth@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2019-06-20 23:42:04 +02:00