New testpmd will get CRC strip offload from rx_offload_capa. I40evf
cannot disable CRC strip. And in fact, it is enabled by PF. This
patch solves the issue by adding CRC strip flag into rx_offload_capa
in i40e and i40evf.
Fixes: 8b9bd0efe0 ("app/testpmd: disable Rx VLAN offloads by default")
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
The AVX2 code path includes files from the ethdev, hash and kvargs libs.
These are not listed as dependencies in the case where AVX2 is not in
the default instruction set for the build e.g. machine=nehalem. This
leads to compiler errors as the header files needed cannot be found.
Fixes: e940646b20 ("drivers/net: build Intel NIC PMDs with meson")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
This patch fixes issues reported by Coverity check. Function
parse_rss_action and i40e_config_rss_filter might return at wrong
time which will cause error for RSS configuration and parser. Hash
function variable with 32 bits width might also cause error when
it needs more than 32 bits, so change this variable to 64 bits.
Coverity issue: 257020, 257024, 257037
Fixes: ecad87d223 ("net/i40e: move RSS to flow API")
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
This commit aligns the names for dynamic logging with
the newly defined logging format.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Any flags added to the project args are automatically added to all builds,
both native and cross-compiled. This is not what we want for the -march
flag as a valid -march for the cross-compile is not valid for pmdinfogen
which is a native-build tool.
Instead we store the march flag as a variable, and add it to the default
cflags for all libs, drivers, examples, etc. This will allow pmdinfogen to
compile successfully in a cross-compilation environment.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
This patch changes the build process to group all .o files for a driver or
library into a static archive first, and then link the .o files together
into a shared library. This eliminates the need for separate static or
shared object builds when packaging, for instance.
The "default_library" configuration option now only affects the apps and
examples, which are either linked against the static or shared library
versions depending on the value of the option.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
The EAL and compat libraries were special-cases in the library build
process, the former because of it's complexity, and the latter because
it only consists of a single header file.
By reworking the EAL meson.build files, we can eliminate the need for it to
be a special case, by having it build up and return the list of sources,
headers, and objects and return those to the higher level build file. This
should also simplify the building of EAL, as we can eliminate a number of
meson.build files that would no longer be needed, and have fewer, but
larger meson.build files (9 now vs 14 previous) - thereby making the logic
easier to follow and items easier to find.
Once done, we can pull eal into the main library loop, with some
modifications to support it. Compat can also be pulled it once we add in a
check to handle the case of an empty sources list.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Add the e1000, fm10k, i40e and ixgbe drivers to the meson & ninja build.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
Acked-by: Luca Boccassi <luca.boccassi@gmail.com>
When using UIO, after enabling the interrupt to get the PF
message, VF RX queue interrupt is not working.
It's expected, as UIO doesn't support multiple interrupt.
So, PMD should not try to enable RX queue interrupt. Then
APP can know the RX queue interrupt is not enabled and only
choose the polling mode.
Fixes: ae19955e7c ("i40evf: support reporting PF reset")
CC: stable@dpdk.org
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Parameter action_flag is not used correctly in i40e_flow_parse_rss_action.
Also change it from point type to value type since it is not an output
parameter.
Fixes: ecad87d223 ("net/i40e: move RSS to flow API")
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Zhiyong Yang <zhiyong.yang@intel.com>
There are several func calls to rte_zmalloc() which don't have null
pointer check on the return value. And before return, the memory
is not freed. It fixes by adding null pointer check and rte_free().
Fixes: 078259773d ("net/i40e: store ethertype filter")
Fixes: 425c3325f0 ("net/i40e: store tunnel filter")
Fixes: c50474f31e ("net/i40e: support tunnel filter to VF")
Fixes: 5c53c82c81 ("net/i40e: store flow director filter")
Cc: stable@dpdk.org
Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Remove some unnecessary explicit type casting, to clean the code.
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Create a rte_ethdev_driver.h file and move PMD specific APIs here.
Drivers updated to include this new header file.
There is no update in header content and since ethdev.h included by
ethdev_driver.h, nothing changed from driver point of view, only
logically grouping of APIs. From applications point of view they can't
access to driver specific APIs anymore and they shouldn't.
More PMD specific data structures still remain in ethdev.h because of
inline functions in header use them. Those will be handled separately.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Replace strncmp with strncasecmp in i40e_update_customized_ptype
function for compatibility.
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
There're new metadata IPV4FRAG and IPV6FRAG in PPP
profile, this patch improves ptype parser to support
IPV4FRAG and IPV6FRAG.
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Fail to update SW ptype mapping table when loading
PPP profile, though profile can be loaded successfully.
It will cause fail to parse SW ptype during receiving
packets. This patch fixes this issue.
Fixes: 11556c915a ("net/i40e: improve packet type parser")
Cc: stable@dpdk.org
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Increase the internal limit for flow types from 32 to 64
to support future flow type extensions.
Change type of variables from uint32_t[] to uint64_t[]:
rte_eth_fdir_info.flow_types_mask
rte_eth_hash_global_conf.sym_hash_enable_mask
rte_eth_hash_global_conf.valid_bit_mask
This modification affects the following components:
net/i40e
net/ixgbe
app/testpmd
ABI versioning used to keep ABI stability.
Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Move setting PCType after setting port's MAC type, which can resolve
the issue of PCType doesn't take effect on X722.
Fixes: a286ebeb07 ("net/i40e: add dynamic mapping of SW flow types to HW pctypes")
Cc: stable@dpdk.org
Signed-off-by: Rosen Xu <rosen.xu@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Current flag is in wrong byte order for i40e_aq_mac_address_write,
and just uses the well defined macro instead.
Fixes: e18e01e92c ("i40e: support default MAC address setting")
Cc: stable@dpdk.org
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Reported by check-includes.sh:
[...]/rte_pmd_i40e.h:97:30: error: ISO C restricts enumerator values to
range of `int' [-Werror=pedantic]
RTE_PMD_I40E_PKG_INFO_MAX = 0xFFFFFFFF
^
Fixes: edeab742ed ("net/i40e: get information about DDP profile")
Cc: stable@dpdk.org
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Calling i40evf_dev_xstats_reset can sometimes crash. Fixed issue
by checking return code before using pstats.
Fixes: 8210e9e0d8 ("net/i40e: fix clear xstats bug in VF")
Cc: stable@dpdk.org
Signed-off-by: David Harton <dharton@cisco.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Wei Zhao <wei.zhao1@intel.com>
This patch will go into the process of clear all queue region
related configuration when dev stop even if there is no queue region
command before, so this is a bug, it may cause error. So add code
to check if there is queue configuration exist when flush queue
region config and remove this process when device stop. Queue region
clear only do when device initialization or PMD get flush command.
Fixes: 7cbecc2f74 ("net/i40e: support queue region set and flush")
Cc: stable@dpdk.org
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
New MAC address is copied to dev->data->mac_addrs[0] before calling
setting MAC address ops. So it will fail when deleting
dev->data->mac_addrs[0]. Deleting hw->mac.addr will fix the issue.
Fixes: 943c2d899a ("net/i40e: set VF MAC from VF")
Cc: stable@dpdk.org
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Rte_flow was defined to include RSS, this patch moves i40e
existing RSS to rte_flow. The old RSS configuration is kept
as it was, and can be deprecated in the future.
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
This patch supports getting/setting input set info for
RSS, FDIR, and FDIR flexible payload. It also adds some
helper functions for input set configuration.
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
The pointer to the user parameter of the callback registration is
automatically pass to the callback function.
There is no point to allow changing this user parameter by a caller.
That's why this parameter is always set to NULL by PMDs and set only
in ethdev layer before calling the callback function.
The history is that the user parameter was initially used
by the callback implementation to pass some information
between the application and the driver:
c1ceaf3ad0 ("ethdev: add an argument to internal callback function")
Then a new parameter has been added to leave the user parameter
to its standard usage of context given at registration:
d6af1a13d7 ("ethdev: add return values to callback process API")
The NULL parameter in the internal callback processing function
is now removed. It makes clear that the callback parameter is user
managed and opaque from a DPDK point of view.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
When primary address mac is changed, the mac filters were not updated in
the VSI with the new mac addr and incoming packets with this destination
address are dropped by the hardware filters.
This patch removes the VSI mac filter for the previous mac address and
adds a new one for new mac address.
Fixes: e18e01e92c ("i40e: support default MAC address setting")
Cc: stable@dpdk.org
Signed-off-by: Laurent Hardy <laurent.hardy@6wind.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Add a new Rx function using AVX2 instructions for higher
performance. For now, this functionality is limited to platforms
with Intel Xeon Scalable Processor(SP). The function to be used
is selected at runtime, not just at compile-time.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Add a new Tx function using AVX2 instructions for higher
performance. For now, this functionality is limited to platforms
with Intel Xeon Scalable Processor(SP). The function to be used
is selected at runtime, not just at compile-time.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Rename virtchnl_vf_resource's vf_offload_flags to vf_cap_flags.
The new name is more generic, so more than just offloading
capabilities can be added.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
This fix prevents errors or warnings while accessing unaligned 32-bit
data words on non-x86 platforms during getting link info from firmware.
Fixes: e8228f1a16 ("net/i40e/base: report supported link modes")
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Previous method for reading LLDP config was based on hard-coded offsets.
It happened to work, because of structured architecture of the NVM memory.
In the new approach, known as FLAT, we need to calculate the absolute
address, instead of using relative values. Needed defines for memory
location were added.
Fixes: 8db9e2a1b2 ("i40e: base driver")
CC: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
When using GCC 6.3.0 and EXTRA_CFLAGS=-Og, the compiler is not smart
enough to see that when you have an integrated VF that just one of the
if statemets has to be true so that ntu is always set. Fix the way that
the code is for integrated VFs so that the compiler won't complain.
Fixes: 9783eb15eb ("i40e/base: wrap the register definitions for PF and VF")
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
The FW has the ability to return a critical error on every AQ command.
So add the new return type as critical error to sync with firmware.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Add new AQ command that help to inform software how advanced
rearrangement process is.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
New control bits were defined for flat NVM structure.
One for pointing which NVM bank is currently used and
one used as indicator of structure type.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
This fix solves an issue occurring while calling i40e_led_set function
from the driver with "blink" parameter set as TRUE. This call resulted
in Activity LED blinking instead of Link LED, which may lead to errors
in physically identyfying the port, since Activity LED may be blinking
for different reasons aswell.
Fixes: 51b27bc5d8 ("i40e/base: update LED blinking")
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
This patch adds new I40E_NVMUPD_GET_AQ_EVENT state
to allow retrieval of AdminQ events as a result.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Add preservation flags support on X722 devices for NVM update AdminQ
function wrapper. Add new parameter and handling to nvm update admin
queue function intended to allow nvmupdate tool to configure the
preservation flags in the AdminQ command.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
1. Cleanup logical in __i40e_read_nvm_word and reuse it in
i40e_read_nvm_word.
2. Change couple functions to static so we can remove uncessary function
declarations
3. Cleanup logical in i40e_validate_nvm_checksum.
4. Add more debug information in PF reset
5. correct comments
6. Minor code style fix.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
NVM lock is only required at below situation:
1. its X722 device or
2. API version >= 1.5
or may have issue at firmware downgrade.
Fixes: c5846a125b ("net/i40e/base: fix NVM access interfering")
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Add new Adminq command i40e_aqc_opc_set_dcb_parameters that
helps to get DCB parameters in data structure i40e_aqc_set_dcb_parameters.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>