Commit Graph

24088 Commits

Author SHA1 Message Date
Ferruh Yigit
ae8f4cf328 net/dpaa: fix port ID type in API
Updating the type for 'port' variable from 'uint8_t' to 'uint16_t'.

Fixes: 8c3495f5d2 ("net/dpaa: support loopback API")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2020-09-18 18:55:10 +02:00
Sachin Saxena
3351a1036e net/pfe: fix misuse of interface index
Pfe pmd has no need to bound host interface
for which we require if_index field.
Setting it to 0 as unused.

Fixes: fe38ad9ba7 ("net/pfe: add device start/stop")
Cc: stable@dpdk.org

Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Sachin Saxena <sachin.saxena@nxp.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2020-09-18 18:55:10 +02:00
Sachin Saxena
88e584a60d net/dpaa2: fix misuse of interface index
Dpaa2 pmd has no need to bound host interface
for which we require if_index field.
Setting it to 0 as unused.

Fixes: 3e5a335d3f ("net/dpaa2: add basic operations")
Cc: stable@dpdk.org

Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Sachin Saxena <sachin.saxena@nxp.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2020-09-18 18:55:10 +02:00
Ori Kam
6abee736ab doc: update RSS flow action with best effort
Using the rte_flow action RSS types field,
may result in undefined outcome.

For example selecting both UDP and TCP,
selecting TCP RSS type but the pattern is targeting UDP traffic.
another option is that the PMD doesn't support all requested types.

Until now, it wasn't clear what will happen in such cases.
This commit clarify this issue by stating that the PMD
will work in the best-effort mode, and will fail
in case the requested type is not supported.

Signed-off-by: Ori Kam <orika@nvidia.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2020-09-18 18:55:10 +02:00
Yunjian Wang
05a8e4a35d net/tap: free mempool when closing
When setup tx queues, we will create a mempool for the 'gso_ctx'.
The mempool is not freed when closing tap device. If free the tap
device and create it with different name, it will create a new
mempool. This maybe cause an OOM.

The snprintf function return value is not checked and the mempool
name may be truncated. This patch also fix it.

Fixes: 050316a883 ("net/tap: support TSO (TCP Segment Offload)")
Cc: stable@dpdk.org

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2020-09-18 18:55:10 +02:00
Haiyue Wang
94f6d7c3ce maintainers: update for igb/igc/ixgbe
Co-work with Jeff, setting me as new maintainer for igb, igc and ixgbe.

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2020-09-18 18:55:10 +02:00
Andrew Rybchenko
bf3785fbd8 net: check first segment length on SW VLAN insertion
SW VLAN insertion relies on Ethernet addresses location in contiguous
memory (do not split across mbuf segments). There is no any formal
requirements on data location and mbuf structure which guarantee it.
So, check it explicitly to avoid corrupted packets if the condition
is violated. Typically software VLAN insertion is done on Tx prepare
stage and application will get indication that the packet is invalid
and cannot be transmitted.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2020-09-18 18:55:10 +02:00
Nithin Dabilpuram
e0b79eabac net/octeontx2: support TM length adjust and packet mode
This patch adds support to packet length adjust TM feature
for private shaper. It also adds support to packet mode
feature that applies both to private shaper and node DWRR
scheduling of SP children.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2020-09-18 18:55:10 +02:00
Nithin Dabilpuram
bb52561e53 app/testpmd: add TM command for non-leaf and packet mode
Add TM command to enable packet mode for all SP children
in non leaf node. This is a new command as
"add tm nonleaf node pktmode".

Also add support to shaper profile add command to take
packet mode parameter used to setup shaper in packet mode.
This adds an extra argument "packet_mode" to shaper profile add command
"add port tm node shaper profile" as last argument.

