From: Vinicius Costa Gomes <vinicius.gomes@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [PATCH net-next v1 1/9] ethtool: Add support for configuring frame preemption
Date: Mon, 07 Dec 2020 14:11:48 -0800 [thread overview]
Message-ID: <87eek11d23.fsf@intel.com> (raw)
In-Reply-To: <20201205094325.790b187f@kicinski-fedora-pc1c0hjn.DHCP.thefacebook.com>
Jakub Kicinski <kuba@kernel.org> writes:
>> diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
>> index e3da25b51ae4..16d6ee29a6ac 100644
>> --- a/include/linux/ethtool.h
>> +++ b/include/linux/ethtool.h
>> @@ -263,6 +263,19 @@ struct ethtool_pause_stats {
>> u64 rx_pause_frames;
>> };
>>
>> +/**
>> + * struct ethtool_fp - Frame Preemption information
>> + *
>> + * @enabled: Enable frame preemption.
>> + *
>
> The empty line between members seems unnecessary.
Will fix.
>
>> + * @min_frag_size_mult: Minimum size for all non-final fragment size,
>> + * expressed in terms of X in '(1 + X)*64 + 4'
>
> Is this way of expressing the min frag size from the standard?
>
The standard has this: "A 2-bit integer value indicating, in units of 64
octets, the minimum number of octets over 64 octets required in
non-final fragments by the receiver" from IEEE 802.3br-2016, Table
79-7a.
>> + */
>> +struct ethtool_fp {
>> + u8 enabled;
>> + u8 min_frag_size_mult;
>> +};
>
>> + int (*get_preempt)(struct net_device *,
>> + struct ethtool_fp *);
>> + int (*set_preempt)(struct net_device *,
>> + struct ethtool_fp *);
>
> Since this is a new op we should probably pass extack to the drivers?
Yes. Will fix.
>
>> extern const struct nla_policy ethnl_header_policy[ETHTOOL_A_HEADER_FLAGS + 1];
>> extern const struct nla_policy ethnl_header_policy_stats[ETHTOOL_A_HEADER_FLAGS + 1];
>> @@ -375,6 +376,8 @@ extern const struct nla_policy ethnl_tsinfo_get_policy[ETHTOOL_A_TSINFO_HEADER +
>> extern const struct nla_policy ethnl_cable_test_act_policy[ETHTOOL_A_CABLE_TEST_HEADER + 1];
>> extern const struct nla_policy ethnl_cable_test_tdr_act_policy[ETHTOOL_A_CABLE_TEST_TDR_CFG + 1];
>> extern const struct nla_policy ethnl_tunnel_info_get_policy[ETHTOOL_A_TUNNEL_INFO_HEADER + 1];
>> +extern const struct nla_policy ethnl_preempt_get_policy[ETHTOOL_A_PREEMPT_MAX + 1];
>> +extern const struct nla_policy ethnl_preempt_set_policy[ETHTOOL_A_PREEMPT_MAX + 1];
>
> Let's make the size
>
> ETHTOOL_A_PREEMPT_MIN_FRAG_SIZE_MULT + 1
>
> for set, and
>
> ETHTOOL_A_PREEMPT_HEADER + 1
>
> for get, like the other tables
>
>> +const struct nla_policy
>> +ethnl_preempt_get_policy[ETHTOOL_A_PREEMPT_MAX + 1] = {
>> + [ETHTOOL_A_PREEMPT_UNSPEC] = { .type = NLA_REJECT },
>
> Unnecessary, NLA_REJECT is 0.
>
>> + [ETHTOOL_A_PREEMPT_HEADER] = { .type = NLA_NESTED },
>
> Please specify nested policy
>
>> + [ETHTOOL_A_PREEMPT_ENABLED] = { .type = NLA_REJECT },
>> + [ETHTOOL_A_PREEMPT_MIN_FRAG_SIZE_MULT] = { .type = NLA_REJECT },
>
> Unnecessary
>
>> +const struct nla_policy
>> +ethnl_preempt_set_policy[ETHTOOL_A_PREEMPT_MAX + 1] = {
>> + [ETHTOOL_A_PREEMPT_UNSPEC] = { .type = NLA_REJECT },
>> + [ETHTOOL_A_PREEMPT_HEADER] = { .type = NLA_NESTED },
>> + [ETHTOOL_A_PREEMPT_ENABLED] = { .type = NLA_U8 },
>
> Set the right netlink policy to check the value is <= 1.
>
>> + [ETHTOOL_A_PREEMPT_MIN_FRAG_SIZE_MULT] = { .type = NLA_U8 },
>> +};
Will fix these netlink validation issues.
Cheers,
--
Vinicius
WARNING: multiple messages have this Message-ID (diff)
From: Vinicius Costa Gomes <vinicius.gomes@intel.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, jhs@mojatatu.com,
xiyou.wangcong@gmail.com, jiri@resnulli.us, m-karicheri2@ti.com,
vladimir.oltean@nxp.com, Jose.Abreu@synopsys.com, po.liu@nxp.com,
intel-wired-lan@lists.osuosl.org, anthony.l.nguyen@intel.com
Subject: Re: [PATCH net-next v1 1/9] ethtool: Add support for configuring frame preemption
Date: Mon, 07 Dec 2020 14:11:48 -0800 [thread overview]
Message-ID: <87eek11d23.fsf@intel.com> (raw)
In-Reply-To: <20201205094325.790b187f@kicinski-fedora-pc1c0hjn.DHCP.thefacebook.com>
Jakub Kicinski <kuba@kernel.org> writes:
>> diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
>> index e3da25b51ae4..16d6ee29a6ac 100644
>> --- a/include/linux/ethtool.h
>> +++ b/include/linux/ethtool.h
>> @@ -263,6 +263,19 @@ struct ethtool_pause_stats {
>> u64 rx_pause_frames;
>> };
>>
>> +/**
>> + * struct ethtool_fp - Frame Preemption information
>> + *
>> + * @enabled: Enable frame preemption.
>> + *
>
> The empty line between members seems unnecessary.
Will fix.
>
>> + * @min_frag_size_mult: Minimum size for all non-final fragment size,
>> + * expressed in terms of X in '(1 + X)*64 + 4'
>
> Is this way of expressing the min frag size from the standard?
>
The standard has this: "A 2-bit integer value indicating, in units of 64
octets, the minimum number of octets over 64 octets required in
non-final fragments by the receiver" from IEEE 802.3br-2016, Table
79-7a.
>> + */
>> +struct ethtool_fp {
>> + u8 enabled;
>> + u8 min_frag_size_mult;
>> +};
>
>> + int (*get_preempt)(struct net_device *,
>> + struct ethtool_fp *);
>> + int (*set_preempt)(struct net_device *,
>> + struct ethtool_fp *);
>
> Since this is a new op we should probably pass extack to the drivers?
Yes. Will fix.
>
>> extern const struct nla_policy ethnl_header_policy[ETHTOOL_A_HEADER_FLAGS + 1];
>> extern const struct nla_policy ethnl_header_policy_stats[ETHTOOL_A_HEADER_FLAGS + 1];
>> @@ -375,6 +376,8 @@ extern const struct nla_policy ethnl_tsinfo_get_policy[ETHTOOL_A_TSINFO_HEADER +
>> extern const struct nla_policy ethnl_cable_test_act_policy[ETHTOOL_A_CABLE_TEST_HEADER + 1];
>> extern const struct nla_policy ethnl_cable_test_tdr_act_policy[ETHTOOL_A_CABLE_TEST_TDR_CFG + 1];
>> extern const struct nla_policy ethnl_tunnel_info_get_policy[ETHTOOL_A_TUNNEL_INFO_HEADER + 1];
>> +extern const struct nla_policy ethnl_preempt_get_policy[ETHTOOL_A_PREEMPT_MAX + 1];
>> +extern const struct nla_policy ethnl_preempt_set_policy[ETHTOOL_A_PREEMPT_MAX + 1];
>
> Let's make the size
>
> ETHTOOL_A_PREEMPT_MIN_FRAG_SIZE_MULT + 1
>
> for set, and
>
> ETHTOOL_A_PREEMPT_HEADER + 1
>
> for get, like the other tables
>
>> +const struct nla_policy
>> +ethnl_preempt_get_policy[ETHTOOL_A_PREEMPT_MAX + 1] = {
>> + [ETHTOOL_A_PREEMPT_UNSPEC] = { .type = NLA_REJECT },
>
> Unnecessary, NLA_REJECT is 0.
>
>> + [ETHTOOL_A_PREEMPT_HEADER] = { .type = NLA_NESTED },
>
> Please specify nested policy
>
>> + [ETHTOOL_A_PREEMPT_ENABLED] = { .type = NLA_REJECT },
>> + [ETHTOOL_A_PREEMPT_MIN_FRAG_SIZE_MULT] = { .type = NLA_REJECT },
>
> Unnecessary
>
>> +const struct nla_policy
>> +ethnl_preempt_set_policy[ETHTOOL_A_PREEMPT_MAX + 1] = {
>> + [ETHTOOL_A_PREEMPT_UNSPEC] = { .type = NLA_REJECT },
>> + [ETHTOOL_A_PREEMPT_HEADER] = { .type = NLA_NESTED },
>> + [ETHTOOL_A_PREEMPT_ENABLED] = { .type = NLA_U8 },
>
> Set the right netlink policy to check the value is <= 1.
>
>> + [ETHTOOL_A_PREEMPT_MIN_FRAG_SIZE_MULT] = { .type = NLA_U8 },
>> +};
Will fix these netlink validation issues.
Cheers,
--
Vinicius
next prev parent reply other threads:[~2020-12-07 22:11 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-02 4:53 [Intel-wired-lan] [PATCH net-next v1 0/9] ethtool: Add support for frame preemption Vinicius Costa Gomes
2020-12-02 4:53 ` Vinicius Costa Gomes
2020-12-02 4:53 ` [Intel-wired-lan] [PATCH net-next v1 1/9] ethtool: Add support for configuring " Vinicius Costa Gomes
2020-12-02 4:53 ` Vinicius Costa Gomes
2020-12-03 1:53 ` [Intel-wired-lan] " Jakub Kicinski
2020-12-03 1:53 ` Jakub Kicinski
2020-12-05 17:43 ` [Intel-wired-lan] " Jakub Kicinski
2020-12-05 17:43 ` Jakub Kicinski
2020-12-07 22:11 ` Vinicius Costa Gomes [this message]
2020-12-07 22:11 ` Vinicius Costa Gomes
2020-12-07 23:21 ` [Intel-wired-lan] " Jakub Kicinski
2020-12-07 23:21 ` Jakub Kicinski
2020-12-08 0:24 ` [Intel-wired-lan] " Vinicius Costa Gomes
2020-12-08 0:24 ` Vinicius Costa Gomes
2020-12-08 0:27 ` [Intel-wired-lan] " Vladimir Oltean
2020-12-08 0:27 ` Vladimir Oltean
2020-12-08 0:48 ` [Intel-wired-lan] " Jakub Kicinski
2020-12-08 0:48 ` Jakub Kicinski
2020-12-08 6:22 ` [Intel-wired-lan] " Michal Kubecek
2020-12-08 6:22 ` Michal Kubecek
2020-12-02 4:53 ` [Intel-wired-lan] [PATCH net-next v1 2/9] taprio: Add support for frame preemption offload Vinicius Costa Gomes
2020-12-02 4:53 ` Vinicius Costa Gomes
2020-12-02 4:53 ` [Intel-wired-lan] [PATCH net-next v1 3/9] igc: Set the RX packet buffer size for TSN mode Vinicius Costa Gomes
2020-12-02 4:53 ` Vinicius Costa Gomes
2020-12-02 4:53 ` [Intel-wired-lan] [PATCH net-next v1 4/9] igc: Only dump registers if configured to dump HW information Vinicius Costa Gomes
2020-12-02 4:53 ` Vinicius Costa Gomes
2020-12-02 4:53 ` [Intel-wired-lan] [PATCH net-next v1 5/9] igc: Avoid TX Hangs because long cycles Vinicius Costa Gomes
2020-12-02 4:53 ` Vinicius Costa Gomes
2020-12-02 4:53 ` [Intel-wired-lan] [PATCH net-next v1 6/9] igc: Add support for tuning frame preemption via ethtool Vinicius Costa Gomes
2020-12-02 4:53 ` Vinicius Costa Gomes
2020-12-05 18:00 ` [Intel-wired-lan] " Jakub Kicinski
2020-12-05 18:00 ` Jakub Kicinski
2020-12-07 22:15 ` [Intel-wired-lan] " Vinicius Costa Gomes
2020-12-07 22:15 ` Vinicius Costa Gomes
2020-12-07 23:22 ` [Intel-wired-lan] " Jakub Kicinski
2020-12-07 23:22 ` Jakub Kicinski
2020-12-02 4:53 ` [Intel-wired-lan] [PATCH net-next v1 7/9] igc: Add support for Frame Preemption offload Vinicius Costa Gomes
2020-12-02 4:53 ` Vinicius Costa Gomes
2020-12-02 4:53 ` [Intel-wired-lan] [PATCH net-next v1 8/9] igc: Add support for exposing frame preemption stats registers Vinicius Costa Gomes
2020-12-02 4:53 ` Vinicius Costa Gomes
2020-12-05 17:59 ` [Intel-wired-lan] " Jakub Kicinski
2020-12-05 17:59 ` Jakub Kicinski
2020-12-07 22:29 ` [Intel-wired-lan] " Vinicius Costa Gomes
2020-12-07 22:29 ` Vinicius Costa Gomes
2020-12-02 4:53 ` [Intel-wired-lan] [PATCH net-next v1 9/9] igc: Separate TSN configurations that can be updated Vinicius Costa Gomes
2020-12-02 4:53 ` Vinicius Costa Gomes
2020-12-05 17:50 ` [Intel-wired-lan] [PATCH net-next v1 0/9] ethtool: Add support for frame preemption Jakub Kicinski
2020-12-05 17:50 ` Jakub Kicinski
2020-12-07 22:49 ` [Intel-wired-lan] " Vinicius Costa Gomes
2020-12-07 22:49 ` Vinicius Costa Gomes
2020-12-07 23:12 ` [Intel-wired-lan] " Vladimir Oltean
2020-12-07 23:12 ` Vladimir Oltean
2020-12-08 0:34 ` [Intel-wired-lan] " Vinicius Costa Gomes
2020-12-08 0:34 ` Vinicius Costa Gomes
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=87eek11d23.fsf@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.