This commit sets the min and max supported MTU values for ice devices
via the ice_dev_info_get() function. Min MTU supported is set to
ETHER_MIN_MTU and max mtu is calculated as the max packet length
supported minus the transport overhead.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
Support link up and down functions for ice, and when stop the ice,
makes the link down also.
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
The last word should not cross shadow RAM boundary.
Fixes: 68a1ab82ad ("net/ice: speed up to retrieve EEPROM")
Cc: stable@dpdk.org
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
This patch is a cleanup on comment, variable modifier, coding style.
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
The RX stats will increase even no packets sent, this patch fix this issue
by modifying ipackets and ibytes statistics based on vsi instead of port
to avoid statistics error.
Fixes: a37bde5631 ("net/ice: support statistics")
Cc: stable@dpdk.org
Signed-off-by: Simei Su <simei.su@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Fix the issues reported by Coverity check, "Null-checking
vsi suggests that it may be null, but it has already been
dereferenced on all paths leading to the check."
Coverity issue: 328509, 328519, 328523
Fixes: e0dcf94a0d ("net/ice: support VLAN ops")
Fixes: ff963bfa7c ("net/ice: support RSS")
Cc: stable@dpdk.org
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
Reviewed-by: Rami Rosen <ramirose@gmail.com>
When device promiscuous mode has already been enabled,
should not return error if user re-enable it.
Fixes: c945e4bf90 ("net/ice: support promiscuous mode")
Cc: stable@dpdk.org
Signed-off-by: Ying A Wang <ying.a.wang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
Variable "status" should be defined as "enum ice_status"
instead of "uint16_t". This patch fixes the issue.
Fixes: c945e4bf90 ("net/ice: support promiscuous mode")
Cc: stable@dpdk.org
Signed-off-by: Ying A Wang <ying.a.wang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
This patch stopped LLDP by default to avoid the statistics error.
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Max frame size setup should consider double VLAN case.
Fixes: ae2bdd0219 ("net/ice: support MTU setting")
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
The driver must send its version information to the firmware, so
the firmware knows the driver is up. Otherwise, it will cause unexpected
OS package downloading when multiple driver instances running on the
same device.
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
Do a global replace of snprintf(..."%s",...) with strlcpy, adding in the
rte_string_fns.h header if needed. The function changes in this patch were
auto-generated via command:
spatch --sp-file devtools/cocci/strlcpy.cocci --dir . --in-place
and then the files edited using awk to add in the missing header:
gawk -i inplace '/include <rte_/ && ! seen { \
print "#include <rte_string_fns.h>"; seen=1} {print}'
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Device speed capability should be specified based on different PHY types
instead of a fixed value, this patch fix the issue.
Fixes: 690175ee51 ("net/ice: support getting device information")
Cc: stable@dpdk.org
Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
This patch enabled RSS for UPD/TCP/SCTP+IPV4/IPV6 packets.
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
If E810 download package failed, driver need to go to safe mode.
In the safe mode, some advanced features will not be supported.
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
This patch enables package downloading to the device. The package is
to be in the /lib/firmware/intel/ice/ddp directory and named ice.pkg.
The package is shared by the kernel driver and the DPDK PMD.
There is no per device package be supported so far, all the
devices can only download the same package. This limitation will
be removed in the future.
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Move all bit ops related functions from ice_osdep.h into ice_bitops.h.
Also remove the limitation that bitmap can only be 64 bits in
ice_set_bit and ice_clear_bit.
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Qiming Yang <qiming.yang@intel.com>
Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Revert the workaround for allocating TCAM and FV entries to align
with latest firmware.
Signed-off-by: Dan Nowlin <dan.nowlin@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Qiming Yang <qiming.yang@intel.com>
Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
OS package's format is changed, field vector's protocol offset size is
changed from 8 bit to 16 bit. So base code also need to align to this,
or PMD will not be able to load OS package correctly.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Reviewed-by: Qiming Yang <qiming.yang@intel.com>
Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
1. clean flow entry's action structure after remove it.
2. initialized priority when add a new flow entry
3. remove RSS configuration before deleting the flow profile.
Fixes: aa1cd410fa ("net/ice/base: add flow module")
Fixes: 51d04e4933 ("net/ice/base: add flexible pipeline module")
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Qiming Yang <qiming.yang@intel.com>
Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
This patch ensure that TCAM allocations made by a newly added VSIG
that has the same characteristic list of an existing VSIG are removed.
Fixes: 51d04e4933 ("net/ice/base: add flexible pipeline module")
Signed-off-by: Vignesh Sridhar <vignesh.sridhar@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Qiming Yang <qiming.yang@intel.com>
Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
1. Add call to replay RSS configurations
2. Add RSS configurations to end of list and not the head to avoid
inversion on replay.
Signed-off-by: Vignesh Sridhar <vignesh.sridhar@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Qiming Yang <qiming.yang@intel.com>
Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Add flow director related support base code.
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Qiming Yang <qiming.yang@intel.com>
Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Add module to support DCB related features.
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Qiming Yang <qiming.yang@intel.com>
Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Improved the profile reference counting, by moving it from being
based on how many TCAM entries using the profile to how many
profile map entries are using the profile.
Signed-off-by: Dan Nowlin <dan.nowlin@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Qiming Yang <qiming.yang@intel.com>
Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Code added to check the FW recovery mode. This function will be
used by the drivers during init to check whether the FW is in
recovery mode or not. If FW is in recovery mode then the drivers
need to run in a recovery mode where it can allow only limited
operations. Link should be down, allow only certain AQ commands
etc.
Signed-off-by: Victor Raj <victor.raj@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Qiming Yang <qiming.yang@intel.com>
Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
If there is no queue to disable, return appropriate configuration error
earlier without acquiring the lock.
Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Qiming Yang <qiming.yang@intel.com>
Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Klocwork points out some code is unreachable in
ice_get_itr_intrl_gran and ice_ptg_find_ptype.
The patch removed the unreachable code and resolved the static
analysis reported issues.
Fixes: 51d04e4933 ("net/ice/base: add flexible pipeline module")
Fixes: 453d087cca ("net/ice/base: add common functions")
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Qiming Yang <qiming.yang@intel.com>
Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Update copyright time to 2019.
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Qiming Yang <qiming.yang@intel.com>
Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
1. Fix some problems with filling the HW tables.
2. Fix a logic error in ice_rem_prof_from_list.
Fixes: 51d04e4933 ("net/ice/base: add flexible pipeline module")
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Qiming Yang <qiming.yang@intel.com>
Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
If allocating a VSI to a VSIG fails the local allocations made for VSIG
profiles and change-lists will not be removed. Adding calls to free
these entries on error in VSIG management calls.
Signed-off-by: Vignesh Sridhar <vignesh.sridhar@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Qiming Yang <qiming.yang@intel.com>
Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Profile TCAM entry removal is handled by the firmware when
freeing the resource, so the driver does not need to write these
default entries back with an update Package action.
This patch removes writing of the TCAM entry using Update Package
command when removing it, since the entry has already been freed
by firmware.
Signed-off-by: Dan Nowlin <dan.nowlin@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Qiming Yang <qiming.yang@intel.com>
Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Add define for 52 byte RSS hash key size, and add struct
ice_aqc_get_set_rss_keys comments regarding setting 40 bytes and
52 byte hash key.
Signed-off-by: Paul Greenwalt <paul.greenwalt@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Qiming Yang <qiming.yang@intel.com>
Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Extend the functionality of the admin queue command by including
additional status and ID bits to improve link topology configuration.
Signed-off-by: Matthew Vick <matthew.vick@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Qiming Yang <qiming.yang@intel.com>
Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
In the ice_aq_set_phy_cfg AQ command, the 16.4 bit is reserved.
This patch will make sure that this bit will never be set to 1.
Signed-off-by: Chinh T Cao <chinh.t.cao@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Qiming Yang <qiming.yang@intel.com>
Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
The patch added to retrieve the queue context and update the queue
handle for lan queues.
Signed-off-by: Victor Raj <victor.raj@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Qiming Yang <qiming.yang@intel.com>
Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Change below function as static and also relocated code line
to align with kernel driver.
ice_aq_move_sched_elems
ice_sched_get_agg_node
ice_sched_set_node_bw_lmt
ice_sched_cfg_node_bw_alloc
ice_sched_add_agg_cfg
ice_sched_rm_agg_cfg
ice_sched_move_vsi_to_agg
ice_sched_del_rl_profile
ice_sched_rm_unused_rl_prof
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Qiming Yang <qiming.yang@intel.com>
Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Update macros for metadata and package flags.
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Qiming Yang <qiming.yang@intel.com>
Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
1. ICE_SW_LKUP_LAST need to be handled correctly in
ice_aq_alloc_free_vsi_list and ice_update_vsi_list_rule
2. ICE_SW_LKUP_ETHERTYPE_MAC need to be handled correctly in
ice_update_vsi_lkup_fltr
3. free package segment pointer during ice_deinit_hw
Fixes: c7dd159311 ("net/ice/base: add virtual switch code")
Fixes: 453d087cca ("net/ice/base: add common functions")
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Qiming Yang <qiming.yang@intel.com>
Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
1. ice_rem_all_sw_rules_info - remove all switch rules.
2. ice_reply_all_fltr - replay all filters stored in book keeping list.
These APIs will be used when switch rule feature is enabled.
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Qiming Yang <qiming.yang@intel.com>
Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
1. ice_add_mac_with_sw_marker - add filter with software marker.
2. ice_add_mac_with_counter - add filter with counter enabled.
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Qiming Yang <qiming.yang@intel.com>
Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
1. ice_get_vsi_promisc - get promiscuous mode of give VSI.
2. ice_get_vsi_vlan_promisc - get VLAN promiscuous mode of given VSI.
PMD may use these APIs to check the real HW status, but not rely on
a software flag when something abnormal.
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Qiming Yang <qiming.yang@intel.com>
Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
1. ice_alloc_res_cntr - allocate resource counter
2. ice_free_res_cntr - free resource counter
3. ice_alloc_vlan_res_counter - allocate vlan resource counter
4. ice_free_vlan_res_counter - free vlan resource counter
These APIs will be used when try to count the number of a flow be
hit.
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Qiming Yang <qiming.yang@intel.com>
Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
1. ice_aq_get_res_alloc - get allocated resources.
2. ice_aq_get_res_descs - get allocated resource descriptors.
These APIs may help to PMD to enable some debug utilities to
dump the resource allocation status.
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Qiming Yang <qiming.yang@intel.com>
Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Add API ice_remove_eth_mac and ice_add_eth_mac to support
adding / removing ethertype (or MAC) based filter rules.
PMD driver can use these APIs to enable related rte_flow rule.
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Qiming Yang <qiming.yang@intel.com>
Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Added code to allocate VSI queue contexts to save the queue specific
information like bandwidth etc.
Signed-off-by: Victor Raj <victor.raj@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Qiming Yang <qiming.yang@intel.com>
Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Add below APIs in switch module
1. ice_aq_get_vsi_params - get VSI context info
2. ice_aq_add_update_mir_rule - add/update mirror rule
3. ice_aq_delete_mir_rule - delete mirror rule
4. ice_aq_set_storm_ctrl - set storm control configuration
5. ice_aq_get_storm_ctrl - get storm control configuration
PMD can use these APIs to enable mirror rule and storm control
related features.
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Qiming Yang <qiming.yang@intel.com>
Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Remove static of below functions and declare them as external
APIs.
ice_aq_add_vsi
ice_aq_free_vsi
ice_aq_update_vsi
ice_aq_add_lan_txq
ice_init_pkg
So far the purpose is just to sync with kernel driver.
They are reserved for future use.
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Qiming Yang <qiming.yang@intel.com>
Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>