This patch also dumps new tm port/level/node capabilities
sched_wfq_packet_mode_supported, sched_wfq_byte_mode_supported,
shaper_private_packet_mode_supported, shaper_private_byte_mode_supported,
shaper_shared_packet_mode_supported, shaper_shared_byte_mode_supported.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2020-09-18 18:55:10 +02:00
Nithin Dabilpuram
57fc9e4703 drivers/net: update TM capability
Since existing PMD's support shaper byte mode and scheduler
wfq byte mode, update the same in their port/level/node capabilities
that are added. SoftNIC PMD is already upto date with new capabilities.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2020-09-18 18:55:10 +02:00
Nithin Dabilpuram
bf4e0faae9 ethdev: support TM for shaper config in packet mode
Some NIC hardware support shaper to work in packet mode i.e
shaping or ratelimiting traffic is in packets per second (PPS) as
opposed to default bytes per second (BPS). Hence this patch
adds support to configure shared or private shaper in packet mode,
provide rate in PPS and add related tm capabilities in port/level/node
capability structures.

This patch also updates tm port/level/node capability structures with
exiting features of scheduler wfq packet mode, scheduler wfq byte mode
and private/shared shaper byte mode.

SoftNIC PMD is also updated with new capabilities.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2020-09-18 18:55:10 +02:00
Alvin Zhang
6cd2d6adc7 net/iavf: support outer IP hash for GTPC
Add patterns and headers for GTPC, now outer IP hash can be configured
as input sets for GTPC packets.

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2020-09-18 18:55:10 +02:00
Guinan Sun
fd7717d29b net/i40e/base: update version
Update base code version in readme.

Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2020-09-18 18:55:10 +02:00
Guinan Sun
4d58e3d008 net/i40e/base: fix PHY config param when enabling EEE
The i40e_enable_eee function did not copy phy_type_ext field
from current PHY configuration retrieved with Get PHY Abilities AQ.
It caused a misconfiguration of the PHY on devices supporting 2.5
and 5G speeds and prevented establishing link when only those
speeds were selected for advertisement.

Fixes: c61bcb0fe1 ("net/i40e/base: support Energy Efficient Ethernet")
Cc: stable@dpdk.org

Signed-off-by: Galazka Krzysztof <krzysztof.galazka@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2020-09-18 18:55:10 +02:00
Guinan Sun
4b3e0ab701 net/i40e/base: add EEE LPI status check for X722
Add reading LPI (low power idle) status for supported X722 devices.
If adapter's PHY supports EEE in current mode (device ID + link speed),
LPI status is read from PHY Clause 45 PCS status register.

Signed-off-by: Dawid Lukwinski <dawid.lukwinski@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2020-09-18 18:55:10 +02:00
Guinan Sun
2972fc3f40 net/i40e/base: fix Rx only for unicast promisc on VLAN
Set promiscuous mode to rx traffic only if VSI has VLANs configured.
Rename misleading PROMISC_TX bit to proper name.
Added I40E_AQC_SET_VSI_PROMISC_RX_ONLY during VSI unicast promiscuous
mode configuration with port VLAN.
Aligned unicast promiscuous with VLAN to the one without VLAN.
Previously other VFs could listen to unicast tx traffic of other VFs.

Fixes: 8db9e2a1b2 ("i40e: base driver")
Cc: stable@dpdk.org

Signed-off-by: Przemyslaw Patynowski <przemyslawx.patynowski@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2020-09-18 18:55:10 +02:00
Guinan Sun
73cd23dd87 net/i40e/base: support minimum rollback revision
Add support for minimum rollback revision.

Signed-off-by: Przemyslaw Ciesielski <przemyslaw.ciesielski@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2020-09-18 18:55:10 +02:00
Guinan Sun
36fcba1ff5 net/i40e/base: fix function header arguments
Fix them by adding the argument descriptions.

Fixes: 0d9d27bb86 ("i40e/base: prepare local LLDP MIB in TLV")
Cc: stable@dpdk.org

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2020-09-18 18:55:10 +02:00
Guinan Sun
e79aa4e67a net/i40e/base: update FW API version
Update FW increment API version for:
-NVM FW Lockdown Feature for legacy devices
-Security Version Opt-In

