Jianfeng Tan [Sun, 15 Apr 2018 15:06:19 +0000 (15:06 +0000)]
vfio: use generic multi-process channel
Previously, vfio uses its own private channel for the secondary
process to get container fd and group fd from the primary process.
This patch changes to use the generic mp channel.
Test:
1. Bind two NICs to vfio-pci.
2. Start the primary and secondary process.
$ (symmetric_mp) -c 2 -- -p 3 --num-procs=2 --proc-id=0
$ (symmetric_mp) -c 4 --proc-type=auto -- -p 3 \
--num-procs=2 --proc-id=1
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Thomas Monjalon [Thu, 5 Apr 2018 15:33:22 +0000 (17:33 +0200)]
ethdev: deprecate port count function
Some DPDK applications wrongly assume these requirements:
- no hotplug, i.e. ports are never detached
- all allocated ports are available to the application
Such application iterates over ports by its own mean.
The most common pattern is to request the port count and
assume ports with index in the range [0..count[ can be used.
In order to fix this common mistake in all external applications,
the function rte_eth_dev_count is deprecated, while introducing
the new functions rte_eth_dev_count_avail and rte_eth_dev_count_total.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Thomas Monjalon [Thu, 5 Apr 2018 15:33:21 +0000 (17:33 +0200)]
fix ethdev port id validation
Some DPDK applications wrongly assume these requirements:
- no hotplug, i.e. ports are never detached
- all allocated ports are available to the application
Such application assume a valid port index is in the range [0..count[.
There are three consequences when using such wrong design:
- new ports having an index higher than the port count won't be valid
- old ports being detached (RTE_ETH_DEV_UNUSED) can be valid
Such mistake will be less common with growing hotplug awareness.
All applications and examples inside this repository - except testpmd -
must be fixed to use the function rte_eth_dev_is_valid_port.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Thomas Monjalon [Thu, 5 Apr 2018 15:33:20 +0000 (17:33 +0200)]
fix ethdev ports enumeration
Some DPDK applications wrongly assume these requirements:
- no hotplug, i.e. ports are never detached
- all allocated ports are available to the application
Such application iterates over ports by its own mean.
The most common pattern is to request the port count and
assume ports with index in the range [0..count[ can be used.
There are three consequences when using such wrong design:
- new ports having an index higher than the port count won't be seen
- old ports being detached (RTE_ETH_DEV_UNUSED) can be seen as ghosts
- failsafe sub-devices (RTE_ETH_DEV_DEFERRED) will be seen by the application
Such mistake will be less common with growing hotplug awareness.
All applications and examples inside this repository - except testpmd -
must be fixed to use the iterator RTE_ETH_FOREACH_DEV.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Olivier Matz [Tue, 3 Apr 2018 13:26:44 +0000 (15:26 +0200)]
ring: relax alignment constraint on ring structure
The initial objective of
commit
d9f0d3a1ffd4 ("ring: remove split cacheline build setting")
was to add an empty cache line between the producer and consumer
data (on platform with cache line size = 64B), preventing from
having them on adjacent cache lines.
Following discussion on the mailing list, it appears that this
also imposes an alignment constraint that is not required.
This patch removes the extra alignment constraint and adds the
empty cache lines using padding fields in the structure. The
size of rte_ring structure and the offset of the fields remain
the same on platforms with cache line size = 64B:
rte_ring = 384
rte_ring.name = 0
rte_ring.flags = 32
rte_ring.memzone = 40
rte_ring.size = 48
rte_ring.mask = 52
rte_ring.prod = 128
rte_ring.cons = 256
But it has an impact on platform where cache line size is 128B:
rte_ring = 384 -> 768
rte_ring.name = 0
rte_ring.flags = 32
rte_ring.memzone = 40
rte_ring.size = 48
rte_ring.mask = 52
rte_ring.prod = 128 -> 256
rte_ring.cons = 256 -> 512
Suggested-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Adrien Mazarguil [Fri, 13 Apr 2018 18:43:01 +0000 (20:43 +0200)]
eal: fix signed integers in fbarray
While debugging startup issues encountered with Clang (see "eal: fix
undefined behavior in fbarray"), I noticed that fbarray stores indices,
sizes and masks on signed integers involved in bitwise operations.
Such operations almost invariably cause undefined behavior with values that
cannot be represented by the result type, as is often the case with
bit-masks and left-shifts.
This patch replaces them with unsigned integers as a safety measure and
promotes a few internal variables to larger types for consistency.
Coverity issue: 272598, 272599
Fixes:
c44d09811b40 ("eal: add shared indexed file-backed array")
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Adrien Mazarguil [Fri, 13 Apr 2018 18:42:58 +0000 (20:42 +0200)]
eal: fix undefined behavior in fbarray
According to GCC documentation [1], the __builtin_clz() family of functions
yield undefined behavior when fed a zero value. There is one instance in
the fbarray code where this can occur.
Clang (at least version 3.8.0-2ubuntu4) seems much more sensitive to this
than GCC and yields random results when compiling optimized code, as shown
below:
#include <stdio.h>
int main(void)
{
volatile unsigned long long moo;
int x;
moo = 0;
x = __builtin_clzll(moo);
printf("%d\n", x);
return 0;
}
$ gcc -O3 -o test test.c && ./test
63
$ clang -O3 -o test test.c && ./test
1742715559
$ clang -O0 -o test test.c && ./test
63
Even 63 can be considered an unexpected result given the number of leading
zeroes should be the full width of the underlying type, i.e. 64.
In practice it causes find_next_n() to sometimes return negative values
interpreted as errors by caller functions, which prevents DPDK applications
from starting due to inability to find free memory segments:
# testpmd [...]
EAL: Detected 32 lcore(s)
EAL: Detected 2 NUMA nodes
EAL: No free hugepages reported in hugepages-1048576kB
EAL: Multi-process socket /var/run/.rte_unix
EAL: eal_memalloc_alloc_seg_bulk(): couldn't find suitable memseg_list
EAL: FATAL: Cannot init memory
EAL: Cannot init memory
PANIC in main():
Cannot init EAL
4: [./build/app/testpmd(_start+0x29) [0x462289]]
3: [/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)
[0x7f19d54fc830]]
2: [./build/app/testpmd(main+0x8a3) [0x466193]]
1: [./build/app/testpmd(__rte_panic+0xd6) [0x4efaa6]]
Aborted
This problem appears with commit
66cc45e293ed ("mem: replace memseg with
memseg lists") however the root cause is introduced by a prior patch.
[1] https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html
Fixes:
c44d09811b40 ("eal: add shared indexed file-backed array")
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Fan Zhang [Mon, 16 Apr 2018 14:08:58 +0000 (15:08 +0100)]
vhost/crypto: fix build without cryptodev
Vhost-Crypto shall not be compiled if rte_cryptodev is disabled.
This patch fix this by adding checking to Makefile.
Fixes:
d090c7f86a76 ("vhost/crypto: update makefile")
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Anatoly Burakov [Fri, 13 Apr 2018 15:58:39 +0000 (16:58 +0100)]
malloc: fix not unlocking hotplug on fail to init
We lock the hotplug during init, but do not unlock it if we couldn't
register multiprocess callbacks. Add the missing unlock.
Fixes:
07dcbfe0101f ("malloc: support multiprocess memory hotplug")
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Fri, 13 Apr 2018 14:16:19 +0000 (15:16 +0100)]
ipc: fix missing mutex unlocks on failed send
Earlier fix for race condition introduced a bug where mutex
wasn't unlocked if message failed to be sent. Fix all of this
by moving locking out of mp_request_sync() altogether.
Fixes:
da5957821bdd ("eal: fix race condition in IPC request")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Fri, 13 Apr 2018 15:55:44 +0000 (16:55 +0100)]
ipc: fix missing ignore message name
We are trying to notify sender that response from current process
should be ignored, but we didn't specify which request this response
was for. Fix by copying request name from the original message.
Fixes:
579a4ccc345c ("eal: ignore IPC messages until init is complete")
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Jianfeng Tan <jianfeng.tan@intel.com>
Anatoly Burakov [Fri, 13 Apr 2018 11:55:00 +0000 (12:55 +0100)]
ipc: fix use-after-free in asynchronous requests
Previously, we were removing request from the list only if we
have succeeded to send it. This resulted in leaving an invalid
pointer in the request list.
Fix this by only adding new requests to the request list if we
have succeeded in sending them.
Fixes:
f05e26051c15 ("eal: add IPC asynchronous request")
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Jianfeng Tan <jianfeng.tan@intel.com>
Anatoly Burakov [Fri, 13 Apr 2018 11:54:59 +0000 (12:54 +0100)]
ipc: fix use-after-free in synchronous requests
Previously, we were adding synchronous requests to request list, we
were doing it after checking if request existed. However, we only
removed the request from the request list if we have succeeded in
sending the request. In case of failed request send, we left an
invalid pointer in the request list.
Fix this by only adding request to the list once we succeed in
sending it.
Fixes:
783b6e54971d ("eal: add synchronous multi-process communication")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Jianfeng Tan <jianfeng.tan@intel.com>
Anatoly Burakov [Tue, 10 Apr 2018 15:28:51 +0000 (16:28 +0100)]
ipc: stop async IPC loop on callback request
EAL did not stop processing further asynchronous requests on
encountering a request that should trigger the callback. This
resulted in erasing valid requests but not triggering them.
Fix this by stopping the loop once we have a request that
can trigger the callback. Once triggered, we go back to scanning
the request queue until there are no more callbacks to trigger.
Fixes:
f05e26051c15 ("eal: add IPC asynchronous request")
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Jianfeng Tan <jianfeng.tan@intel.com>
Anatoly Burakov [Mon, 16 Apr 2018 12:13:56 +0000 (13:13 +0100)]
vfio: export functions even when disabled
Previously, VFIO functions were not compiled in and exported if
VFIO compilation was disabled. Fix this by actually compiling
all of the functions unconditionally, and provide missing
prototypes on Linux.
Fixes:
279b581c897d ("vfio: expose functions")
Fixes:
73a639085938 ("vfio: allow to map other memory regions")
Fixes:
964b2f3bfb07 ("vfio: export some internal functions")
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Ferruh Yigit [Mon, 16 Apr 2018 17:09:29 +0000 (18:09 +0100)]
net/sfc: fix meson build warning with gcc
icc flag is causing build error with gcc, build error:
cc1: warning: unrecognized gcc debugging option: i
cc1: warning: unrecognized gcc debugging option: g
cc1: warning: unrecognized gcc debugging option: -
cc1: warning: unrecognized gcc debugging option: d
cc1: warning: unrecognized gcc debugging option: i
cc1: warning: unrecognized gcc debugging option: s
cc1: warning: unrecognized gcc debugging option: b
cc1: warning: unrecognized gcc debugging option: l
cc1: warning: unrecognized gcc debugging option: e
cc1: warning: unrecognized gcc debugging option:
cc1: warning: unrecognized gcc debugging option: 3
cc1: warning: unrecognized gcc debugging option: 6
cc1: warning: unrecognized gcc debugging option: 5
cc1: warning: unrecognized gcc debugging option: 6
cc1: warning: unrecognized command line option
‘-Wno-address-of-packed-member’
Removing icc flag completely since it is not supported right now.
Fixes:
f16d0b36f816 ("drivers/net: fix icc deprecated parameter warning")
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Bruce Richardson [Mon, 16 Apr 2018 13:39:11 +0000 (14:39 +0100)]
net/ixgbe: fix build when vector driver disabled
The new functions for Rx and Tx offloads should not be inside the
conditional block for the vector driver, otherwise compile errors occur
when vector driver is disabled. For example:
ixgbe_ethdev.c:3636:36: error:
implicit declaration of function ‘ixgbe_get_rx_queue_offloads’;
This shows up as an error when doing ARM builds using meson as the vector
driver is not (yet) enabled for those builds.
Fixes:
51215925a32f ("net/ixgbe: convert to new Tx offloads API")
Fixes:
ec3b1124d14d ("net/ixgbe: convert to new Rx offloads API")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Pavan Nikhilesh [Mon, 16 Apr 2018 10:46:31 +0000 (16:16 +0530)]
app/eventdev: fix typos in timer adapter options
The options names in code and doc are not the same.
Fixes:
98c6292105d4 ("app/eventdev: add options for event timer adapter")
Suggested-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Pavan Nikhilesh [Mon, 16 Apr 2018 13:13:23 +0000 (18:43 +0530)]
app/eventdev: fix build with gcc 4.8
test_perf_common.c: In function ‘perf_event_timer_producer’:
test_perf_common.c:99:3: error: missing initializer for
field ‘priority’ of ‘struct <anonymous>’
[-Werror=missing-field-initializers]
.ev.sched_type = t->opt->sched_type_list[0],
Fixes:
d008f20bce23 ("app/eventdev: add event timer adapter as a producer")
Reported-by: Andrew Rybchenko <arybchenko@solarflare.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Tested-by: Andrew Rybchenko <arybchenko@solarflare.com>
Gowrishankar Muthukrishnan [Fri, 13 Apr 2018 05:06:31 +0000 (10:36 +0530)]
event/dpaa: fix integer overflow of max ports
dev_info->max_event_ports is uint8_t. dpaa_event_dev_info_get assigns
DPAA_EVENT_MAX_EVENT_PORT (which is RTE_MAX_LCORE, upto 256 in ppc64le)
into this variable, which breaks compile in ppc64le.
drivers/event/dpaa/dpaa_eventdev.c: In function ‘dpaa_event_dev_info_get’:
rte_config.h:23:23: error:
large integer implicitly truncated to unsigned type [-Werror=overflow]
#define RTE_MAX_LCORE 256
Fixes:
9caac5dd1e ("event/dpaa: introduce PMD")
Cc: stable@dpdk.org
Signed-off-by: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
Acked-by: Sunil Kumar Kori <sunil.kori@nxp.com>
Rami Rosen [Sat, 14 Apr 2018 00:20:17 +0000 (20:20 -0400)]
eventdev: remove stale forward declaration
This patch removes the decalartion of rte_eventdev_driver from
rte_eventdev.h, as it not used anymore; pci_eventdev_skeleton_pmd
moved to use rte_pci_driver instead of rte_eventdev_driver.
Fixes:
7214438d93e6 ("eventdev: remove PCI dependency from generic structures")
Cc: stable@dpdk.org
Signed-off-by: Rami Rosen <rami.rosen@intel.com>
Pavan Nikhilesh [Mon, 9 Apr 2018 21:00:34 +0000 (02:30 +0530)]
event/octeontx: add option to use fpavf as chunk pool
Add compile-time configurable option to force TIMvf to use Octeontx
FPAvf pool manager as its chunk pool.
When FPAvf is used as pool manager the TIMvf automatically frees the
chunks to FPAvf through gpool-id.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Pavan Nikhilesh [Mon, 9 Apr 2018 21:00:33 +0000 (02:30 +0530)]
event/octeontx: optimize timer adapter resolution parameters
When application sets `RTE_EVENT_TIMER_ADAPTER_F_ADJUST_RES` flag
while creating adapter underlying driver is free to optimize the
resolution for best possible configuration.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Pavan Nikhilesh [Mon, 9 Apr 2018 21:00:32 +0000 (02:30 +0530)]
event/octeontx: add burst mode for timer arm
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Pavan Nikhilesh [Mon, 9 Apr 2018 21:00:31 +0000 (02:30 +0530)]
event/octeontx: add single producer timer arm variant
When application creates the timer adapter by passing
`RTE_EVENT_TIMER_ADAPTER_F_SP_PUT` flag, we can optimize the arm sequence
by removing the locking overhead.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Pavan Nikhilesh [Mon, 9 Apr 2018 21:00:30 +0000 (02:30 +0530)]
event/octeontx: add multiproducer timer arm and cancel
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Pavan Nikhilesh [Mon, 9 Apr 2018 21:00:29 +0000 (02:30 +0530)]
event/octeontx: add event timer stats get and reset
Add functions to get and reset event timer adapter stats.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Pavan Nikhilesh [Mon, 9 Apr 2018 21:00:28 +0000 (02:30 +0530)]
event/octeontx: start and stop timer device
When application requests to start the timer adapter through
`rte_event_timer_adapter_start`, Octeontx TIMvf ring does the
following:
- Uses mbox to communicate TIMpf driver about,
* SCLK frequency used to convert ns<->cycles.
* program the ring control parameters and start the ring.
* get the exact cycle at which the TIMvf ring has started which can be
used to estimate the bucket position.
On `rte_event_timer_adapter_stop` i.e stop, Octeontx TIMvf ring does the
following:
- Use mbox to communicate TIMpf driver about,
* reset the ring control parameters and stop the ring.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Pavan Nikhilesh [Mon, 9 Apr 2018 21:00:27 +0000 (02:30 +0530)]
event/octeontx: create and free timer adapter
When the application requests to create a timer device, Octeontx TIM
create does the following:
- Get the requested TIMvf ring based on adapter_id.
- Verify the config parameters supplied.
- Allocate memory required for
* Buckets based on min and max timeout supplied.
* Allocate the chunk pool based on the number of timers.
- Clear the interrupts.
On Free:
- Free the allocated bucket and chunk memory.
- Free private data used by TIMvf.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Pavan Nikhilesh [Mon, 9 Apr 2018 21:00:26 +0000 (02:30 +0530)]
event/octeontx: probe timvf PCIe devices
On Octeontx HW, each event timer device is enumerated as separate SRIOV VF
PCIe device.
In order to expose as a event timer device:
On PCIe probe, the driver stores the information associated with the
PCIe device and later when application requests for a event timer device
through `rte_event_timer_adapter_create` the driver infrastructure creates
the timer adapter with earlier probed PCIe VF devices.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Pavan Nikhilesh [Mon, 9 Apr 2018 21:00:25 +0000 (02:30 +0530)]
usertools: add Cavium TIM as an event device
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Pavan Nikhilesh [Fri, 6 Apr 2018 15:13:23 +0000 (20:43 +0530)]
app/eventdev: add options for event timer adapter
Add options to configure expiry timeout, max number of timers and number
of event timer adapters through command line parameters.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Pavan Nikhilesh [Fri, 6 Apr 2018 15:13:22 +0000 (20:43 +0530)]
app/eventdev: add burst mode for event timer adapter
Add burst mode for event timer adapter that can be selected by passing
--prod_type_timerdev_burst.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Pavan Nikhilesh [Fri, 6 Apr 2018 15:13:21 +0000 (20:43 +0530)]
app/eventdev: add event timer adapter as a producer
Add event timer adapter as producer option that can be selected by
passing --prod_type_timerdev.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Erik Gabriel Carrillo [Wed, 4 Apr 2018 21:51:13 +0000 (16:51 -0500)]
doc: add event timer adapter guide
Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Erik Gabriel Carrillo [Wed, 4 Apr 2018 21:51:12 +0000 (16:51 -0500)]
test: add event timer adapter auto-test
Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Erik Gabriel Carrillo [Wed, 4 Apr 2018 21:51:10 +0000 (16:51 -0500)]
eventdev: add default software timer adapter
If an eventdev PMD does not wish to provide event timer adapter ops
definitions, the library will fall back to a default software
implementation whose entry points are added by this commit.
Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Erik Gabriel Carrillo [Wed, 4 Apr 2018 21:51:09 +0000 (16:51 -0500)]
mk: update timer library order in static build
The introduction of the event timer adapter library adds a dependency
on the rte_timer library from the rte_eventdev library. Update the
order so that the timer library comes after the eventdev library in the
linker command when statically linking applications.
Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Erik Gabriel Carrillo [Wed, 4 Apr 2018 21:51:08 +0000 (16:51 -0500)]
eventdev: add timer adapter common code
This commit adds the logic that is shared by all event timer adapter
drivers; the common code handles instance allocation and some
initialization.
Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Erik Gabriel Carrillo [Wed, 4 Apr 2018 21:51:07 +0000 (16:51 -0500)]
eventdev: convert to SPDX license tag in header
Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Erik Gabriel Carrillo [Wed, 4 Apr 2018 21:51:06 +0000 (16:51 -0500)]
eventdev: introduce event timer adapter
Event devices can be coupled with various components to provide
new event sources by using event adapters. The event timer adapter
is one such adapter; it bridges event devices and timer mechanisms.
This library extends the event-driven programming model by
introducing a new type of event that represents a timer expiration,
and it provides APIs with which adapters can be created or destroyed
and event timers can be armed and canceled.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Mattias Rönnblom [Tue, 3 Apr 2018 08:19:03 +0000 (10:19 +0200)]
eventdev: fix MP/MC tail updates in event ring
rte_event_ring enqueue and dequeue tail updates were hardcoded for a
SC/SP configuration.
Fixes:
dc39e2f359b5 ("eventdev: add ring structure for events")
Cc: stable@dpdk.org
Signed-off-by: Mattias Rönnblom <hofors@lysator.liu.se>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Jerin Jacob [Tue, 20 Mar 2018 11:59:55 +0000 (17:29 +0530)]
event/octeontx: support device stop flush callback
Add support for stop flush callback along with unit test.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Gage Eads <gage.eads@intel.com>
Gage Eads [Mon, 2 Apr 2018 18:03:30 +0000 (13:03 -0500)]
eventdev: add device stop flush callback
When an event device is stopped, it drains all event queues and ports.
These events may contain pointers, so to prevent memory leaks eventdev now
supports a user-provided flush callback that is called during the queue
drain process. This callback is stored in process memory, so the callback
must be registered by any process that may call rte_event_dev_stop().
This commit also clarifies the behavior of rte_event_dev_stop().
This follows this mailing list discussion:
http://dpdk.org/ml/archives/dev/2018-January/087484.html
Signed-off-by: Gage Eads <gage.eads@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Liang Ma [Tue, 27 Mar 2018 14:18:12 +0000 (15:18 +0100)]
event/opdl: fix atomic queue race condition
If application link one atomic queue to multiple ports,
and each worker core update flow_id, there will have a
chance to hit race condition issue and lead to double processing
same event. This fix solve the problem and eliminate
the race condition issue.
Fixes:
4236ce9bf5bf ("event/opdl: add OPDL ring infrastructure library")
Cc: stable@dpdk.org
Signed-off-by: Liang Ma <liang.j.ma@intel.com>
Signed-off-by: Peter Mccarthy <peter.mccarthy@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Gage Eads [Mon, 12 Mar 2018 14:55:22 +0000 (09:55 -0500)]
event/sw: perform partial burst enqueues
Previously, the sw PMD would enqueue either all or no events, depending on
if enough inflight credits were available for the new events in the burst.
If a port is enqueueing a large burst (i.e. a multiple of the credit update
quanta), this can result in suboptimal performance, and requires an
understanding of the sw PMD implementation (in particular, its credit
scheme) to tune an application's burst size.
This affects software that enqueues large bursts of new events, such as the
ethernet event adapter which uses a 128-deep event buffer, when the input
packet rate is sufficiently high.
This change makes the sw PMD enqueue as many events as it has credits, if
there are any new events in the burst.
Signed-off-by: Gage Eads <gage.eads@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Vipin Varghese [Tue, 27 Feb 2018 21:10:22 +0000 (02:40 +0530)]
event/sw: simplify counter assignment
Counter variable 'out_pkts' had been set to 0, then updated. Current
code change elimates double assignment to direct assignment.
Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
Vipin Varghese [Tue, 27 Feb 2018 20:17:18 +0000 (01:47 +0530)]
event/sw: move stats code for better cache access
variables 'out_pkts_total' and 'out_pkts_total' will be in registers.
Hence shifting the code after the loop, helps the update from registers.
Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
Vipin Varghese [Tue, 27 Feb 2018 20:08:05 +0000 (01:38 +0530)]
event/sw: add unlikely branch predict
For most run cases 'sw->started' holds true. Adding a branch prediction
suggestion to compiler helps as this is first conditional check just
after entering the function.
Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
Nikhil Rao [Tue, 20 Feb 2018 11:30:54 +0000 (06:30 -0500)]
eventdev: add Rx timestamp
Add timestamp to received packets before enqueuing to
event device if the timestamp is not already set. Adding
timestamp in the Rx adapter avoids additional latency due
to the event device.
Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Jon DeVree [Sat, 7 Apr 2018 17:29:52 +0000 (13:29 -0400)]
net/vmxnet3: fill imissed stat
This counter comes from a "hardware" register of the vmxnet3 device and
seems to behave like the MPC (Missed Packet Count) register of the Intel
NICs. So I think this data belongs in the imissed field rather than the
rx_nombuf field.
Signed-off-by: Jon DeVree <nuxi@vault24.org>
Acked-by: Yong Wang <yongwang@vmware.com>
Scott Branden [Fri, 13 Apr 2018 21:07:54 +0000 (14:07 -0700)]
net/bnxt: introduce Broadcom Stingray
Add support for Stingray PF devices ids:
BCM58802 = 0xd802
BCM58804 = 0xd804
BCM58808 = 0x16f0
Add Broadcom Stingray machine support based on armv8.
For product brief see:
https://www.broadcom.com/products/ethernet-connectivity/controllers/bcm58800
Signed-off-by: Scott Branden <scott.branden@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Ferruh Yigit [Fri, 13 Apr 2018 22:21:09 +0000 (23:21 +0100)]
drivers/net: remove redundant icc flag
ICC warning #188 already disabled globally via commit [1], no
need individual arguments in PMDs.
[1]
Fixes:
1b80b9c854c3 ("mk: disable icc warning 188")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Tested-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Ferruh Yigit [Fri, 13 Apr 2018 22:21:08 +0000 (23:21 +0100)]
drivers/net: fix icc deprecated parameter warning
With icc (ICC) 18.0.1
20171018, -wd usage generates following warning:
icc: command line remark #10010: option '-wd3656' is deprecated and will
be removed in a future release. See '-help deprecated'
"icc -help deprecated" output is:
-wd use -diag-disable
Based on above information "-wd" converted to "-diag-disable"
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Tested-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Tonghao Zhang [Wed, 11 Apr 2018 04:34:29 +0000 (21:34 -0700)]
net/bonding: fix typo in log comment
Fixes:
68451eb6698c ("net/bonding: call through EAL on create/free")
Cc: stable@dpdk.org
Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Tonghao Zhang [Wed, 11 Apr 2018 04:34:28 +0000 (21:34 -0700)]
net/bonding: free mempool used in mode 6
When creating bond device with mode6, dpdk will create
mempool for arp packets. If free the bond device and
create it with same name, there will be an error. Because
the mempool is not freed when destroying bond device.
Fixes:
06fe78b98ccd ("bond: add mode 6")
Fixes:
ea0c20ea95fd ("apps: use helper to create mbuf pools")
Cc: stable@dpdk.org
Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Junjie Chen [Thu, 12 Apr 2018 16:28:34 +0000 (12:28 -0400)]
vhost: support interrupt mode
In some cases we want vhost dequeue work in interrupt mode to
release cpus to others when no data to transmit. So we install
interrupt handler of vhost device and interrupt vectors for each
rx queue when creating new backend according to vhost interrupt
configuration. Thus, applications could register a epoll event fd
to associate rx queues with interrupt vectors.
Signed-off-by: Junjie Chen <junjie.j.chen@intel.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
Matej Vido [Thu, 12 Apr 2018 07:41:30 +0000 (09:41 +0200)]
net/szedata2: add new kernel module dependency
New kernel module dependency is required to support NFB-200G2QL card.
Signed-off-by: Matej Vido <vido@cesnet.cz>
Matej Vido [Thu, 12 Apr 2018 07:41:29 +0000 (09:41 +0200)]
net/szedata2: support new NIC
This patch adds support for new NIC NFB-200G2QL.
At the probing stage numa nodes for the DMA queues are identified
and the appropriate number of ports is allocated.
DMA queues residing on the same numa node are grouped in the same
port.
Signed-off-by: Matej Vido <vido@cesnet.cz>
Matej Vido [Thu, 12 Apr 2018 07:41:28 +0000 (09:41 +0200)]
net/szedata2: do not affect Ethernet interfaces
NFB cards employ multiple Ethernet ports.
Until now, Ethernet port-related operations were performed on all of them
(since the whole card was represented as a single port).
With new NFB-200G2QL card, this is no longer viable.
Since there is no fixed mapping between the queues and Ethernet ports,
and since a single card can be represented as two ports in DPDK,
there is no way of telling which (if any) physical ports should be
associated with individual ports in DPDK.
This is also described in documentation in more detail.
Signed-off-by: Matej Vido <vido@cesnet.cz>
Signed-off-by: Jan Remes <remes@netcope.com>
Alejandro Lucero [Wed, 11 Apr 2018 13:10:15 +0000 (14:10 +0100)]
net/nfp: support hardware RSS v2
Chained metadata instead of prepend metadata was added in
firmware version 4. However, it could be old firmwares evolving
but not supporting chained metadata.
This patch adds support for an old firmware being updated and
getting a firmware version number higher than 4, but it still not
implementing chained metadata.
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Alejandro Lucero [Wed, 11 Apr 2018 10:33:40 +0000 (11:33 +0100)]
net/nfp: support LSO offload version 2
This new LSO offload version facilitates how firmware implements
this functionality and helps improving the performance.
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Sunil Kumar Kori [Wed, 11 Apr 2018 11:05:40 +0000 (16:35 +0530)]
net/dpaa2: support new ethdev offload APIs
Signed-off-by: Sunil Kumar Kori <sunil.kori@nxp.com>
Sunil Kumar Kori [Wed, 11 Apr 2018 11:05:39 +0000 (16:35 +0530)]
net/dpaa: support new ethdev offload APIs
Signed-off-by: Sunil Kumar Kori <sunil.kori@nxp.com>
Andrew Rybchenko [Tue, 10 Apr 2018 12:48:25 +0000 (13:48 +0100)]
net/sfc: use default FEC mode
All FEC modes are supported and allowed, but none are explicitly
requested.
This effectively means that FEC mode is determined solely form cable
requirements and link partner capabilities / requirements.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Wei Zhao [Mon, 9 Apr 2018 02:26:32 +0000 (10:26 +0800)]
net/i40e: fix using error set function
There is a specific function to set error for flow configuration,
so change to use that function.
Fixes:
ecad87d22383 ("net/i40e: move RSS to flow API")
Cc: stable@dpdk.org
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Tested-by: Yuan Peng <yuan.peng@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Wei Zhao [Wed, 11 Apr 2018 03:24:32 +0000 (11:24 +0800)]
net/i40e: add comment and clean code for flow RSS
This patch add comment for flow rss parse function in order
to explain some important info. This patch also delete some
useless code for queue index check for RSS queue region
configuration.
Fixes:
ecad87d22383 ("net/i40e: move RSS to flow API")
Cc: stable@dpdk.org
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Tested-by: Yuan Peng <yuan.peng@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Junjie Chen [Wed, 11 Apr 2018 17:02:32 +0000 (13:02 -0400)]
net/vhost: fix invalid state
dev_start sets *dev_attached* after setup queues, this sets device to
invalid state since no frontend is attached. Also destroy_device set
*started* to zero which makes *allow_queuing* always zero until dev_start
get called again. Actually, we should not determine queues existence by
*dev_attached* but by queues pointers or other separated variable(s).
Fixes:
30a701a53737 ("net/vhost: fix crash when creating vdev dynamically")
Cc: stable@dpdk.org
Signed-off-by: Junjie Chen <junjie.j.chen@intel.com>
Tested-by: Jens Freimann <jfreimann@redhat.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Jan Blunck [Thu, 29 Mar 2018 16:05:07 +0000 (12:05 -0400)]
net/vhost: insert/strip VLAN header in software
This lets the vhost driver handle the VLAN header like the virtio driver
in software.
Signed-off-by: Jan Blunck <jblunck@infradead.org>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Olivier Matz [Wed, 11 Apr 2018 16:32:51 +0000 (18:32 +0200)]
ethdev: return diagnostic when setting MAC address
Change the prototype and the behavior of dev_ops->eth_mac_addr_set(): a
return code is added to notify the caller (librte_ether) if an error
occurred in the PMD.
The new default MAC address is now copied in dev->data->mac_addrs[0]
only if the operation is successful.
The patch also updates all the PMDs accordingly.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Shahaf Shuler [Tue, 10 Apr 2018 06:13:36 +0000 (09:13 +0300)]
net/mlx5: fix link status initialization
Following commit
7ba5320baa32 ("net/mlx5: fix link status behavior")
The initial link status is no longer set as part of the port start.
When LSC interrupts are enabled, ethdev layer reads the link status
directly from the device data instead of using the PMD callback.
This may cause application to query the link as down while in fact it was
already up before the DPDK application start (and no interrupt to fix
it).
Fixes:
7ba5320baa32 ("net/mlx5: fix link status behavior")
Cc: stable@dpdk.org
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Ophir Munk [Sun, 25 Mar 2018 20:19:29 +0000 (20:19 +0000)]
net/mlx4: support CRC strip toggling
Previous to this commit mlx4 CRC stripping was executed by default and
there was no verbs API to disable it.
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Martin Weiser [Fri, 26 Jan 2018 09:30:24 +0000 (10:30 +0100)]
net/ixgbe: allow setting 2.5G and 5G speeds on X550
This patch adds support for explicitly selecting 2.5G and 5G speeds on
X550.
Signed-off-by: Martin Weiser <martin.weiser@allegro-packets.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Beilei Xing [Wed, 7 Feb 2018 08:40:59 +0000 (16:40 +0800)]
net/i40e: fix DDP profile DEL operation
Customized info will be updated when processing DDP package,
including PCYPE/PTYPE/protocol. Previously, the customized info
is updated without any check for package operation - ADD or DEL,
but only covers ADD operation. In this situation, even if a package
is being removed, new PCTYPE/PTYPE/protocol will still be created,
it will cause wrong parsing for SW. This patch cleans new
PCTYPE/PTYPE/protocol created when a package is being removed.
Fixes:
e163c18a15b0 ("net/i40e: update ptype and pctype info")
Cc: stable@dpdk.org
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Junjie Chen [Wed, 14 Mar 2018 16:24:16 +0000 (12:24 -0400)]
doc: add driver limitation for vhost dequeue zero copy
In vhost-switch example, when binding nic to vfio-pci with iommu enabled,
dequeue zero copy cannot work in VM2NIC mode due to no iommu dma mapping
is setup for guest memory currently.
Signed-off-by: Junjie Chen <junjie.j.chen@intel.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Zhiyong Yang [Fri, 6 Apr 2018 09:25:54 +0000 (17:25 +0800)]
net/virtio-user: support server mode
In a container environment if the vhost-user backend restarts, there's
no way for it to reconnect to virtio-user. To address this, support for
server mode is added. In this mode the socket file is created by virtio-
user, which the backend then connects to. This means that if the backend
restarts, it can reconnect to virtio-user and continue communications.
With current implementation, LSC is enabled at virtio-user side to
support to accept the coming connection.
Server mode virtio-user only supports to work with vhost-user.
Release note is updated in this patch.
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
Fan Zhang [Thu, 5 Apr 2018 16:01:36 +0000 (17:01 +0100)]
examples/vhost_crypto: add sample application
This patch adds vhost_crypto sample application to DPDK.
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Jay Zhou <jianjay.zhou@huawei.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Fan Zhang [Thu, 5 Apr 2018 16:01:34 +0000 (17:01 +0100)]
vhost/crypto: add public function implementation
This patch adds public API implementation to vhost crypto.
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Jay Zhou <jianjay.zhou@huawei.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Fan Zhang [Thu, 5 Apr 2018 16:01:33 +0000 (17:01 +0100)]
vhost/crypto: add request handler
This patch adds the implementation that parses virtio crypto request
to dpdk crypto operation.
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Jay Zhou <jianjay.zhou@huawei.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Fan Zhang [Thu, 5 Apr 2018 16:01:32 +0000 (17:01 +0100)]
vhost/crypto: add session message handler
This patch adds session message handler to vhost crypto.
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Jay Zhou <jianjay.zhou@huawei.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Fan Zhang [Thu, 5 Apr 2018 16:01:31 +0000 (17:01 +0100)]
vhost/crypto: add user message structure
This patch adds virtio-crypto spec user message structure to
vhost_user.
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Jay Zhou <jianjay.zhou@huawei.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Fan Zhang [Thu, 5 Apr 2018 16:01:30 +0000 (17:01 +0100)]
vhost/crypto: add vhost-user message handlers
Previously, vhost library lacks the support to the vhost backend
other than net such as adding private data or registering vhost-user
message handlers. This patch fills the gap by adding data pointer and
vhost-user pre and post message handlers to vhost library.
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Jay Zhou <jianjay.zhou@huawei.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Jay Zhou [Thu, 5 Apr 2018 14:37:33 +0000 (22:37 +0800)]
vhost: add virtio crypto header file
Since the linux kernel header file virtio_crypto.h has been merged
in 4.9, if we include this header file directly, compilation will be
failed in the old kernels' environment, e.g. the vhost crypto backend
series.
Adding virtio_crypto.h in librte_vhost to make old kernels happy.
Signed-off-by: Jay Zhou <jianjay.zhou@huawei.com>
Signed-off-by: Lei Gong <arei.gonglei@huawei.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Remy Horton [Tue, 10 Apr 2018 09:43:19 +0000 (10:43 +0100)]
app/testpmd: make use of per-PMD Tx/Rx parameters
The optimal values of several transmission & reception related
parameters, such as burst sizes, descriptor ring sizes, and number
of queues, varies between different network interface devices. This
patch allows testpmd to make use of per-PMD tuned parameter values.
Signed-off-by: Remy Horton <remy.horton@intel.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Remy Horton [Tue, 10 Apr 2018 09:43:18 +0000 (10:43 +0100)]
net/i40e: add Tx/Rx tuning parameters
The optimal values of several transmission & reception related
parameters, such as burst sizes, descriptor ring sizes, and number
of queues, varies between different network interface devices. This
patch allows individual PMDs to specify preferred parameter values.
Signed-off-by: Remy Horton <remy.horton@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Remy Horton [Tue, 10 Apr 2018 09:43:17 +0000 (10:43 +0100)]
net/e1000: add Tx/Rx tuning parameters
The optimal values of several transmission & reception related
parameters, such as burst sizes, descriptor ring sizes, and number
of queues, varies between different network interface devices. This
patch allows individual PMDs to specify preferred parameter values.
Signed-off-by: Remy Horton <remy.horton@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Remy Horton [Tue, 10 Apr 2018 09:43:16 +0000 (10:43 +0100)]
ethdev: support PMD-tuned Tx/Rx parameters
The optimal values of several transmission & reception related
parameters, such as burst sizes, descriptor ring sizes, and number
of queues, varies between different network interface devices. This
patch allows individual PMDs to specify preferred parameter values.
Signed-off-by: Remy Horton <remy.horton@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Shahaf Shuler [Tue, 10 Apr 2018 06:16:31 +0000 (09:16 +0300)]
ethdev: fix link status query
When application works with LSC interrupts the ethdev layer skips
the PMD callback and update according to the link status exists on
device data. It is because it assumes the link status on the device data
is the correct one since any link change is processed by the application.
As multiple PMDs install the link status interrupt handler only on port
start and uninstall it on port stop, the link status may be incorrect in
case the query is called after port stop or before port start.
Fixing the query implementation to use the PMD callback for such cases.
Fixes:
b77d21cc2364 ("ethdev: add link status get/set helper functions")
Cc: stable@dpdk.org
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Ferruh Yigit [Mon, 9 Apr 2018 12:09:38 +0000 (13:09 +0100)]
ethdev: replace bus specific struct with generic dev
Public struct rte_eth_dev_info has a "struct rte_pci_device" field in it
although it is common for all ethdev in all buses.
Replacing pci specific struct with generic device struct and updating
places that are using pci device in a way to get this information from
generic device.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: David Marchand <david.marchand@6wind.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Andrew Rybchenko [Mon, 9 Apr 2018 11:58:59 +0000 (12:58 +0100)]
app/testpmd: add commands to set loopback mode
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Andrew Rybchenko [Mon, 9 Apr 2018 11:58:58 +0000 (12:58 +0100)]
net/sfc: support loopback mode configuration
All loopback modes are listed in efx_loopback_type_t.
Available loopback modes are listed per link speed in
the enc_loopback_types member of the efx_nic_cfg_t.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Andrew Rybchenko [Mon, 9 Apr 2018 11:58:57 +0000 (12:58 +0100)]
net/sfc/base: fix comparison always true warning
Loopback type used as bit index has efx_loopback_type_t type
which is enum. clang complains that it is always true when it
is compared with qword (64 bit) bits number boundary.
Fixes:
9ee64bd404fc ("net/sfc/base: import loopback control")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Harish Patil [Mon, 9 Apr 2018 05:37:41 +0000 (22:37 -0700)]
net/bnx2x: convert to new Rx offloads API
Ethdev RX offloads API has changed since:
commit
ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
This patch makes use of DEV_RX_OFFLOAD_JUMBO_FRAME offload flag
to advertise jumbo frame support.
Signed-off-by: Harish Patil <harish.patil@cavium.com>
Rasesh Mody [Mon, 9 Apr 2018 04:48:10 +0000 (21:48 -0700)]
net/qede: update PMD version to 2.8.0.1
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Rasesh Mody [Mon, 9 Apr 2018 04:48:09 +0000 (21:48 -0700)]
net/qede/base: support packet pacing
Add packet pacing support for PFs.
ecore client can request for enabling packet pacing at init time,
if requested then ecore is going to skip MCoS and SRIOV configurations.
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Rasesh Mody [Mon, 9 Apr 2018 04:48:08 +0000 (21:48 -0700)]
net/qede/base: fix to support OVLAN mode
This fix allows driver to program NIC configuration to support OVLAN
mode in multi-function scenario
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Rasesh Mody [Mon, 9 Apr 2018 04:48:07 +0000 (21:48 -0700)]
net/qede/base: add APIs for xcvr
Add API to query transceiver info and to retrieve link speed.
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Rasesh Mody [Mon, 9 Apr 2018 04:48:06 +0000 (21:48 -0700)]
net/qede/base: add stats counter for link state
Add link_change_count counter to track number of link state transitions
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Rasesh Mody [Mon, 9 Apr 2018 04:48:05 +0000 (21:48 -0700)]
net/qede/base: refine error handling
Adjust the verbosity of the log messages and add preventive checks for
errors.
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Rasesh Mody [Mon, 9 Apr 2018 04:48:04 +0000 (21:48 -0700)]
net/qede/base: support MFW for driver load timeout
Add SPQ timeout base driver parameter support management FW timeout values
other than default and none. Have fallback mechanism for old MFWs.
Reduce the default timeout to 1 sec.
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>