From: John Fastabend <john.fastabend@gmail.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [net-next] igb: add function to set I210 transmit mode
Date: Sat, 13 Aug 2016 12:01:12 -0700 [thread overview]
Message-ID: <57AF6E78.6030800@gmail.com> (raw)
In-Reply-To: <CAKgT0UeOmzDaLm0-yuvEjzYoN5g8=ouBv+8rpOmx7MgkWRfA+A@mail.gmail.com>
On 16-08-13 08:27 AM, Alexander Duyck wrote:
> On Tue, Aug 9, 2016 at 11:48 PM, Gangfeng <gangfeng.huang@ni.com> wrote:
>> From: Gangfeng Huang <gangfeng.huang@ni.com>
>>
>> I210 supports two transmit modes, legacy and Qav. The transmit mode is
>> configured in TQAVCTRL.QavMode register. Before this patch igb driver
>> only support legacy mode. This patch makes it possible to configure the
>> transmit mode.
>>
>> Example:
>> Get the transmit mode:
>> $ echo /sys/class/net/eth0/qav_mode
>> 0
>> Set transmit mode to qav mode
>> $ echo 1 > /sys/class/net/eth0/qav_mode
>>
>> Tested:
>> Setting /sys/class/net/eth0/qav_mode to Qav mode,
>> 1) Switch back and forth between Qav mode and legacy mode
>> 2) Send/recv packets in both mode.
>>
>> Signed-off-by: Gangfeng Huang <gangfeng.huang@ni.com>
>
> I really don' think this patch is going to work. If you are going to
> implement something like this and have a hope to get it accepted into
> the Linux kernel you need to come up with a solution that will work
> fore more than this one device. We don't want the drivers having to
> carry around their own sysfs controls for things that really are not
> proprietary to the device. There needs to be a generic kernel
> interface for this. The fact is something like QAV more than likely
> exists on other devices as well so it may be worth while to look into
> seeing if you could come up with some way of interfacing this with
> either ethtool ,iproute2, or maybe even the DCB/LLDP utilities since
> this is essentially splitting the Tx into two separate traffic
> classes.
>
> Also for these kind of patches it would be best to include the netdev
> mailing list. That way it can be reviewed by a wider audience and you
> are much more likely to get this accepted upstream rather than have it
> rejected when Jeff Kirsher attempts to submit it.
>
Take a look at ./net/sched/sch_mqprio.c and the ndo op setup_tc.
Multiple folks have been talking about adding support for this and
I think a lot of the bits you need might be there.
.John
WARNING: multiple messages have this Message-ID (diff)
From: John Fastabend <john.fastabend@gmail.com>
To: Alexander Duyck <alexander.duyck@gmail.com>,
Gangfeng <gangfeng.huang@ni.com>, Netdev <netdev@vger.kernel.org>
Cc: intel-wired-lan <intel-wired-lan@lists.osuosl.org>
Subject: Re: [Intel-wired-lan] [net-next] igb: add function to set I210 transmit mode
Date: Sat, 13 Aug 2016 12:01:12 -0700 [thread overview]
Message-ID: <57AF6E78.6030800@gmail.com> (raw)
In-Reply-To: <CAKgT0UeOmzDaLm0-yuvEjzYoN5g8=ouBv+8rpOmx7MgkWRfA+A@mail.gmail.com>
On 16-08-13 08:27 AM, Alexander Duyck wrote:
> On Tue, Aug 9, 2016 at 11:48 PM, Gangfeng <gangfeng.huang@ni.com> wrote:
>> From: Gangfeng Huang <gangfeng.huang@ni.com>
>>
>> I210 supports two transmit modes, legacy and Qav. The transmit mode is
>> configured in TQAVCTRL.QavMode register. Before this patch igb driver
>> only support legacy mode. This patch makes it possible to configure the
>> transmit mode.
>>
>> Example:
>> Get the transmit mode:
>> $ echo /sys/class/net/eth0/qav_mode
>> 0
>> Set transmit mode to qav mode
>> $ echo 1 > /sys/class/net/eth0/qav_mode
>>
>> Tested:
>> Setting /sys/class/net/eth0/qav_mode to Qav mode,
>> 1) Switch back and forth between Qav mode and legacy mode
>> 2) Send/recv packets in both mode.
>>
>> Signed-off-by: Gangfeng Huang <gangfeng.huang@ni.com>
>
> I really don' think this patch is going to work. If you are going to
> implement something like this and have a hope to get it accepted into
> the Linux kernel you need to come up with a solution that will work
> fore more than this one device. We don't want the drivers having to
> carry around their own sysfs controls for things that really are not
> proprietary to the device. There needs to be a generic kernel
> interface for this. The fact is something like QAV more than likely
> exists on other devices as well so it may be worth while to look into
> seeing if you could come up with some way of interfacing this with
> either ethtool ,iproute2, or maybe even the DCB/LLDP utilities since
> this is essentially splitting the Tx into two separate traffic
> classes.
>
> Also for these kind of patches it would be best to include the netdev
> mailing list. That way it can be reviewed by a wider audience and you
> are much more likely to get this accepted upstream rather than have it
> rejected when Jeff Kirsher attempts to submit it.
>
Take a look at ./net/sched/sch_mqprio.c and the ndo op setup_tc.
Multiple folks have been talking about adding support for this and
I think a lot of the bits you need might be there.
.John
next prev parent reply other threads:[~2016-08-13 19:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-10 6:48 [Intel-wired-lan] [net-next] I210 qav mode support Gangfeng
2016-08-10 6:48 ` [Intel-wired-lan] [net-next] igb: add function to set I210 transmit mode Gangfeng
2016-08-13 2:07 ` Brown, Aaron F
2016-08-13 15:27 ` Alexander Duyck
2016-08-13 15:27 ` Alexander Duyck
2016-08-13 16:11 ` Richard Cochran
2016-08-13 16:11 ` Richard Cochran
2016-08-13 19:03 ` John Fastabend
2016-08-13 19:03 ` John Fastabend
2016-08-13 19:01 ` John Fastabend [this message]
2016-08-13 19:01 ` John Fastabend
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=57AF6E78.6030800@gmail.com \
--to=john.fastabend@gmail.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.