igc: Add condition for qbv_config_change_errors counter
Add condition to increase the qbv counter during taprio qbv configuration only. There might be a case when TC already been setup then user configure the ETF/CBS qdisc and this counter will increase if no condition above. Fixes: ae4fe4698300 ("igc: Add qbv_config_change_errors counter") Signed-off-by: Muhammad Husaini Zulkifli <muhammad.husaini.zulkifli@intel.com> Tested-by: Naama Meir <naamax.meir@linux.intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
This commit is contained in:
parent
c451410ca7
commit
ed89b74d2d
@ -184,6 +184,7 @@ struct igc_adapter {
|
|||||||
u32 max_frame_size;
|
u32 max_frame_size;
|
||||||
u32 min_frame_size;
|
u32 min_frame_size;
|
||||||
|
|
||||||
|
int tc_setup_type;
|
||||||
ktime_t base_time;
|
ktime_t base_time;
|
||||||
ktime_t cycle_time;
|
ktime_t cycle_time;
|
||||||
bool qbv_enable;
|
bool qbv_enable;
|
||||||
|
@ -6327,6 +6327,8 @@ static int igc_setup_tc(struct net_device *dev, enum tc_setup_type type,
|
|||||||
{
|
{
|
||||||
struct igc_adapter *adapter = netdev_priv(dev);
|
struct igc_adapter *adapter = netdev_priv(dev);
|
||||||
|
|
||||||
|
adapter->tc_setup_type = type;
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case TC_QUERY_CAPS:
|
case TC_QUERY_CAPS:
|
||||||
return igc_tc_query_caps(adapter, type_data);
|
return igc_tc_query_caps(adapter, type_data);
|
||||||
|
@ -249,6 +249,7 @@ skip_cbs:
|
|||||||
* Gate Control List (GCL) is running.
|
* Gate Control List (GCL) is running.
|
||||||
*/
|
*/
|
||||||
if ((rd32(IGC_BASET_H) || rd32(IGC_BASET_L)) &&
|
if ((rd32(IGC_BASET_H) || rd32(IGC_BASET_L)) &&
|
||||||
|
(adapter->tc_setup_type == TC_SETUP_QDISC_TAPRIO) &&
|
||||||
tsn_mode_reconfig)
|
tsn_mode_reconfig)
|
||||||
adapter->qbv_config_change_errors++;
|
adapter->qbv_config_change_errors++;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user