Signed-off-by: Jacek Naczyk <jacek.naczyk@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2020-09-18 18:55:10 +02:00
Qi Zhang
da598edd06 net/ice/base: preserve default aggregator VSI information
Added the change to keep the default aggregator VSI information.

Signed-off-by: Tarun Singh <tarun.k.singh@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
2020-09-18 18:55:10 +02:00
Qi Zhang
5a141eac05 net/ice/base: rename ACL priority values
The naming convention used to shorten 'priority' is 'prio'.
Convert the ACL related entries that use 'prior' to 'prio'.

Also, as ICE_LOW, ICE_NORMAL,... are not very descriptive of what
they represent. Add 'ACL_PRIO' to help convey their use.

Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
2020-09-18 18:55:10 +02:00
Qi Zhang
374c4bcaa0 net/ice/base: remove unnecessary conditional
These two conditional statements are unnecessary because the condition
is always true based on existing code flow.  Remove them to resolve
potential errors from some static analysis tools.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
2020-09-18 18:55:10 +02:00
Qi Zhang
3fbba579a2 net/ice/base: rename function
'xtrct' or 'xtract' is currently used in the code to shorten 'extract'.
Rename ice_prgm_acl_prof_extrt() to ice_prgm_acl_prof_xtrct() so we don't
have another variation of a 'extract'.

Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
2020-09-18 18:55:10 +02:00
Qi Zhang
8d6004858c net/ice/base: cache NVM module bank information
The ice flash contains two copies of each of the NVM, Option ROM, and
Netlist modules. Each bank has a pointer word and a size word. In order
to correctly read from the active flash bank, the driver must calculate
the offset manually.

During NVM initialization, read the Shadow RAM control word and
determine which bank is active for each NVM module. Additionally, cache
the size and pointer values for use in calculating the correct offset.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
2020-09-18 18:55:10 +02:00
Qi Zhang
9ec03609d8 net/ice/base: cleanup code
Remove unnecessary mac_type check, fix couple comment, and remove
unnecessary empty line.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
2020-09-18 18:55:10 +02:00
Qi Zhang
0b7de72c96 net/ice/base: remove unused parameter
remove unused parameter of ice_parse_fdir_func_caps

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
2020-09-18 18:55:10 +02:00
Qi Zhang
d55ca51267 net/ice/base: separate NVM version struct
The ice_nvm_info structure has become somewhat of a dumping ground for
all of the fields related to flash version. It holds the NVM version and
EETRACK id, the OptionROM info structure, the flash size, the ShadowRAM
size, and more.

A future change is going to add the ability to read the NVM version and
EETRACK ID from the inactive NVM bank. To make this simpler, it is
useful to have these NVM version info fields extracted to their own
structure.

Rename ice_nvm_info into ice_flash_info, and create a separate
ice_nvm_info structure that will contain the eetrack and NVM map
version. Move the netlist_ver structure into ice_flash_info and rename it
ice_netlist_info for consistency.

Modify the static ice_get_orom_ver_info to take the option rom structure
as a pointer. This makes it more obvious what portion of the hw struct
is being modified. Do the same for ice_get_netlist_ver_info.

Introduce a new ice_get_nvm_ver_info function, which will be similar to
ice_get_orom_ver_info and ice_get_netlist_ver_info, used to keep the NVM
version extraction code co-located.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
2020-09-18 18:55:10 +02:00
Qi Zhang
ca5a25c5f0 net/ice/base: enable QinQ filter for switch advanced rule
Enable QinQ type filter for switch advanced rule, it support tunnel
and non-tunnel packet use external and inner vlan id as input set
for rules, it also support session id as input set for PPPoE rule
with QinQ flag in packet.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
2020-09-18 18:55:10 +02:00
Qi Zhang
2906c7eac9 net/ice/base: adjust rate limit profile ids runtime database
Moving the runtime profile ids database/storage to the hw structure.

