netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* NETDEV_FEAT_CHANGE and ethtool (question)
@ 2013-05-12  9:21 Andy Johnson
  2013-05-12 19:18 ` Michał Mirosław
  0 siblings, 1 reply; 3+ messages in thread
From: Andy Johnson @ 2013-05-12  9:21 UTC (permalink / raw)
  To: netdev

Hello,

The only thing that netdev_features_change() does is send
NETDEV_FEAT_CHANGE event
notification.

NETDEV_FEAT_CHANGE event is sent in the core from
netdev_update_features() if __netdev_update_features returned 1, and
this event is *always* sent from netdev_change_features().

ethtool calls __netdev_update_features() when chaning features. So
changing GSO offload features for example, by
"ethtool -K gso off" will *not* trigger NETDEV_FEAT_CHANGE event notification.
(assuming that ndo_fix_features/ndo_set_features callbacks of the
driver, if exist, will not
trigger such noticiation call).

My question is: why changing features by ethtool does not trigger
sending NETDEV_FEAT_CHANGE event?


Best,
Andy

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: NETDEV_FEAT_CHANGE and ethtool (question)
  2013-05-12  9:21 NETDEV_FEAT_CHANGE and ethtool (question) Andy Johnson
@ 2013-05-12 19:18 ` Michał Mirosław
  2013-05-12 20:49   ` Andy Johnson
  0 siblings, 1 reply; 3+ messages in thread
From: Michał Mirosław @ 2013-05-12 19:18 UTC (permalink / raw)
  To: Andy Johnson; +Cc: netdev

2013/5/12 Andy Johnson <johnsonzjo@gmail.com>:
> Hello,
>
> The only thing that netdev_features_change() does is send
> NETDEV_FEAT_CHANGE event
> notification.
>
> NETDEV_FEAT_CHANGE event is sent in the core from
> netdev_update_features() if __netdev_update_features returned 1, and
> this event is *always* sent from netdev_change_features().
>
> ethtool calls __netdev_update_features() when chaning features. So
> changing GSO offload features for example, by
> "ethtool -K gso off" will *not* trigger NETDEV_FEAT_CHANGE event notification.
> (assuming that ndo_fix_features/ndo_set_features callbacks of the
> driver, if exist, will not
> trigger such noticiation call).
>
> My question is: why changing features by ethtool does not trigger
> sending NETDEV_FEAT_CHANGE event?

You didn't verify this assumption. See dev_ethtool()'s last check.

Best Regards,
Michał Mirosław

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: NETDEV_FEAT_CHANGE and ethtool (question)
  2013-05-12 19:18 ` Michał Mirosław
@ 2013-05-12 20:49   ` Andy Johnson
  0 siblings, 0 replies; 3+ messages in thread
From: Andy Johnson @ 2013-05-12 20:49 UTC (permalink / raw)
  To: Michał Mirosław; +Cc: netdev

Hello,
Thanks!

You are right.

sorry for missing this:
int dev_ethtool()
{
...
if (old_features != dev->features)
netdev_features_change(dev);
}

Best,
Andy

On Sun, May 12, 2013 at 10:18 PM, Michał Mirosław <mirqus@gmail.com> wrote:
> 2013/5/12 Andy Johnson <johnsonzjo@gmail.com>:
>> Hello,
>>
>> The only thing that netdev_features_change() does is send
>> NETDEV_FEAT_CHANGE event
>> notification.
>>
>> NETDEV_FEAT_CHANGE event is sent in the core from
>> netdev_update_features() if __netdev_update_features returned 1, and
>> this event is *always* sent from netdev_change_features().
>>
>> ethtool calls __netdev_update_features() when chaning features. So
>> changing GSO offload features for example, by
>> "ethtool -K gso off" will *not* trigger NETDEV_FEAT_CHANGE event notification.
>> (assuming that ndo_fix_features/ndo_set_features callbacks of the
>> driver, if exist, will not
>> trigger such noticiation call).
>>
>> My question is: why changing features by ethtool does not trigger
>> sending NETDEV_FEAT_CHANGE event?
>
> You didn't verify this assumption. See dev_ethtool()'s last check.
>
> Best Regards,
> Michał Mirosław

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-05-12 20:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-12  9:21 NETDEV_FEAT_CHANGE and ethtool (question) Andy Johnson
2013-05-12 19:18 ` Michał Mirosław
2013-05-12 20:49   ` Andy Johnson

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).