* [Intel-wired-lan] [PATCH v1] igc: Add checking for basetime less than zero
@ 2022-11-04 12:00 Muhammad Husaini Zulkifli
2022-11-13 7:36 ` naamax.meir
0 siblings, 1 reply; 2+ messages in thread
From: Muhammad Husaini Zulkifli @ 2022-11-04 12:00 UTC (permalink / raw)
To: intel-wired-lan; +Cc: muhammad.husaini.zulkifli
Using the tc qdisc command, the user can set basetime to any value.
Checking should be done on the driver's side to prevent registering
basetime values that are less than zero.
Signed-off-by: Muhammad Husaini Zulkifli <muhammad.husaini.zulkifli@intel.com>
---
drivers/net/ethernet/intel/igc/igc_main.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index 4f98e0a5ccd38..6301757980903 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -5928,6 +5928,9 @@ static int igc_save_qbv_schedule(struct igc_adapter *adapter,
if (!qopt->enable)
return igc_tsn_clear_schedule(adapter);
+ if (qopt->base_time < 0)
+ return -ERANGE;
+
if (adapter->base_time)
return -EALREADY;
--
2.17.1
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Intel-wired-lan] [PATCH v1] igc: Add checking for basetime less than zero
2022-11-04 12:00 [Intel-wired-lan] [PATCH v1] igc: Add checking for basetime less than zero Muhammad Husaini Zulkifli
@ 2022-11-13 7:36 ` naamax.meir
0 siblings, 0 replies; 2+ messages in thread
From: naamax.meir @ 2022-11-13 7:36 UTC (permalink / raw)
To: Muhammad Husaini Zulkifli, intel-wired-lan
On 11/4/2022 14:00, Muhammad Husaini Zulkifli wrote:
> Using the tc qdisc command, the user can set basetime to any value.
> Checking should be done on the driver's side to prevent registering
> basetime values that are less than zero.
>
> Signed-off-by: Muhammad Husaini Zulkifli <muhammad.husaini.zulkifli@intel.com>
> ---
> drivers/net/ethernet/intel/igc/igc_main.c | 3 +++
> 1 file changed, 3 insertions(+)
Tested-by: Naama Meir <naamax.meir@linux.intel.com>
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-11-13 7:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-04 12:00 [Intel-wired-lan] [PATCH v1] igc: Add checking for basetime less than zero Muhammad Husaini Zulkifli
2022-11-13 7:36 ` naamax.meir
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox