Skip to content

Commit 8046063

Browse files
koaloanguy11
authored andcommitted
igc: Rename qbv_enable to taprio_offload_enable
In the current implementation the flags adapter->qbv_enable and IGC_FLAG_TSN_QBV_ENABLED have a similar name, but do not have the same meaning. The first one is used only to indicate taprio offload (i.e. when igc_save_qbv_schedule was called), while the second one corresponds to the Qbv mode of the hardware. However, the second one is also used to support the TX launchtime feature, i.e. ETF qdisc offload. This leads to situations where adapter->qbv_enable is false, but the flag IGC_FLAG_TSN_QBV_ENABLED is set. This is prone to confusion. The rename should reduce this confusion. Since it is a pure rename, it has no impact on functionality. Fixes: e17090e ("igc: allow BaseTime 0 enrollment for Qbv") Signed-off-by: Florian Kauer <[email protected]> Reviewed-by: Kurt Kanzenbach <[email protected]> Tested-by: Naama Meir <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
1 parent 9d0aba9 commit 8046063

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

drivers/net/ethernet/intel/igc/igc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ struct igc_adapter {
191191
int tc_setup_type;
192192
ktime_t base_time;
193193
ktime_t cycle_time;
194-
bool qbv_enable;
194+
bool taprio_offload_enable;
195195
u32 qbv_config_change_errors;
196196
bool qbv_transition;
197197
unsigned int qbv_count;

drivers/net/ethernet/intel/igc/igc_main.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6126,16 +6126,16 @@ static int igc_save_qbv_schedule(struct igc_adapter *adapter,
61266126

61276127
switch (qopt->cmd) {
61286128
case TAPRIO_CMD_REPLACE:
6129-
adapter->qbv_enable = true;
6129+
adapter->taprio_offload_enable = true;
61306130
break;
61316131
case TAPRIO_CMD_DESTROY:
6132-
adapter->qbv_enable = false;
6132+
adapter->taprio_offload_enable = false;
61336133
break;
61346134
default:
61356135
return -EOPNOTSUPP;
61366136
}
61376137

6138-
if (!adapter->qbv_enable)
6138+
if (!adapter->taprio_offload_enable)
61396139
return igc_tsn_clear_schedule(adapter);
61406140

61416141
if (qopt->base_time < 0)

drivers/net/ethernet/intel/igc/igc_tsn.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ static unsigned int igc_tsn_new_flags(struct igc_adapter *adapter)
3737
{
3838
unsigned int new_flags = adapter->flags & ~IGC_FLAG_TSN_ANY_ENABLED;
3939

40-
if (adapter->qbv_enable)
40+
if (adapter->taprio_offload_enable)
4141
new_flags |= IGC_FLAG_TSN_QBV_ENABLED;
4242

4343
if (is_any_launchtime(adapter))

0 commit comments

Comments
 (0)