Dharmik Thakkar [Sat, 15 Jun 2019 06:42:20 +0000 (08:42 +0200)]
test/hash: rectify slave id to point to valid cores
This patch rectifies slave_id to point to valid core indexes rather than
core ranks in read-write lock-free concurrency test.
It also replaces a 'for' loop with RTE_LCORE_FOREACH API.
Fixes:
c7eb0972e74b ("test/hash: add lock-free r/w concurrency")
Cc: stable@dpdk.org
Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
David Marchand [Sat, 15 Jun 2019 06:42:19 +0000 (08:42 +0200)]
test/hash: fix off-by-one check on core count
This subtest wants to start rwc_core_cnt[n] reader threads, while the
master core is waiting for them to report.
Fixes:
c7eb0972e74b ("test/hash: add lock-free r/w concurrency")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
David Marchand [Sat, 15 Jun 2019 06:42:18 +0000 (08:42 +0200)]
test/eventdev: move tests to the driver specific list
Same treatment than crypto tests, move the eventdev drivers tests in the
driver list.
While at it:
- eventdev_octeontx_autotest has been renamed as
eventdev_selftest_octeontx,
- eventdev_sw_autotest has been renamed as
eventdev_selftest_sw,
Fixes:
50fb749a3972 ("event/octeontx: move test to driver")
Fixes:
85fb515b7318 ("event/sw: move test to driver")
Fixes:
123d67c73b06 ("test/event: register selftests")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
David Marchand [Sat, 15 Jun 2019 06:42:17 +0000 (08:42 +0200)]
test/crypto: move tests to the driver specific list
For consistency, put all specific crypto driver tests in the dedicated
list (in alphabetic order).
While at it:
- remove dead reference to cryptodev_sw_mrvl_autotest (renamed as
cryptodev_sw_mvsam_autotest),
- call the crypto scheduler test only when built,
Fixes:
9eabcb682493 ("test: update autotest list")
Fixes:
3d20ffe6ddb1 ("test: reorder test cases in meson")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
David Marchand [Sat, 15 Jun 2019 06:42:16 +0000 (08:42 +0200)]
test/bonding: add missing sources for link bonding RSS
Fixes:
3d20ffe6ddb1 ("test: reorder test cases in meson")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Konstantin Ananyev [Thu, 6 Jun 2019 11:33:28 +0000 (12:33 +0100)]
ip_frag: fix IPv6 fragment size calculation
Take into account IPv6 fragment extension header when
calculating data size for each fragment.
Fixes:
7a838c8798a9 ("ip_frag: fix IPv6 when MTU sizes not aligned to 8 bytes")
Fixes:
0aa31d7a5929 ("ip_frag: add IPv6 fragmentation support")
Cc: stable@dpdk.org
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Phil Yang [Mon, 17 Jun 2019 07:41:30 +0000 (15:41 +0800)]
stack: fix sign of list length
clang raise 'pointer-sign' warnings in __atomic_compare_exchange
when passing 'uint64_t *' to parameter of type 'int64_t *' converts
between pointers to integer types with different sign.
Fixes:
7e6e609939a8 ("stack: add C11 atomic implementation")
Cc: stable@dpdk.org
Suggested-by: Gage Eads <gage.eads@intel.com>
Signed-off-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Gage Eads <gage.eads@intel.com>
Igor Ryzhov [Tue, 11 Jun 2019 08:49:34 +0000 (11:49 +0300)]
kernel/linux: fix modules install path
Currently kernel modules are installed into /usr/src instead of
/lib/modules when meson build system is used. This patch fixes that.
Cc: stable@dpdk.org
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Bruce Richardson [Thu, 6 Jun 2019 15:40:16 +0000 (16:40 +0100)]
kernel/freebsd: fix module build on latest head
Internal changes in the freebsd kernel have meant that additional includes
are now necessary to build the kernel modules for DPDK. Tested with latest
bsd HEAD revision.
Bugzilla ID: 282
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Thomas Monjalon [Wed, 26 Jun 2019 10:12:00 +0000 (12:12 +0200)]
eal/linux: fix return after alarm registration failure
When adding an alarm, if an error happen when registering
the common alarm callback, it is not considered as a major failure.
The alarm is then inserted in the list.
However it was returning an error code after inserting the alarm.
The error code is not set anymore to be consistent with the behaviour.
Fixes:
af75078fece3 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Xiaolong Ye [Wed, 5 Jun 2019 07:18:29 +0000 (15:18 +0800)]
eal: correct log for alarm error
Fixes:
af75078fece3 ("first public release")
Fixes:
764bf26873b9 ("add FreeBSD support")
Cc: stable@dpdk.org
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Stephen Hemminger [Wed, 26 Jun 2019 23:07:42 +0000 (16:07 -0700)]
mempool/octeontx2: fix build with icc
The Intel compiler is pickier about casts and generates:
otx2_mempool_ops.c(344):
error #191: type qualifier is meaningless on cast type
int64_t * const addr = (int64_t * const)
^
This is because of the nature of const.
In this example, the expression is being cast into a pointer
that can not be modified. This is meaningless because the
expression is already a lvalue.
See https://en.wikipedia.org/wiki/Const_(computer_programming)
Fixes:
d7a0da3c0043 ("mempool/octeontx2: add fast path mempool ops")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Arnon Warshavsky [Mon, 10 Jun 2019 07:08:29 +0000 (10:08 +0300)]
eal: do not panic on shared memory init
This patch changes some void functions to return a value,
so that the init sequence may tear down orderly
instead of calling panic.
Signed-off-by: Arnon Warshavsky <arnon@qwilt.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Marcin Smoczynski [Tue, 14 May 2019 14:04:16 +0000 (16:04 +0200)]
build: enable BSD features visibility for FreeBSD
When a component uses either XOPEN_SOURCE or POSIX_C_SOURCE macro
explicitly in its build recipe, it restricts visibility of a non POSIX
features subset, such as IANA protocol numbers (IPPROTO_* macros).
Non standard features are enabled by default for DPDK both for Linux
thanks to _GNU_SOURCE and for FreeBSD thanks to __BSD_VISIBLE. However
using XOPEN_SOURCE or POSIX_(C_)SOURCE in a component causes
__BSD_VISIBLE to be defined to 0 for FreeBSD, causing different feature
sets visibility for Linux and FreeBSD. It restricts from using IPPROTO
macros in public headers, such as rte_ip.h, despite the fact they are
already widely used in sources.
Add __BSD_VISIBLE macro specified unconditionally for FreeBSD targets
which enforces feature sets visibility unification between Linux and
FreeBSD.
Add single -D_GNU_SOURCE to config/meson.build as a project argument
instead of adding separate directive for each project subtree.
This patch solves the problem of build breaks for [1] on FreeBSD [2]
following the discussion [3].
[1] https://mails.dpdk.org/archives/dev/2019-May/131885.html
[2] http://mails.dpdk.org/archives/test-report/2019-May/082263.html
[3] https://mails.dpdk.org/archives/dev/2019-May/132110.html
Signed-off-by: Marcin Smoczynski <marcinx.smoczynski@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Rasesh Mody [Tue, 25 Jun 2019 23:11:00 +0000 (16:11 -0700)]
net/bnx2x: fix icc build
Fix a compilation issue seen with icc 19
Signed-off-by: Rasesh Mody <rmody@marvell.com>
Jerin Jacob [Tue, 25 Jun 2019 05:42:41 +0000 (11:12 +0530)]
maintainers: claim maintainership of net-mrvl sub-tree
Claim the maintainership of the sub tree dpdk-next-net-mrvl,
which covers all the Marvell network PMDs.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Jerin Jacob [Sat, 22 Jun 2019 13:24:17 +0000 (18:54 +0530)]
doc: add Marvell OCTEON TX2 mempool guide
Add Marvell OCTEON TX2 mempool documentation.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Vivek Sharma <viveksharma@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Jerin Jacob [Sat, 22 Jun 2019 13:24:16 +0000 (18:54 +0530)]
mempool/octeontx2: add devargs for max pool selection
The maximum number of mempools per application needs to be configured
on HW during mempool driver initialization. HW can support up to 1M
mempools, Since each mempool costs set of HW resources, the max_pools
devargs parameter is being introduced to configure the number of
mempools required for the application.
For example:
-w 0002:02:00.0,max_pools=512
With the above configuration, the driver will set up only 512 mempools
for the given application to save HW resources.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Harman Kalra <hkalra@marvell.com>
Pavan Nikhilesh [Sat, 22 Jun 2019 13:24:15 +0000 (18:54 +0530)]
mempool/octeontx2: add optimized dequeue operation for arm64
This patch adds an optimized arm64 instruction based routine to leverage
CPU pipeline characteristics of octeontx2. The theme is to fill the
pipeline with CASP operations as much HW can do so that HW can do alloc()
HW ops in full throttle.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Jerin Jacob [Sat, 22 Jun 2019 13:24:14 +0000 (18:54 +0530)]
mempool/octeontx2: add fast path mempool ops
Add enqueue and dequeue mempool fastpath operations.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Jerin Jacob [Sat, 22 Jun 2019 13:24:13 +0000 (18:54 +0530)]
mempool/octeontx2: add remaining slow path ops
Add remaining get_count(), calc_mem_size() and populate() slow path
mempool operations.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Jerin Jacob [Sat, 22 Jun 2019 13:24:12 +0000 (18:54 +0530)]
mempool/octeontx2: add mempool free op
The DPDK mempool free operation frees HW AURA
and POOL reserved in alloc operation. In addition to that it free all
the memory resources allocated in mempool alloc operations.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Jerin Jacob [Sat, 22 Jun 2019 13:24:11 +0000 (18:54 +0530)]
mempool/octeontx2: add mempool alloc op
The DPDK mempool allocation reserves a single HW AURA
and POOL in 1:1 map mode. Upon reservation, SW programs the slow path
operations such as allocate stack memory for DMA and
bunch HW configurations to respective HW blocks.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Jerin Jacob [Sat, 22 Jun 2019 13:24:10 +0000 (18:54 +0530)]
mempool/octeontx2: add context dump support
Add a helper function to dump aura and pool context for NPA debugging.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Vivek Sharma <viveksharma@marvell.com>
Jerin Jacob [Sat, 22 Jun 2019 13:24:09 +0000 (18:54 +0530)]
mempool/octeontx2: add NPA IRQ handler
Register and implement NPA IRQ handler for RAS and all type of
error interrupts to get the fatal errors from HW.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Harman Kalra <hkalra@marvell.com>
Jerin Jacob [Sat, 22 Jun 2019 13:24:08 +0000 (18:54 +0530)]
mempool/octeontx2: add NPA HW operations
Implement the low-level NPA HW operations such as
alloc, free memory, etc.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Jerin Jacob [Sat, 22 Jun 2019 13:24:07 +0000 (18:54 +0530)]
drivers: add init and fini on octeontx2 NPA object
NPA object needs to initialize memory for queue interrupts context,
pool resource management, etc. This patch adds support for initializing
and finalizing the NPA object.
This patch also updates the otx2_npa_lf definition to meet the init/fini
requirements.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Jerin Jacob [Sat, 22 Jun 2019 13:24:06 +0000 (18:54 +0530)]
mempool/octeontx2: add build infra and device probe
Add the make and meson based build infrastructure along
with the mempool(NPA) device probe.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Jerin Jacob [Sat, 22 Jun 2019 13:24:05 +0000 (18:54 +0530)]
doc: add Marvell OCTEON TX2 platform guide
Platform specific guide for Marvell OCTEON TX2 SoC is added.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Shally Verma <shallyv@marvell.com>
Signed-off-by: Vivek Sharma <viveksharma@marvell.com>
Nithin Dabilpuram [Sat, 22 Jun 2019 13:24:04 +0000 (18:54 +0530)]
common/octeontx2: add FLR IRQ handler
Upon receiving FLR request from VF, It is PF responsibly
forward to AF and enable FLR for VFs.
This patch adds support for VF FLR support in PF.
This patch also add otx2_dev_active_vfs() API to find
the number of active VF for given PF.
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Harman Kalra <hkalra@marvell.com>
Nithin Dabilpuram [Sat, 22 Jun 2019 13:24:03 +0000 (18:54 +0530)]
common/octeontx2: add uplink message support
The events like PHY link status change by AF or PHY configuration
change by PF would call for the uplink message.
The AF initiated uplink would land it in PF and PF would further
forward to VF(if it is intended for that specific VF)
The PF initiated uplink would be distributed to all active VFs.
This patch adds support for the same.
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Harman Kalra <hkalra@marvell.com>
Jerin Jacob [Sat, 22 Jun 2019 13:24:02 +0000 (18:54 +0530)]
common/octeontx2: add VF mailbox IRQ and msg handler
This patch adds support for PF <-> VF mailbox interrupt
mailbox message interrupt handling.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Nithin Dabilpuram [Sat, 22 Jun 2019 13:24:01 +0000 (18:54 +0530)]
common/octeontx2: add PF to VF mailbox IRQ and msg handlers
PF has additional responsibility being server for VF messages
and forward to AF and once AF process it then forward
the response back to VF.
otx2_vf_pf_mbox_irq() will process the VF mailbox request and
af_pf_wait_msg() will until getting a response back from AF.
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Krzysztof Kanas <kkanas@marvell.com>
Nithin Dabilpuram [Sat, 22 Jun 2019 13:24:00 +0000 (18:54 +0530)]
common/octeontx2: add AF to PF mailbox IRQ and msg handlers
This patch adds support for AF to PF mailbox interrupt and message
handling. PF writes the message on mapped mailbox region
followed by writing the mailbox doorbell register. Upon receiving,
the mailbox request in AF(In Linux kernel), It processes the messages
and update the counter memory and update the AF mbox doorbell
register. That would trigger a VFIO interrupt to userspace and
otx2_process_msgs() will handle it.
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Jerin Jacob [Sat, 22 Jun 2019 13:23:59 +0000 (18:53 +0530)]
common/octeontx2: handle intra device operations
The mempool device(NPA) may be provisioned as a standalone device or
it can be part of ethdev/eventdev device. In order to address
mempool as standalone or integrated with ethdev/eventdev device,
An intra device structure being introduced.
When the _first_ ethdev/eventdev PCIe device or standalone mempool(NPA)
devices get probed by the eal PCI subsystem,
The NPA object(struct otx2_npa_lf) stored in otx2_dev base class.
Once it is accomplished, the other consumer drivers like
ethdev driver or eventdev driver use otx2_npa_* API to operate on
shared NPA object.
The similar concept followed for SSO object, Which needs to share between
PCIe devices.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Jerin Jacob [Sat, 22 Jun 2019 13:23:58 +0000 (18:53 +0530)]
common/octeontx2: introduce irq handling functions
All PCIe drivers(ethdev, mempool, cryptodev and eventdev) in octeontx2,
needs to handle interrupt for mailbox and error handling.
Create a helper function over rte interrupt API to register,
unregister, disable interrupts.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Signed-off-by: Krzysztof Kanas <kkanas@marvell.com>
Jerin Jacob [Sat, 22 Jun 2019 13:23:57 +0000 (18:53 +0530)]
common/octeontx2: introduce common device class
Introduce otx2_dev class to hold octeontx2 PCIe device specific
information and operations.
All PCIe drivers(ethdev, mempool, cryptodev and eventdev) in octeontx2,
inherits this base object to avail the common functionalities such
as mailbox creation, interrupt registration, etc of the PCIe device.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Jerin Jacob [Sat, 22 Jun 2019 13:23:56 +0000 (18:53 +0530)]
common/octeontx2: add mailbox send and receive support
Each RVU device has a dedicated 64KB mailbox region
shared with its peer for communication. RVU AF has
a separate mailbox region shared with each of RVU PFs
and an RVU PF has a separate region shared with each of
it's VF.
This patch add use 64KB memory and implemented mailbox
send and receive support.
These set of APIs are used by this driver (RVU AF) and
other RVU PF/VF drivers eg ethdev, cryptodev e.t.c.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Jerin Jacob [Sat, 22 Jun 2019 13:23:55 +0000 (18:53 +0530)]
common/octeontx2: add runtime log infra
Various consumers of this common code need runtime
logging infrastructure. This patch adds the same.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Jerin Jacob [Sat, 22 Jun 2019 13:23:54 +0000 (18:53 +0530)]
common/octeontx2: add mailbox base support infra
This patch adds mailbox init and fini support.
Each RVU device has a dedicated 64KB mailbox region
shared with its peer for communication. RVU AF has
a separate mailbox region shared with each of RVU PFs
and an RVU PF has a separate region shared with
each of it's VF.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Jerin Jacob [Sat, 22 Jun 2019 13:23:53 +0000 (18:53 +0530)]
common/octeontx2: add mbox request and response definition
The admin function driver sits in Linux kernel as mailbox
server. The DPDK AF mailbox client, send the message to mailbox
server to complete the administrative task such as get mac
address.
This patch adds mailbox request and response definition of
existing mailbox defined between AF driver and DPDK driver.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Signed-off-by: Vivek Sharma <viveksharma@marvell.com>
Signed-off-by: Harman Kalra <hkalra@marvell.com>
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Signed-off-by: Krzysztof Kanas <kkanas@marvell.com>
Signed-off-by: Zyta Szpak <zyta@marvell.com>
Jerin Jacob [Sat, 22 Jun 2019 13:23:52 +0000 (18:53 +0530)]
common/octeontx2: add IO handling APIs
Various octeontx2 drivers use IO handling API, added octeontx2
specific IO handling routines in the common code.
Since some of those implementations are based on arm64 instructions
added the stub to compile the code on non arm64 ISA.
The non arm64 ISA stub is possible due to the fact that
it is an integrated controller i.e runs only on Marvell HW.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Jerin Jacob [Sat, 22 Jun 2019 13:23:51 +0000 (18:53 +0530)]
common/octeontx2: add build infrastructure and HW definition
Add the make and meson based build infrastructure along with
HW definition header file.
This patch adds skeleton otx2_mbox.c file to make sure
all header files are intact, subsequent patches add content
to otx2_mbox.c
This patch also updates CONFIG_RTE_MAX_VFIO_GROUPS
value to 128 as the system can have up to 128 PFs/VFs.
For octeontx2 meson build target, CONFIG_RTE_MAX_VFIO_GROUPS
defined as 128 so no additional changes required.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reshma Pattan [Tue, 18 Jun 2019 13:49:17 +0000 (14:49 +0100)]
telemetry: support global metrics
telemetry has support for fetching port based stats
from metrics library.
Metrics library also has global stats which are
not fetched by telemetry, so extend telemetry to
fetch the global metrics.
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
Qi Zhang [Wed, 19 Jun 2019 08:24:12 +0000 (16:24 +0800)]
maintainers: update dpdk-next-net-intel
Xiaolong Ye will replace Beilei Xing as co-maintainer of
dpdk-next-net-intel.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Stephen Hemminger [Wed, 19 Jun 2019 18:22:17 +0000 (11:22 -0700)]
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:
2af14ca79c0a ("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>
Stephen Hemminger [Wed, 19 Jun 2019 18:22:16 +0000 (11:22 -0700)]
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:
6041aa619f9a ("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>
Fan Zhang [Wed, 15 May 2019 16:09:11 +0000 (17:09 +0100)]
vhost/crypto: fix inferred misuse of enum
This patch fixes the inferred misuse of enum of crypto algorithms.
Coverity issue: 325879
Fixes:
e80a98708166 ("vhost/crypto: add session message handler")
Cc: stable@dpdk.org
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Fan Zhang [Wed, 15 May 2019 16:19:48 +0000 (17:19 +0100)]
vhost/crypto: fix logically dead code
This patch fixes a few same class bugs that causes the
logically dead code in vhost_crypto.
Coverity issue: 277236, 277233, 277220, 277214
Fixes:
3bb595ecd682 ("vhost/crypto: add request handler")
Cc: stable@dpdk.org
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Fan Zhang [Wed, 15 May 2019 16:25:48 +0000 (17:25 +0100)]
examples/vhost_crypto: remove unused function
This patch tries to fix the coverity issue of unchecked
return value. Since the function that causes the problem
is unused, it is removed completely.
Coverity issue: 336816
Fixes:
f5188211c721 ("examples/vhost_crypto: add sample application")
Cc: stable@dpdk.org
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Reviewed-by: Jens Freimann <jfreimann@redhat.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Noa Ezra [Thu, 20 Jun 2019 05:44:41 +0000 (05:44 +0000)]
vhost: fix missing include
Add a missing include with the defines for vhost-user driver features.
Fixes:
5fbb3941da9f ("vhost: introduce driver features related APIs")
Cc: stable@dpdk.org
Signed-off-by: Noa Ezra <noae@mellanox.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Matan Azrad <matan@mellanox.com>
Tiwei Bie [Thu, 20 Jun 2019 02:34:36 +0000 (10:34 +0800)]
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:
a76290c8f1cf ("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>
Tiwei Bie [Thu, 20 Jun 2019 02:34:35 +0000 (10:34 +0800)]
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:
a76290c8f1cf ("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>
Tiwei Bie [Thu, 20 Jun 2019 02:34:34 +0000 (10:34 +0800)]
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:
bcac5aa207f8 ("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>
Tiwei Bie [Thu, 20 Jun 2019 02:34:33 +0000 (10:34 +0800)]
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:
e5f456a98d3c ("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>
Dilshod Urazov [Mon, 17 Jun 2019 11:31:38 +0000 (12:31 +0100)]
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:
4fb7e803eb1a ("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>
Dilshod Urazov [Mon, 17 Jun 2019 11:31:37 +0000 (12:31 +0100)]
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:
4fb7e803eb1a ("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>
David Marchand [Mon, 17 Jun 2019 07:54:42 +0000 (09:54 +0200)]
examples/vdpa: remove trace of legacy linuxapp
This check on Linux environment has been added at a time when we already
had switched to using the boolean RTE_EXEC_ENV_LINUXAPP.
It was then missed when converting to RTE_EXEC_ENV_LINUX.
Fixes:
edbed86d1cc3 ("examples/vdpa: introduce a new sample for vDPA")
Fixes:
742bde12f3bd ("build/linux: rename macro from LINUXAPP to LINUX")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
Tiwei Bie [Wed, 5 Jun 2019 09:43:42 +0000 (17:43 +0800)]
app/testpmd: drop the workaround for virtio-user
The RTE_ETH_DEV_CLOSE_REMOVE support has been enabled in
virtio-user, private resources for the port will be freed
by rte_eth_dev_close(), so there is no need to have this
workaround anymore.
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Tiwei Bie [Wed, 5 Jun 2019 09:43:41 +0000 (17:43 +0800)]
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>
Tiwei Bie [Wed, 5 Jun 2019 09:43:40 +0000 (17:43 +0800)]
net/virtio: unmap device on initialization error
We should unmap the device when we failed to initialize the device.
Fixes:
6ba1f63b5ab0 ("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>
Tiwei Bie [Wed, 5 Jun 2019 09:43:39 +0000 (17:43 +0800)]
net/virtio: unmap port IO for legacy device
For legacy devices, we should also unmap the port IO
resource on device removal.
Fixes:
b8f04520ad71 ("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>
Tiwei Bie [Wed, 5 Jun 2019 09:43:38 +0000 (17:43 +0800)]
net/virtio: fix queue memory leak on error
We should free queues when we failed to initialize the virtio device.
Fixes:
26b683b4f7d0 ("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>
Lavanya Govindarajan [Mon, 10 Jun 2019 13:07:38 +0000 (14:07 +0100)]
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>
Stephen Hemminger [Tue, 28 May 2019 19:43:18 +0000 (12:43 -0700)]
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:
4861cde46116 ("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>
David Marchand [Mon, 3 Jun 2019 08:31:28 +0000 (10:31 +0200)]
net/ice: fix dropped packets statistics name
Copy/paste from i40e, let's align with the fix on i40e.
Fixes:
a37bde56314d ("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>
David Marchand [Mon, 3 Jun 2019 08:31:27 +0000 (10:31 +0200)]
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:
f4a91c38b4ad ("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>
Andy Pei [Thu, 23 May 2019 04:31:22 +0000 (12:31 +0800)]
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:
c820468ac99c ("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>
Andy Pei [Thu, 23 May 2019 02:53:03 +0000 (10:53 +0800)]
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:
70d6b7f550f4 ("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>
Andy Pei [Wed, 22 May 2019 06:44:42 +0000 (14:44 +0800)]
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:
c820468ac99c ("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>
Beilei Xing [Tue, 18 Jun 2019 07:04:48 +0000 (15:04 +0800)]
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>
Beilei Xing [Mon, 17 Jun 2019 03:17:35 +0000 (11:17 +0800)]
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>
Stephen Hemminger [Thu, 6 Jun 2019 16:15:10 +0000 (09:15 -0700)]
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:
dc7680e8597c ("net/netvsc: support integrated VF")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Gautam Dawar [Mon, 10 Jun 2019 07:38:44 +0000 (08:38 +0100)]
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>
Gautam Dawar [Mon, 10 Jun 2019 07:38:43 +0000 (08:38 +0100)]
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>
Gautam Dawar [Mon, 10 Jun 2019 07:38:42 +0000 (08:38 +0100)]
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>
Gautam Dawar [Mon, 10 Jun 2019 07:38:41 +0000 (08:38 +0100)]
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>
Gautam Dawar [Mon, 10 Jun 2019 07:38:40 +0000 (08:38 +0100)]
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>
Gautam Dawar [Mon, 10 Jun 2019 07:38:39 +0000 (08:38 +0100)]
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>
Gautam Dawar [Mon, 10 Jun 2019 07:38:38 +0000 (08:38 +0100)]
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>
Gautam Dawar [Mon, 10 Jun 2019 07:38:37 +0000 (08:38 +0100)]
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>
Gautam Dawar [Mon, 10 Jun 2019 07:38:36 +0000 (08:38 +0100)]
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>
Gautam Dawar [Mon, 10 Jun 2019 07:38:35 +0000 (08:38 +0100)]
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>
Gautam Dawar [Mon, 10 Jun 2019 07:38:34 +0000 (08:38 +0100)]
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>
Gautam Dawar [Mon, 10 Jun 2019 07:38:33 +0000 (08:38 +0100)]
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>
Gautam Dawar [Mon, 10 Jun 2019 07:38:32 +0000 (08:38 +0100)]
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>
Kevin Lampis [Mon, 10 Jun 2019 07:38:31 +0000 (08:38 +0100)]
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>
Paul Fox [Mon, 10 Jun 2019 07:38:30 +0000 (08:38 +0100)]
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>
Richard Houldsworth [Mon, 10 Jun 2019 07:38:29 +0000 (08:38 +0100)]
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>
Richard Houldsworth [Mon, 10 Jun 2019 07:38:28 +0000 (08:38 +0100)]
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>
Richard Houldsworth [Mon, 10 Jun 2019 07:38:27 +0000 (08:38 +0100)]
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>
Richard Houldsworth [Mon, 10 Jun 2019 07:38:26 +0000 (08:38 +0100)]
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>
Andrew Rybchenko [Mon, 10 Jun 2019 07:38:25 +0000 (08:38 +0100)]
net/sfc/base: update MCDI headers
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Richard Houldsworth [Mon, 10 Jun 2019 07:38:24 +0000 (08:38 +0100)]
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>
Richard Houldsworth [Mon, 10 Jun 2019 07:38:23 +0000 (08:38 +0100)]
net/sfc/base: add extensible NVRAM info function
Includes the partition read-only flag, to allow for
checks before opening the partition.
Signed-off-by: Richard Houldsworth <rhouldsworth@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Richard Houldsworth [Mon, 10 Jun 2019 07:38:22 +0000 (08:38 +0100)]
net/sfc/base: add capabilities for bundle partition
Signed-off-by: Richard Houldsworth <rhouldsworth@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Richard Houldsworth [Mon, 10 Jun 2019 07:38:21 +0000 (08:38 +0100)]
net/sfc/base: add driver version string registration
Support the registration of a version string by the libefx
client. The string is passed on to the MC in efx_nic_probe
only to allow the MC to advertise the OS driver version in
NC-SI, and the content is considered opaque for libefx.
Signed-off-by: Richard Houldsworth <rhouldsworth@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andrew Rybchenko [Mon, 10 Jun 2019 07:38:20 +0000 (08:38 +0100)]
net/sfc/base: do not rely on indirect header inclusion
Types defined in efx_types.h are used in efx.h and it is better do
not rely on the header inclusion from somewhere else (typically from
efsys.h).
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Mark Spender [Mon, 10 Jun 2019 07:38:19 +0000 (08:38 +0100)]
net/sfc/base: improve code style in sensors decoding
Add more comments to simplify code reading and understanding.
Signed-off-by: Mark Spender <mspender@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Mark Spender [Mon, 10 Jun 2019 07:38:18 +0000 (08:38 +0100)]
net/sfc/base: fix shift by more bits than field width
This was probably an oversight when support for multiple sensor pages
was added.
Despite being undefined behaviour in C, it probably worked on Intel
x32/x64 as on them bit shift operations wrap round.
Fixes:
dfb3b1ce15f6 ("net/sfc/base: import monitors access via MCDI")
Cc: stable@dpdk.org
Signed-off-by: Mark Spender <mspender@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>