From: Vinicius Costa Gomes <vinicius.gomes@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [next-queue PATCH v2 2/2] igc: Add support for ETF offloading
Date: Wed, 12 Feb 2020 16:23:03 -0800 [thread overview]
Message-ID: <87a75nwd20.fsf@linux.intel.com> (raw)
In-Reply-To: <158136684850.75536.15541483288653337386@1.0.0.127.in-addr.arpa>
Andre Guedes <andre.guedes@linux.intel.com> writes:
> Hi Vinicius,
>
> Quoting Vinicius Costa Gomes (2020-02-07 10:24:43)
> ...
>> --- a/drivers/net/ethernet/intel/igc/igc_main.c
>> +++ b/drivers/net/ethernet/intel/igc/igc_main.c
> ...
>> @@ -4497,6 +4516,32 @@ static int igc_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd)
>> }
>> }
>>
>> +static int igc_save_launchtime_params(struct igc_adapter *adapter, int queue,
>> + bool enable)
>> +{
>> + struct igc_ring *ring;
>> + int i;
>> +
>> + if (queue < 0 || queue > adapter->num_tx_queues)
>> + return -EINVAL;
>
> I believe we have an off-by-one bug here. Shouldn't it be queue >=
> adapter->num_tx_queues instead?
Will fix this. (just a note that this off-by-one cannot be exploited by
luck almost, mqprio/taprio do the check correctly on their side)
>
>> @@ -4600,6 +4661,9 @@ static int igc_setup_tc(struct net_device *dev, enum tc_setup_type type,
>> case TC_SETUP_QDISC_TAPRIO:
>> return igc_tsn_enable_qbv_scheduling(adapter, type_data);
>>
>> + case TC_SETUP_QDISC_ETF:
>> + return igc_tsn_enable_launchtime(adapter, type_data);
>
> Consider the scenario where both TAPRIO and ETF offloads are disabled and we
> want to enable ETF offload. ETF depends on adapter->base_time is set to work
> properly, but I couldn't find where in this patch it is set. Could you please
> clarify that?
>
> Regards,
>
> Andre
--
Vinicius
prev parent reply other threads:[~2020-02-13 0:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-07 18:24 [Intel-wired-lan] [next-queue PATCH v2 0/2] igc: Add initial TSN qdiscs offloading Vinicius Costa Gomes
2020-02-07 18:24 ` [Intel-wired-lan] [next-queue PATCH v2 1/2] igc: Add support for taprio offloading Vinicius Costa Gomes
2020-02-10 20:33 ` Andre Guedes
2020-02-13 0:24 ` Vinicius Costa Gomes
2020-02-07 18:24 ` [Intel-wired-lan] [next-queue PATCH v2 2/2] igc: Add support for ETF offloading Vinicius Costa Gomes
2020-02-10 20:34 ` Andre Guedes
2020-02-11 1:13 ` Vinicius Costa Gomes
2020-02-11 18:16 ` Andre Guedes
2020-02-13 0:13 ` Vinicius Costa Gomes
2020-02-13 17:48 ` Andre Guedes
2020-02-13 0:23 ` Vinicius Costa Gomes [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a75nwd20.fsf@linux.intel.com \
--to=vinicius.gomes@intel.com \
--cc=intel-wired-lan@osuosl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).