The list of libraries in LDLIBS was generated from the DEPDIRS-xyz
variable. This is valid when the subdirectory name match the library
name, but it's not always the case, especially for PMDs.
The patches removes this feature and explicitly adds the proper
libraries in LDLIBS.
Some DEPDIRS-xyz variables become useless, remove them.
Reported-by: Gage Eads <gage.eads@intel.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Gage Eads <gage.eads@intel.com>
The stats_get dev op API doesn't include return value, so PMD cannot
return an error in case of failure at stats getting process time.
Since PCI devices can be removed and there is a time between the
physical removal to the RMV interrupt, the user may get invalid stats
without any indication.
This patch changes the stats_get API return value to be int instead of
void.
All the net PMDs stats_get dev ops are adjusted by this patch.
Signed-off-by: Matan Azrad <matan@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
We were not associating a MAC+VLAN per VNIC filter correctly.
This patch fixes that. Also set the VLAN type appropriately.
Fixes: f92735db1e ("net/bnxt: add L2 filter alloc/init/free")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Match a flow against existing flows programmed in the HW
and prevent overlapping entries. Also change log level of
some logs to DEBUG.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
We are not checking if a filter allocation succeeded.
And we end up accessing a null pointer after that.
Also invalidate the fw_l2_filter_id to prevent unnecessary
HW access and hence HWRM command failures during exit.
Fixes: 5ef3b79fdf ("net/bnxt: support flow filter ops")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
For gcc (GCC) 4.8.3 20140911 (Red Hat 4.8.3-7),
As of 5ef3b79fdf, compilation of DPDK fails with the following
ERROR MESSAGE:
"bnxt_filter.c:960:117: error: ‘vnic’ may be used uninitialized in this
function [-Werror=maybe-uninitialized]".
Resolve this by initializing 'vnic' to NULL;
Fixes: 5ef3b79fdf ("net/bnxt: support flow filter ops")
Signed-off-by: Mark Kavanagh <mark.b.kavanagh@intel.com>
Extend port_id definition from uint8_t to uint16_t in lib and drivers
data structures, specifically rte_eth_dev_data. Modify the APIs,
drivers and app using port_id at the same time.
Fix some checkpatch issues from the original code and remove some
unnecessary cast operations.
release_17_11 and deprecation docs have been updated in this patch.
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
The compilation with gcc-6.3.0 and EXTRA_CFLAGS=-Og gives the following
error:
CC rte_pmd_bnxt.o
rte_pmd_bnxt.c: In function ‘rte_pmd_bnxt_set_all_queues_drop_en’:
rte_pmd_bnxt.c:116:6: error: ‘rc’ may be used uninitialized in this
function [-Werror=maybe-uninitialized]
int rc;
^~
This can happen if both bp->nr_vnics and bp->pf.active_vfs are 0.
Fix it by initializing rc to -EINVAL.
Fixes: 49947a13ba ("net/bnxt: support Tx loopback, set VF MAC and queues drop")
Cc: stable@dpdk.org
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
We were hardcoding the max MAC addresses to 32, while the HW
can support more than that. This was restricting the number of VMDQ
pools that we could support. Use the value obtained from FW instead.
Fixes: 804e746c7b ("net/bnxt: add hardware resource manager init code")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Add support for ntuple filtering.
Only RTE_5TUPLE_FLAGS is supported currently.
RTE_2TUPLE_FLAGS is not supported.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Add support for get/set_eeprom, get_eeprom_length dev_ops.
Defined the structures required to get/set the eeprom length/data
in hsi_struct_defs hdr file along with implementation.
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
In some cases the interrupt handler is accessing cpr, which has
already been freed causing segfaults. This patch avoids such accesses.
Fixes: 7bc8e9a227 ("net/bnxt: support async link notification")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
While gathering per queue stats, we are overwriting some of the
stats. This causes some of the counters in xstats to be incorrect.
Fixes: 577d3dced0 ("net/bnxt: refactor the query stats")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
We were not setting the dev_info.hash_key_size. Setting it now.
Fixes: 0a6d2a7200 ("net/bnxt: get device infos")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
We are not configuring the RSS settings updated by rss_hash_update().
Fixing it.
Fixes: fcc0aa1edc ("net/bnxt: add RSS hash configuration")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
update ol_flags with the appropriate status of IP/L4 cksum in Rx path.
Fixes: 2eb53b134a ("net/bnxt: add initial Rx code")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
We are not correctly setting hw checksum offload for all the
offload flags. This patch fixes that.
Fixes: 6eb3cc2294 ("net/bnxt: add initial Tx code")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Map ETH_VMDQ_ACCEPT_HASH_UC to the promiscuous bit.
Also, set ALLMULTI and MCAST when MCAST is set to ensure multicast traffic
is received regardless of the VF driver list.
Fixes: 4cfe399f65 ("net/bnxt: support to set VF rxmode")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
In bnxt_hwrm_cfa_l2_set_rx_mask, we are ignoring the previous
setting of HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_BCAST and
setting it again, thereby wrongly enabling Broadcast.
Fixes: 244bc98b0d ("net/bnxt: set L2 Rx mask")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Even when rx buffer allocation fails, we are wrongly updating
the producer index. This patch fixes that.
Also in case of a buffer allocation failure, reattempt buffer
allocation before the rx handler exits.
Fixes: 2eb53b134a ("net/bnxt: add initial Rx code")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
We are currently not handling multi queue RX/RSS modes correctly.
If RSS is not requested, create one VNIC per RXQ.
Fixes: 6133f20797 ("net/bnxt: add Rx queue create/destroy")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
The calculation for number of pools is wrong.
We are wrongly overwriting the calculated value with ETH_64_POOLS.
Accordingly fix the size of ff_pools array.
Fix the log message as well.
Fixes: 4cfe399f65 ("net/bnxt: support to set VF rxmode")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
start_grp_id is incremented wrongly. Fixing it.
Fixes: daef48efe5 ("net/bnxt: support set MTU")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
We are wrongly using just 16 bits of address from rte_mem_virt2phy
while filling the vlan table address instead of 64-bytes.
Most likely a copy-paste error.
Fixes: 36735a932c ("net/bnxt: support set VF QOS and MAC anti spoof")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Obtain the spinlock in HWRM_PREP()
Eliminate two unnecessary arguments in HWRM_PREP().
Unlock the spinlock before returning in HWRM_ERROR_CHECK()
Add new HWRM_UNLOCK() macro
Update usage of the thre macros.
Fixes: 804e746c7b ("net/bnxt: add hardware resource manager init code")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
The callback arguments to _rte_eth_dev_callback_process() are swapped.
Fix them.
Fixes: d6af1a13d7 ("ethdev: add return values to callback process API")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Only set the vlanonly bit if vlan_nonvlan is clear. Also, allow the
VLAN table to be cleared when vlanonly is set.
Clearing the VLAN table when vlanonly is set will stop all traffic
since it requires all frames to have a VLAN tag, and that tag to be
in the zero-length table. This is still a valid use case though,
and has been seen in the wild.
Fixes: 36735a932c ("net/bnxt: support set VF QOS and MAC anti spoof")
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
If the current VLAN anti spoof setting is same as the new value,
the firmware can return an error. Call the HWRM command to update
the new setting if it is different from the current value.
Fixes: 36735a932c ("net/bnxt: support set VF QOS and MAC anti spoof")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
This patch sends the HWRM command to free a filter in the hardware,
before using it again.
Fixes: f92735db1e ("net/bnxt: add L2 filter alloc/init/free")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
We are wrongly using a Rx side HWRM command set_rx_mask to configure
VLAN anti-spoof. This being a Tx side feature, this patch
tries to fix it.
Since the HWRM command to do it is available only in
the newer firmware versions, the patch verifies the firmware
version before attempting to send the HWRM command to
the firmware.
Fixes: 36735a932c ("net/bnxt: support set VF QOS and MAC anti spoof")
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
This patch resets the VF stats during initialization
Fixes: b7778e8a1c ("net/bnxt: refactor to properly allocate resources for PF/VF")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
remove the unnecessary rte_delay in bnxt_set_hwrm_link_config
Fixes: 7bc8e9a227 ("net/bnxt: support async link notification")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Check if the vnic_id and rss_rule is not invalid before passing it
to the firmware to cleanup the VNIC. Log a message if the vnic_id
is invalid.
Fixes: db678d5c2b ("net/bnxt: add HWRM VNIC configure")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Fix use of local variable to avoid segfault.
cnt was incorrectly tested and decremented in the loop that removes
a VLAN from the table.
Fixes: 36735a932c ("net/bnxt: support set VF QOS and MAC anti spoof")
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
1) handle_async_event is a DEBUG level log message.
2) Log "Unable to get default VNIC for VF %d" at INFO level.
Fixes: 36735a932c ("net/bnxt: support set VF QOS and MAC anti spoof")
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Fix an error message. Probably a copy/paste error.
Fixes: 36735a932c ("net/bnxt: support set VF QOS and MAC anti spoof")
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
bnxt_hwrm_port_phy_cfg() was not setting enables appropriately.
This was causing undesired issues with link config.
This patch takes care of that.
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>