Re: [PATCH] select appropriate skb size in tcp_sendmsg when TSO is used

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 






"David S. Miller" <davem@davemloft.net> wrote on 21.10.2004 01:35:10:
> Indeed.  I'm going to enforce this at device registration time
> as in the patch at the end of this email.
>
> BTW, we allow mucking of all of these SG, TSO, CSUM settings
> via ethtool yet the "X needs Y" rules are not enforced.  I
> can't think of an easy way to do this without touching a lot
> of drivers.  Perhaps something like:
>
> int ethtool_feature_change(struct net_device *dev, u32 flag_bit, int
on_off);

This sounds good. So with this ethtool_feature_change function
we had one place where all the dependency rules would be
enforced. As a result, all the drivers would not have to
worry about these rules -> no multiple points of error.
Yet, if there is a driver that explicitly has to do something
that's against the rules, it could simply omit the call
to feature_change and override the common rules.

> It just occured to me that instead of manually clearing
> dev->feature bits we should invoke the appropriate ethtool
> op to accomplish that just in case the device needs to do
> something implementation specific when disabling said features.
> This implies that ethtool_feature_change() should be invoked
> without any device locks set to prevent deadlocks.

Yes, sound valid, too. We sometimes have to do something on
the hardware. So it would be good to be notified when
feature_change clears or sets a specific flag.

Regards,
Thomas.

-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux