Meson build currently tracks the dependencies between libraries, which
can often make things easier, but has the side-effect of slowing down
the initial meson run if too many duplicated dependencies are provided.
Therefore, we remove dependencies from the dpaa items where other
dependencies already depend on those. This provides a noticable speed-up
in meson configuration runs when lots of sample apps are included in the
build.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
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>
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: 51215925a3 ("net/ixgbe: convert to new Tx offloads API")
Fixes: ec3b1124d1 ("net/ixgbe: convert to new Rx offloads API")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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: 4236ce9bf5 ("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>
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>
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>
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>
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>
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>
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>
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: 06fe78b98c ("bond: add mode 6")
Fixes: ea0c20ea95 ("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>
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>
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>
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>
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>
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>
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>
There is a specific function to set error for flow configuration,
so change to use that function.
Fixes: ecad87d223 ("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>
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: ecad87d223 ("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>
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: 30a701a537 ("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>
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>
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>
Following commit 7ba5320baa ("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: 7ba5320baa ("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>
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>
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>
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: e163c18a15 ("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>
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>
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>