This patch implements the ops rx_queue_count for vhost PMD by adding
a helper function rte_vhost_rx_queue_count in vhost lib.
The ops rx_queue_count gets vhost RX queue avail count and helps to
understand the queue fill level.
Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>
Acked-by: Ciara Loftus <ciara.loftus@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Fixing typos across dpdk source code using codespell utility.
Skipped the ethdev driver's base code fixes to keep the base
code intact.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Isolated mode can be requested by applications on individual ports to avoid
ingress traffic outside of the flow rules they define.
Besides making ingress more deterministic, it allows PMDs to safely reuse
resources otherwise assigned to handle the remaining traffic, such as
global RSS configuration settings, VLAN filters, MAC address entries,
legacy filter API rules and so on in order to expand the set of possible
flow rule types.
To minimize code complexity, PMDs implementing this mode may provide
partial (or even no) support for flow rules when not enabled (e.g. no
priorities, no RSS action). Applications written to use the flow API are
therefore encouraged to enable it.
Once effective, leaving isolated mode may not be possible depending on PMD
implementation.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
build error:
.../dpdk/drivers/net/mlx5/mlx5_fdir.c:
In function ‘fdir_filter_to_flow_desc’:
.../dpdk/drivers/net/mlx5/mlx5_fdir.c:146:18:
error: this statement may fall through [-Werror=implicit-fallthrough=]
desc->dst_port = fdir_filter->input.flow.udp4_flow.dst_port;
~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.../dpdk/drivers/net/mlx5/mlx5_fdir.c:147:2: note: here
case RTE_ETH_FLOW_NONFRAG_IPV4_OTHER:
^~~~
Fixed by adding fallthrough comment to the code.
Fixes: 76f5c99e68 ("mlx5: support flow director")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
build error:
.../dpdk/drivers/net/enic/base/vnic_dev.c:
In function ‘vnic_dev_get_mac_addr’:
.../dpdk/drivers/net/enic/base/vnic_dev.c:470:12:
error: ‘a0’ is used uninitialized in this function
[-Werror=uninitialized]
args[0] = *a0;
^~~
...dpdk/drivers/net/enic/base/vnic_dev.c:
In function ‘vnic_dev_classifier’:
...dpdk/drivers/net/enic/base/vnic_dev.c:471:12:
error: ‘a1’ may be used uninitialized in this function
[-Werror=maybe-uninitialized]
args[1] = *a1;
^~~
Fixed by providing initial values.
Fixes: 9913fbb91d ("enic/base: common code")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
This causes build error with gcc 7.1.1 :
...dpdk/drivers/net/i40e/i40e_flow.c:2357:2:
error: ‘memset’ used with length equal to number of elements without
multiplication by element size [-Werror=memset-elt-size]
memset(off_arr, 0, I40E_MAX_FLXPLD_FIED);
^~~~~~
...dpdk/drivers/net/i40e/i40e_flow.c:2358:2:
error: ‘memset’ used with length equal to number of elements without
multiplication by element size [-Werror=memset-elt-size]
memset(len_arr, 0, I40E_MAX_FLXPLD_FIED);
^~~~~~
Fixed by providing correct size to memset.
Fixes: 6ced3dd72f ("net/i40e: support flexible payload parsing for FDIR")
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Since the commit e84ad157b7 ("pci: unmap resources if probe fails"),
EAL unmaps the PCI device if ethdev probe returns positive or
negative value.
nicvf thunderx PMD needs special treatment for Secondary queue set(SQS)
PCIe VF devices, where, it expects to not unmap or free the memory
without registering the ethdev subsystem.
Enable the same behavior by using RTE_PCI_DRV_KEEP_MAPPED_RES
PCI driver flag.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
rte_driver->name has the driver name and all physical and virtual
devices has access to it.
Previously it was not possible for virtual ethernet devices to access
rte_driver->name field (because eth_dev used to keep only pci_dev),
and it was required to save driver name in the device private struct.
After re-works on bus and vdev, it is possible for all bus types to
access rte_driver.
It is able to remove the driver name from ethdev device private data and
use eth_dev->device->driver->name.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Jan Blunck <jblunck@infradead.org>
When ring PMD created via PMD specific API instead of EAL abstraction
it is missing the virtual device creation done by EAL vdev.
And this makes eth_dev unusable exact same as other PMDs used, because
of some missing fields, like rte_device->name.
Now API calls EAL APIs to create ring PMDs.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
The eth_dev->device link was missing for ring PMD, adding it.
This is to generalize rte_device access from eth_dev.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
This is to prepare for firmwares with multiple ibufs and obufs.
Ibufs and obufs are the modules in FPGA firmware implementing
the Ethernet port.
There is one ibuf+obuf per Ethernet port.
The cards and firmwares allow one physical port to be one Ethernet
port or split into more Ethernet ports, e.g. one 100GE physical
port can be one Ethernet port of 100GE or split into ten Ethernet
ports of 10GE.
All DMA queues in the device are shared between all Ethernet ports.
Offsets of ibufs and obufs are defined in array.
Functions which operate on ibufs and obufs iterate over this array.
Signed-off-by: Matej Vido <vido@cesnet.cz>
Remove unused read and write functions.
Use rte_read*, rte_write* functions to access ibuf and obuf
address space.
Signed-off-by: Matej Vido <vido@cesnet.cz>
Prefix "cgmii" is removed because it is too specific.
There are different ibuf/obuf modules in different firmwares
but the address space definition is the same.
This patch makes the name general.
Signed-off-by: Matej Vido <vido@cesnet.cz>
Avoid re-initializing of mbuf fields which are set while in pool.
Replaced lio_recv_buffer_alloc with rte_pktmbuf_alloc.
See commit 8f094a9ac5 ("mbuf: set mbuf fields while in pool").
Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
This patch fixes incorrect reporting of link status
1) When link is down, set speed to zero. Otherwise a wrong non-zero
speed will be displayed.
2) DAC cables can detect there is a signal, but it necessarily does not
mean link is up. Code previously treated this as link up.
Fixes: 7bc8e9a227 ("net/bnxt: support async link notification")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Some HWRM defines are missing from hsi_struct_def_dpdk.h
This patch adds them.
Also remove duplicate HWRM_RING_GRP_ALLOC entry.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Previously, i40e PMD will select ethertype filter
parser when adding ether pattern rules. In fact,
FDIR also supports ether pattern.
This patch adds ether pattern support for FDIR.
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
This patch updates supported patterns for flow
director filters.
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
This patch supports input set selection for flow
director filter.
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
This patch adds flexible payload parsing support for
flow director filter.
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
This patch adds NVGRE flow parsing function to support NVGRE
classification.
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
The current vxlan parsing function is not easy to read when parsing
filter type, this patch optimizes the function and makes it more
readable.
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
max_rx_pkt_len member of port RX configuration indicates max frame
length. Ethernet header and CRC length should be subtracted from it to
find MTU.
Fixes: 605164c8e7 ("net/liquidio: add API to validate VF MTU")
Cc: stable@dpdk.org
Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Refactor TX routine such that TX BD updates can all be grouped together.
Based on the TX offloads requested the TX bitfields are calculated in
a temporary variable and TX BDs are updated at the end. This will minimize
the if checks also. This change is done to easily accommodate newer TX
offload operations in the future.
Signed-off-by: Harish Patil <harish.patil@cavium.com>
This patch fixes missing PKT_TX_TUNNEL_VXLAN Tx offload flag from the
supported Tx offloads and an incorrect tunnel TX BD bit setting.
Fixes: 3d4bb44116 ("net/qede: add fastpath support for VXLAN tunneling")
Cc: stable@dpdk.org
Signed-off-by: Harish Patil <harish.patil@cavium.com>
This patch does the following refactoring and cleanup:
- As part of multi-queue support a struct member called 'type' was added
in struct qede_fastpath in order to identify whether a queue is RX or
TX and take actions based on that. This was unnecessary in the first
place since pointers to RX and TX queues are already available in
rte_eth_dev->data. So all usage of fp->type is removed.
- Remove remaining additional layer of internal callbacks for RX/TX
queues and fastpath related operations from the qed_eth_ops_pass.
With this change the files qede_eth_if.[c,h] are no longer needed.
- Add new per-queue start/stop APIs instead of clubbing it all together.
- Remove multiple TXQs references (num_tc and fp->txqs) since CoS is not
supported.
- Enable sharing of the status block for each queue pair.
- Remove enum qede_dev_state and instead make use of existing port
states RTE_ETH_QUEUE_STATE_STOPPED/RTE_ETH_QUEUE_STATE_STARTED.
- Move qede_dev_start() and qede_dev_stop() to qede_ethdev.c from
qede_rxtc.c.
Signed-off-by: Harish Patil <harish.patil@cavium.com>
The refactoring is mainly for two reasons:
- To remove an additional layer of internal callbacks for all vport
related operations from the struct qed_eth_ops_pass. Instead, we
can invoke base APIs directly.
- Splitting a single large vport-update configuration into multiple and
independent vport-update operations. Each configuration would touch
only the required config bits that needs an update.
Signed-off-by: Harish Patil <harish.patil@cavium.com>
This patch adds support to configure the VF L2 Rx settings.
The per VF setting is maintained in bnxt_child_vf_info.l2_rx_mask
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
This patch adds code to insert a default VF VLAN.
Also track the current default VLAN per vnic for the VF.
When setting the default VLAN, avoid setting it to the current value.
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
This patch adds support to allocate a filter and program
it in the hardware for every MAC address added to the specified
function.
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
This patch adds code to determine the Rx status of a VF.
It adds the rte_pmd_bnxt_get_vf_rx_status call, which calculates
the VNIC count of the function to get the Rx status.
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
This patch adds code to get and clear VF stats.
It also adds the necessary HWRM structures to send the command
to the firmware.
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
This patch adds support to
1) enable VF MAC anti spoof.
2) QOS configuration for specified VF.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Add functions rte_pmd_bnxt_set_tx_loopback,
rte_pmd_bnxt_set_all_queues_drop_en and
rte_pmd_bnxt_set_vf_mac_addr to configure tx_loopback,
queue_drop and VF MAC address setting in the hardware.
It also adds the necessary functions to send the HWRM commands
to the firmware.
Signed-off-by: Steeven Li <steeven.li@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>