Signed-off-by: Shibin Koikkara Reeny <shibin.koikkara.reeny@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
2020-09-18 18:55:10 +02:00
Qi Zhang
14fa11f485 net/ice/base: change misc ACL style
This is a collection of minor ACL style changes including:

- When there is nothing to unroll, return a value directly.
- Return ICE_SUCCESS(0) in cases where an error was previously checked
  so ICE_SUCCESS is the only possible return.
- Remove unnecessary parentheses and newlines
- Move unroll of allocation to end of function and use goto on errors to
  free.
- Fix function header comment style
- Remove 'else' from an 'if else' condition where both conditions return
  a value to reduce indentation.

Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
2020-09-18 18:55:10 +02:00
Qi Zhang
5ebb52ae42 net/ice/base: preserve NVM capabilities in safe mode
If the driver initializes in safe mode, it will call
ice_set_safe_mode_caps. This results in clearing the capabilities
structures, in order to set them up for operating in safe mode, ensuring
many features are disabled.

This has a side effect of also clearing the capability bits that relate
to NVM update. The result is that the device driver will not indicate
support for unified update, even if the firmware is capable.

Fix this by adding the relevant capability fields to the list of values
we preserve. To simplify the code, use a common_cap structure instead of
a handful of local variables. To reduce some duplication of the
capability name, introduce a couple of macros used to restore the
capabilities values from the cached copy.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
2020-09-18 18:55:09 +02:00
Qi Zhang
0fceb10f6d net/ice/base: remove function ACL count query
Remove debug function ice_aq_query_acl_cntrs.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
2020-09-18 18:55:09 +02:00
Qi Zhang
39a7a85680 net/ice/base: remove repeated words
A new test in checkpatch detects repeated words; cleanup all pre-existing
occurrences of those now.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
2020-09-18 18:55:09 +02:00
Qi Zhang
d58cc74ebd net/ice/base: check failed acts allocation
There is no check for failed allocation of 'acts'. Add a check and
return if memory was not successfully allocated. Also, as all 'goto out'
occur after this check there is no need to perform a check for 'acts' as
we will have returned if it is not set.

Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
2020-09-18 18:55:09 +02:00
Qi Zhang
56ec90f190 net/ice/base: move a function
Move ice_flow_get_hw_prof, this is not necessary for DPDK, just
sync the code with other compile option which ice_flow_get_hw_prof
is declared as a static function.

Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
2020-09-18 18:55:09 +02:00
Qi Zhang
8ae56d6af0 net/ice/base: clear advanced rules in reset preparation
Clear advanced rules from SW and HW before reset.

Signed-off-by: Norbert Ciosek <norbertx.ciosek@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
2020-09-18 18:55:09 +02:00
Qi Zhang
54d86ca587 net/ice/base: move a function
The only caller of this function is within the file so mark it as static
and move it up in the file to avoid a forward declaration.

Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
2020-09-18 18:55:09 +02:00
Qi Zhang
e8ae33f119 net/ice/base: filter for GTPU outer IP without inner IP
Add ptype MAC_IPV4_GTPU into
ice_ptypes_ipv4_ofos, ice_ptypes_ipv4_ofos_all and ice_ipv4_ofos_no_l4

Add ptype MAC_IPV6_GTPU into
ice_ptypes_ipv6_ofos, ice_ptypes_ipv6_ofos_all and ice_ipv6_ofos_no_l4

Add ptype MAC_IPV4_GTPU and MAC_IPV6_GTPU into
the new ice_ptypes_gtpu_no_ip

