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>
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>
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>
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>
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>
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>
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>
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>
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 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>
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.
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: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.
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>
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.
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.
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>
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.
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).
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.
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>
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.
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.
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.
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.
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>
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>
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>
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.
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.
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.
The changes included in this patch are for
- formatting
- comment rework/additions
- relocate FW info, version related code
- convert:
__le16 to u16
__le32 to u32 etc.
All Netlink request the PMD will do can also be done by a iproute2 command
line interface, enabling VF behavior configuration without having to modify
the application nor reaching PMD limits (e.g. MAC address number limit).
net/mlx5: use Netlink to enable promisc/allmulti mode
VF devices are not able to receive promisc or allmulti traffic unless it
fully requests it though Netlink. This will cause the request to be
processed by the PF which will handle the request and enable it.
VF devices are not able to receive traffic unless it fully requests it
though Netlink. This will cause the request to be processed by the PF
which will add/remove the MAC address to the VF table if the VF is trusted.
Chas Williams [Tue, 13 Feb 2018 22:56:18 +0000 (17:56 -0500)]
net/ixgbe: update link status on start
dev->data->eth_link isn't updated until the first interrupt. If a
link is carrier down, then this interrupt may never happen. Before we
finished starting the PMD, call ixgbe_dev_link_update() to ensure we
have a valid status.
Signed-off-by: Chas Williams <chas3@att.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Chas Williams [Thu, 1 Feb 2018 22:39:07 +0000 (17:39 -0500)]
net/ixgbe: fix busy wait during checking link status
If we haven't set wait_to_complete, there is no need to busy wait
until we have a link status. Applications, like bonding, use the
wait_to_complete flag to indicate that they will be doing their own
busy wait and will likely be polling again shortly.
Fixes: dc66e5fd01b9 ("net/ixgbe: improve link state check on VF") Cc: stable@dpdk.org Signed-off-by: Chas Williams <chas3@att.com> Acked-by: Helin Zhang <helin.zhang@intel.com>
If DPDK application or OS does not need checksumming on transmit,
it may be disabled in firmware to achieve higher packet rates.
Choice must be done before VIS allocation and is allowed if
no other non-preboot and firmware subvariant-unaware drivers are
attached.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andy Moreton <amoreton@solarflare.com> Reviewed-by: Andrew Lee <alee@solarflare.com>
net/sfc/base: report no Tx checksum FW subvariant support
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andy Moreton <amoreton@solarflare.com> Reviewed-by: Andrew Lee <alee@solarflare.com>
FW subvariants allow to tweak NIC global features. For example,
if no drivers require checksumming on transmit, it may be disabled
in FW to increase packet rate.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andy Moreton <amoreton@solarflare.com> Reviewed-by: Andrew Lee <alee@solarflare.com>
The change adds functional TUN PMD logic to the existing TAP PMD.
TUN PMD can be initialized with 'net_tunX' where 'X' represents unique id.
PMD supports argument interface, while MAC address and remote are not
supported.
Documentation updates including for 1400 series VIC adapters.
Remove VLAN filter from the features file as the driver does not
support that API. Hardware does support VLAN filtering, but it is not
controlled through the driver.
Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com> Reviewed-by: John Daley <johndale@cisco.com>
John Daley [Wed, 4 Apr 2018 23:54:53 +0000 (16:54 -0700)]
net/enic: fix crash on MTU update with non-setup queues
The enic code called from rte_eth_dev_set_mtu() was assuming that the
Rx queues are already set up via a call to rte_eth_tx_queue_setup().
OVS calls rte_eth_dev_set_mtu() before rte_eth_rx_queue_setup() and
a null pointer was dereferenced.
Fixes: c3e09182bcd6 ("net/enic: support scatter Rx in MTU update") Cc: stable@dpdk.org Signed-off-by: John Daley <johndale@cisco.com> Reviewed-by: Hyong Youb Kim <hyonkim@cisco.com>
net/enic: do not flush descriptor cache when opening vNIC
The firmware on new hardware models flushes the global descriptor
cache by default. Use CMD_OPENF_IG_DESCCACHE to avoid cache
flushing. This flag has no effect on older models.
Suggested-by: Govindarajulu Varadarajan <gvaradar@cisco.com> Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com> Reviewed-by: John Daley <johndale@cisco.com>