lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <BANLkTikSAt0G5gyMDaPrVKr=b4p0DScxoA@mail.gmail.com>
Date:	Tue, 10 May 2011 16:33:26 +0200
From:	Michał Mirosław <mirqus@...il.com>
To:	Frank Blaschka <blaschka@...ux.vnet.ibm.com>
Cc:	davem@...emloft.net, netdev@...r.kernel.org,
	linux-s390@...r.kernel.org
Subject: Re: [patch 1/9] [PATCH] qeth: convert to hw_features part 2

W dniu 10 maja 2011 16:09 użytkownik Frank Blaschka
<blaschka@...ux.vnet.ibm.com> napisał:
> On Tue, May 10, 2011 at 03:19:27PM +0200, Michał Mirosław wrote:
>> From: Frank Blaschka <frank.blaschka@...ibm.com>
>> > 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.
>> [...]
>> > @@ -1482,32 +1476,28 @@ static int qeth_l3_start_ipa_checksum(st
>> [...]
>> > -       rc = qeth_l3_send_checksum_command(card);
>> > -       if (!rc)
>> > -               dev_info(&card->gdev->dev,
>> > +                       card->dev->hw_features &= ~IPA_INBOUND_CHECKSUM;
>> > +                       card->dev->features &= ~IPA_INBOUND_CHECKSUM;
>> > +                       return 0;
>> > +               }
[...]
>> Don't modify hw_features. Limit currently available features in
>> ndo_fix_features callback instead when checksumming is (temporarily)
>> unavailable.
>>
> We have a recovery operation in our driver. What can we do in case this
> recovery detects the checksumming is not available anymore (during runtime
> of the device). ndo_fix_features callback does not come into play at this time.
> How can we solve this?

Just call netdev_update_features() after recovery.

>> >  static int qeth_l3_set_features(struct net_device *dev, u32 features)
>> >  {
>> > -       enum qeth_checksum_types csum_type;
>> >        struct qeth_card *card = dev->ml_priv;
>> >        u32 changed = dev->features ^ features;
>> > +       int on;
>> >
>> >        if (!(changed & NETIF_F_RXCSUM))
>> >                return 0;
>> >
>> >        if (features & NETIF_F_RXCSUM)
>> > -               csum_type = HW_CHECKSUMMING;
>> > +               on = 1;
>> >        else
>> > -               csum_type = SW_CHECKSUMMING;
>> > +               on = 0;
>> >
>> >        dev->features = features ^ NETIF_F_RXCSUM;
>> > -       return qeth_l3_set_rx_csum(card, csum_type);
>> > +       return qeth_l3_set_rx_csum(card, on);
>> >  }
>>
>> Since you removed dev->features update from qeth_l3_set_rx_csum(), you
>> should also modify this code to match. On exit from ndo_fix_features,
>> dev->features should reflect what is currently set, even if part of
>> the request failed.
> Do you mean qeth_l3_set_rx_csum should set dev->features dependent of
> the result of the checksum hardware operation?

Yes. If it doesn't, then network core might pass packets needing
hardware checksumming for a device with TX checksumming disabled.

Best Regards,
Michał Mirosław
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