This patch contains few RSS related changes as follows:
o Fix inadvertent initializing of rss_params outside of the
if block in qed_update_vport() which could cause FW exception.
o Fix disabling of RSS when hash function is 0.
o Rename qede_config_rss() to qede_check_vport_rss_enable()
for better clarity.
o Avoid code duplication using a helper function
qede_init_rss_caps().
Fixes: 4c98f2768e ("net/qede: support RSS hash configuration")
Fixes: 2ea6f76aff ("qede: add core driver")
Signed-off-by: Harish Patil <harish.patil@qlogic.com>
The device doesn't explicitly support enable/disable
of VLAN filtering. However, VLAN filtering takes effect
when a matching VLAN is configured. So in order to
support enable/disable of VLAN filtering, VLAN 0 is
added/removed respectively. A check is added to ensure that
the user removes all the configured VLANs before disabling
VLAN filtering.
Also VLAN offloads shall be enabled by default and
vlan_tci_outer is to set to 0 for Q-in-Q packets.
Fixes: 2ea6f76 ("qede: add core driver")
Signed-off-by: Harish Patil <harish.patil@qlogic.com>
- fix to prevent duplicate VLAN filters
librte_ether does not keep track of VLAN filters
configured, so it becomes driver's responsibility to
keep track of it and prevent duplicate filter
programming. The fix is to use a singly linked
list for tracking the entries and there by prevent
duplicates.
- fix num vlan filters
Fix num vlan filter when filling Ethernet device information.
Fixes: 2ea6f76aff ("qede: add core driver")
Signed-off-by: Harish Patil <harish.patil@qlogic.com>
This patch fixes the missing 100G link speed advertisement
when the 100G support was initially added.
Fixes: 2af14ca79c ("net/qede: support 100G")
Signed-off-by: Harish Patil <harish.patil@qlogic.com>
Add support to allow MTU change on a deactivated vport in
the qede/base driver and the core driver shall utilize the same.
Signed-off-by: Harish Patil <harish.patil@qlogic.com>
Some applications set port configuration params like promisc mode
before calling dev_start(). This config results in a firmware exception
since this operation internally translates to sending of VPORT-UPDATE
before VPORT-START ramrod which is considered illegal from firmware
standpoint. So the fix is to send VPORT-START ramrod sooner
in dev_configure() rather than deferring it to dev_start().
This requires a bit of reshuffling in the code to move sending of
VPORT-START from qede_start_queues() to qede_dev_configure()
and VPORT-STOP from qede_stop_queues() to qede_dev_stop().
This sequence change also exposes a flaw in the port restart
flows where the fastpath resource allocation routine qede_init_fp()
functionalities need to be split, so that appropriate action is taken
based on the current port state. Eg: Do not re-initialize the status
block in a port restart case. This change ensures port start/stop
can be paired.
A new port state QEDE_DEV_CONFIG is added to distinguish between
port started from scratch vs port requiring a reconfig (like MTU).
The function qede_config_rx_mode() is removed since the individual
port config will be replayed anyways on a restart.
Fixes: 2ea6f76aff ("qede: add core driver")
Signed-off-by: Harish Patil <harish.patil@qlogic.com>
Previous release of the qede PMD had a limitation that the
driver expects the number of tx and rx queues to be the same.
This patch fixes this issue by making appropriate changes in
control and data path.
Fixes: 2ea6f76aff ("qede: add core driver")
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
This patch updates the base driver and incorporates necessary changes
required to bring in the new firmware 8.10.9.0.
In addition, it would allow driver to add new functionalities that might
be needed in future.
Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
This patch adds API support for NIC selftests (BIST) and APIs to retrieve
GPIO info, sensor data like temperature, MBA versions, ECC events etc.
Signed-off-by: Harish Patil <harish.patil@qlogic.com>
Add ecore_mcp_mb_lock() and ecore_mcp_mb_unlock() APIs to ensure
a single thread is accessing MFW mailbox.
Signed-off-by: Harish Patil <harish.patil@qlogic.com>
Change ecore_mcp_cmd_and_union() to accept pointer to a structure rather
than accepting multiple arguments. A new struct ecore_mcp_mb_params is
added for that purpose. Also make this function static. This change is
mostly keeping in mind the future requests which needs additional
arguments.
Signed-off-by: Harish Patil <harish.patil@qlogic.com>
Change details:
- adds new comments
- modifies some of the existing comments
- abstract code into macros
- split long lines
Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
In case of attention from a signal that's represented by multiple bits
in misc AEU, add the format string which is populated with proper index
and resulting prints will show string as a prefix.
Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
- add the hardware software interface(HSI) changes
- add register definitions
These will be required for 8.10.9.0 FW upgrade.
Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
Replaced CONFIG_QED_BINARY_FW with CONFIG_ECORE_BINARY_FW.
Use CONFIG_ECORE_BINARY_FW and CONFIG_ECORE_ZIPPED_FW defines as
required.
Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
Added ecore_hsi_debug_tools.h, ecore_hsi_init_func.h,
ecore_hsi_init_tool.h files. Rearranged code from ecore_hsi_common.h and
ecore_hsi_tools.h to the new files. Removed unused code.
Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
The changes introduced by previous commits (ones in fixes lines) made
secondaries attempt to reinitialize the Tx queue structures of the primary
instead of their own, for which they also do not allocate enough memory,
leading to crashes.
Fixes: 1d88ba1719 ("net/mlx5: refactor Tx data path")
Fixes: 21c8bb4928 ("net/mlx5: split Tx queue structure")
Signed-off-by: Olivier Gournet <ogournet@corp.free.fr>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
The SGLORT (Source Global Resource Tag) of the VF queues should be
assigned by PF driver, VF driver should not set these registers.
Fixes: 3b845bf6bc ("fm10k: fix switch manager high CPU usage")
Reported-by: Sarath Somasekharan <sarathx.somasekharan@intel.com>
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
This commit fixes link status report on device start up when
lcs callback is configured.
Fixes: 62072098b5 ("mlx5: support setting link up or down")
Signed-off-by: Olga Shern <olgas@mellanox.com>
In vPMD, when we load Rx desc with _mm_loadu_si128, the volatile
modifier will be cast away, allowing the compiler to reorder the
load instructions.
The Rx recv function's correctness is relying on these load
instructions following a strict sequence, reading the descriptors
in reverse order, so we add compiler barrier to prevent compiler
reorder.
Fixes: 7092be8437 ("fm10k: add vector Rx")
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
In vPMD, when we load Rx desc with _mm_loadu_si128, the volatile
modifier will be cast away, allowing the compiler to reorder the
load instructions.
The Rx recv function's correctness is relying on these load
instructions following a strict sequence, reading the descriptors
in reverse order, so we add compiler barrier to prevent compiler
reorder.
Fixes: c95584dc2b ("ixgbe: new vectorized functions for Rx/Tx")
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
In vPMD, when we load Rx desc with _mm_loadu_si128, the volatile
modifier will be cast away, allowing the compiler to reorder the
load instructions.
The Rx recv function's correctness is relying on these load
instructions following a strict sequence, reading the descriptors
in reverse order, so we add compiler barrier to prevent compiler
reorder.
Fixes: 9ed94e5bb0 ("i40e: add vector Rx")
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
This fixes issue found by Coverity where a typo caused the flow director
UDP IPv4 source port mask to be assigned the destination port mask
supplied by the caller.
Coverity issue: 137860
Fixes: dfbd6a9cb5 ("net/enic: extend flow director support for 1300 series")
Signed-off-by: John Daley <johndale@cisco.com>
The rx_free_thresh was not being initialized and left at 0
on 1/2 of the RQs which could lead to poor multi-queue
performance.
Fixes: 856d7ba7ed ("net/enic: support scattered Rx")
Signed-off-by: John Daley <johndale@cisco.com>
Reviewed-by: Nelson Escobar <neescoba@cisco.com>
The function names for converting between RQ indexes known to
the RTE code and internal RQ indexes for primary Start of Packet
(SOP) queues and spill-over (Data) queues was unclear and
confusing.
Clarify with more explicit function names.
Signed-off-by: John Daley <johndale@cisco.com>
Reviewed-by: Nelson Escobar <neescoba@cisco.com>
The incorrect completion queue corresponding to an RQ would be
freed if multiple Rx queues are in use and the MTU is changed,
or an Rx queue is released. This could lead to a segmentation fault
when the device is disabled or even in the Rx or Tx paths.
The index of the completion queue corresponding to a RQ needed
to be adjusted after Rx scatter was introduced.
Fixes: 856d7ba7ed ("net/enic: support scattered Rx")
Signed-off-by: John Daley <johndale@cisco.com>
Reviewed-by: Nelson Escobar <neescoba@cisco.com>
The reason this commit was needed was because of a misconfiguration of
the receive queue when not using Rx scatter. This patch is
unnecessary if the receive queue is configured correctly.
Fixes: d142e1ac10 ("net/enic: fix calculation of truncated packets")
Signed-off-by: Nelson Escobar <neescoba@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
The Rx scatter patch was accidentally setting the index of the
secondary receive queue in the primary receive queue's initialization
when the secondary receive queue wasn't needed and was disabled. This
caused some misleading hardware counters in some situations.
Fixes: 856d7ba7ed ("net/enic: support scattered Rx")
Signed-off-by: Nelson Escobar <neescoba@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
The vlan mask and tunnel id mask of flow director are defined as big
endian. So they should be converted.
When the mask is printed, the parameters are not converted either.
This patch converts the mask parameters.
Fixes: 7c554b4f04 ("app/testpmd: update display of flow director information")
Fixes: 53b2bb9b7e ("app/testpmd: new flow director commands")
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
In mac-vlan mode, MAC address mask is not supported by HW.
The MAC address mask should not be set in mac-vlan mode.
Remove this parameter from the CLI. Remove MAC address
from mask print too.
Fixes: 53b2bb9b7e ("app/testpmd: new flow director commands")
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
In mac-vlan mode, MAC address mask is not supported by HW.
The MAC address mask should not be set in mac-vlan mode.
Instead, only set it in tunnel mode.
Fixes: 82fb702077 ("ixgbe: support new flow director modes for X550")
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
When bnx2x debug config enabled, icc (ICC) 17.0.0 20160721
gives the following compilation error:
.../drivers/net/bnx2x/elink.c(6682):
error #3656: variable "fw_ver1" may be used before its value is set
PMD_DRV_LOG(DEBUG,
^
According logic in the code, this error is a false positive,
but since this is not in the fast path, fixing compiler error by
assigning initial value to variable.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Rasesh Mody <rasesh.mody@qlogic.com>
To be consistent with the naming for ARM NEON implementation,
i40e_rxtx_vec.c is renamed to i40e_rxtx_vec_sse.c.
Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Use ARM NEON intrinsic to implement i40e vPMD
Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
move scalar code which does not use x86 intrinsic functions to new file
"i40e_rxtx_vec_common.h", while keeping x86 code in i40e_rxtx_vec.c.
This allows the scalar code to to be shared among vector drivers for
different platforms.
Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Linux virtio-net kernel driver uses indirect descriptors when
mergeable buffers are not used.
This patch adds its support, fixing the use of indirect
descriptors with these guests.
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Windows virtio-net driver uses indirect descriptors with
mergeable buffers.
This patch adds its support, fixing the use of indirect
descriptors with these guests.
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
There is no need to retrieve the latest avail head every time we enqueue
a packet in the mereable Rx path by
avail_idx = *((volatile uint16_t *)&vq->avail->idx);
Instead, we could just retrieve it once at the beginning of the enqueue
path. This could diminish the cache penalty slightly, because the virtio
driver could be updating it while vhost is reading it (for each packet).
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>
Reviewed-by: Jianbo Liu <jianbo.liu@linaro.org>
Tested-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>
Reviewed-by: Jianbo Liu <jianbo.liu@linaro.org>
Tested-by: Maxime Coquelin <maxime.coquelin@redhat.com>
The basic idea is to shadow the used ring update: update them into a
local buffer first, and then flush them all to the virtio used vring
at once in the end.
And since we do avail ring reservation before enqueuing data, we would
know which and how many descs will be used. Which means we could update
the shadow used ring at the reservation time. It also introduce another
slight advantage: we don't need access the desc->flag any more inside
copy_mbuf_to_desc_mergeable().
Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Jianbo Liu <jianbo.liu@linaro.org>
Tested-by: Maxime Coquelin <maxime.coquelin@redhat.com>
shadow_used_ring will be introduced later. Since then last avail
idx will not be updated together with last used idx.
So, here we use last_avail_idx for avail ring reservation.
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>
Reviewed-by: Jianbo Liu <jianbo.liu@linaro.org>
Tested-by: Maxime Coquelin <maxime.coquelin@redhat.com>