So outer IP can be configured as input set for GTPU packet that without
inner IP layer.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
2020-09-18 18:55:09 +02:00
Qi Zhang
ef77f2cfe9 net/ice/base: support outer IP filter for GTPC
Add ptype MAC_IPV4_GTPC_TEID and MAC_IPV4_GTPC into
ice_ptypes_ipv4_ofos, ice_ptypes_ipv4_ofos_all and ice_ipv4_ofos_no_l4

Add ptype MAC_IPV6_GTPC_TEID and MAC_IPV6_GTPC into
ice_ptypes_ipv6_ofos, ice_ptypes_ipv6_ofos_all and ice_ipv6_ofos_no_l4

So outer IP can be configured as input set for GTPC packet.

Also add MAC_IPV4_GTPC_TEID and MAC_IPV6_GTPC_TEID into
ice_ptypes_gtpc, so when ICE_FLOW_SEG_HDR_GTPC is requested, it can
take effect on all GTPC packets (with or without TEID).

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
2020-09-18 18:55:09 +02:00
Qi Zhang
c6048730ea net/ice/base: refactor DCB related variables
In this patch, the DCB related variables will be refactored out of the
ice_port_info_struct. The goal is to make the ice_port_info struct
cleaner.

Signed-off-by: Chinh T Cao <chinh.t.cao@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
2020-09-18 18:55:09 +02:00
Qi Zhang
af73360557 net/ice/base: reduce profile to recip info get from firmware
Only need to get profile_to_recip info from firmware for
profiles used by switch, no need for other free profile
in order that we can reduce the time consumed when
download a switch rule.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
2020-09-18 18:55:09 +02:00
Qi Zhang
24b38f1ea5 net/ice/base: introduce Tx rate limiting on port level
The PSM Configuration has a Rate Limiter for each associated
switch port based on its relative speed from the total BW of
switch ports connected to LAN controller. The rate limiters
will be dynamic get readjusted if switch port speeds are
changed at the root node layer of the scheduler tree. Adding
a function to directly modify the EIR of root node.

Signed-off-by: Shibin Koikkara Reeny <shibin.koikkara.reeny@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
2020-09-18 18:55:09 +02:00
Qi Zhang
3cd364d84b net/ice/base: join format strings to same line
When printing messages with ice_debug, align the printed string to the
origin line of the message in order to ease debugging and tracking
messages back to their source.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
2020-09-18 18:55:09 +02:00
Qi Zhang
804db32db3 net/ice/base: support GTP-U type switch rule
This patch add support for GTP-U type of switch rule.
It enable all GTP-U related ptype.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
2020-09-18 18:55:09 +02:00
Qi Zhang
e39e66f4f4 net/ice/base: add AQ LLDP filter control command
As of NVM ver 1.7.1 there is a new AQ command to add and remove
LLDP filters for Rx flow.  This patch implements the support
structure to implement this functionality.

Signed-off-by: Dave Ertman <david.m.ertman@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
2020-09-18 18:55:09 +02:00
Qi Zhang
1f9c73593c net/ice/base: fix abbreviations
Correct abbreviations as identified by abbrevcheck

Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
2020-09-18 18:55:09 +02:00
Qi Zhang
bd0438d9d4 net/ice/base: introduce and use for each bit iterator
A number of code flows iterate over a block of memory to do something
for every bit set in that memory. Use existing bit operations in a new
iterator macro to make those code flows cleaner.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
2020-09-18 18:55:09 +02:00
Qi Zhang
4406ca307a net/ice/base: add function header
Add a function header for ice_cfg_phy_fc()

Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
2020-09-18 18:55:09 +02:00
Qi Zhang
6d288fa5f7 net/ice/base: introduce and use bitmap hamming weight API
Introduce ice_bitmap_hweight() and use it instead of open-coding that
functionality.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
2020-09-18 18:55:09 +02:00
Qi Zhang
dd4a3cef55 net/ice/base: introduce and use bitmap set API
Introduce ice_bitmap_set() and use it instead of open-coding that
functionality.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
2020-09-18 18:55:09 +02:00