Re: [patch 1/9] [PATCH] qeth: convert to hw_features part 2

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

 



On Thu, May 12, 2011 at 10:12:51AM +0200, MichaÅ MirosÅaw wrote:
> W dniu 12 maja 2011 09:21 uÅytkownik Frank Blaschka
> <blaschka@xxxxxxxxxxxxxxxxxx> napisaÅ:
> > On Thu, May 12, 2011 at 07:59:45AM +0200, MichaÅ MirosÅaw wrote:
> >> 2011/5/12 Â<frank.blaschka@xxxxxxxxxx>:
> >> > Set rx csum default to hw checksumming again.
> >> > Remove sysfs interface for rx csum (checksumming) and TSO (large_send).
> >> > With the new hw_features it does not work to keep the old sysfs
> >> > interface in parallel. Convert options.checksum_type to new hw_features.
> >> [...]
> >> > + Â Â Â Â Â Â Â /* hw may have changed during offline or recovery */
> >> > + Â Â Â Â Â Â Â if (!qeth_is_supported(card, IPA_INBOUND_CHECKSUM)) {
> >> [...]
> >>
> >> This check should go to ndo_fix_features callback. If it fails then
> >> just return features &~NETIF_F_RXCSUM from there ...
> >>
Ok so all I have to do to complete this is to remove
  card->dev->hw_features &= ~NETIF_F_RXCSUM;
from here (ndo_fix_feature has already the check)?

Since we might be in recovery it is smarter to keep the support check here so we
do not have to use try and error approach to see if capabilities have
changed. Do you aggree?

> >> > +update_feature:
> >> > + Â Â Â rtnl_lock();
> >> > + Â Â Â card->dev->hw_features &= ~NETIF_F_RXCSUM;
> >> > + Â Â Â card->dev->features &= ~NETIF_F_RXCSUM;
> >> > + Â Â Â netdev_update_features(card->dev);
> >> > + Â Â Â rtnl_unlock();
> >>
> >> ... and then this should be just:
> >> rtnl_lock();
> >> netdev_update_features(card->dev);
> >> rtnl_unlock();
> >>
> > This code is part of the recovery, assuming the recovery detects the hw
> > has lost it's rx csum capability I still don't understand how ndo_fix_features
> > come into play?
> 
> ndo_fix_features is always called before ndo_set_features to alter
> features that are to be enabled. So in this case, it should check if
> checksumming is available and remove NETIF_F_RXCSUM from the set if it
> isn't. The resulting set (after further cleanup by core code) is
> passed to ndo_set_features if the features had changed. hw_features
> only control what can be requested by user.
> 
> I assume that if the device can loose the checksumming capability
> during runtime, it can also regain it. Above solution will
> automatically reenable checksumming if its requested and the
> capability comes back.
> 
> Best Regards,
> MichaÅ MirosÅaw
> --
> To unsubscribe from this list: send the line "unsubscribe linux-s390" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-s390" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux