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] [thread-next>] [day] [month] [year] [list]
Message-ID: <BANLkTinRqC7=jg6OV12UFpG0p1TKiD72-g@mail.gmail.com>
Date:	Fri, 13 May 2011 10:07:47 +0200
From:	Michał Mirosław <mirqus@...il.com>
To:	frank.blaschka@...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

2011/5/13  <frank.blaschka@...ibm.com>:
> 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 +1478,34 @@ static int qeth_l3_start_ipa_checksum(st
>
>        QETH_CARD_TEXT(card, 3, "strtcsum");
>
> -       if (card->options.checksum_type == NO_CHECKSUMMING) {
> -               dev_info(&card->gdev->dev,
> -                       "Using no checksumming on %s.\n",
> -                       QETH_CARD_IFNAME(card));
> -               return 0;
> -       }
> -       if (card->options.checksum_type == SW_CHECKSUMMING) {
> -               dev_info(&card->gdev->dev,
> -                       "Using SW checksumming on %s.\n",
> -                       QETH_CARD_IFNAME(card));
> -               return 0;
> -       }
> -       if (!qeth_is_supported(card, IPA_INBOUND_CHECKSUM)) {
> -               dev_info(&card->gdev->dev,
> +       if (card->dev->features & NETIF_F_RXCSUM) {
> +               /* hw may have changed during offline or recovery */
> +               if (!qeth_is_supported(card, IPA_INBOUND_CHECKSUM)) {
> +                       dev_info(&card->gdev->dev,
>                        "Inbound HW Checksumming not "
>                        "supported on %s,\ncontinuing "
>                        "using Inbound SW Checksumming\n",
>                        QETH_CARD_IFNAME(card));
> -               card->options.checksum_type = SW_CHECKSUMMING;
> -               return 0;
> -       }
> -       rc = qeth_l3_send_checksum_command(card);
> -       if (!rc)
> -               dev_info(&card->gdev->dev,
> +                       goto update_feature;
> +               }
> +
> +               rc = qeth_l3_send_checksum_command(card);
> +               if (!rc)
> +                       dev_info(&card->gdev->dev,
>                        "HW Checksumming (inbound) enabled\n");
> +               else
> +                       goto update_feature;
> +       } else
> +               dev_info(&card->gdev->dev,
> +                       "Using SW checksumming on %s.\n",
> +                       QETH_CARD_IFNAME(card));
> +       return 0;
>
> +update_feature:
> +       rtnl_lock();
> +       card->dev->features &= ~NETIF_F_RXCSUM;
> +       netdev_update_features(card->dev);
> +       rtnl_unlock();
>        return rc;
>  }

This will retry starting the RX checksumming via set_features(). Is
that the intention? If not, then just use something like my example in
qeth_l3_start_ipa_checksum().

Best Regards,
Michał Mirosław

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