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

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

 



> From: Frank Blaschka <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.
[...]
> @@ -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;
> + Â Â Â Â Â Â Â }

Should be NETIF_F_RXCSUM probably.

Don't modify hw_features. Limit currently available features in
ndo_fix_features callback instead when checksumming is (temporarily)
unavailable.

[...]
> Â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.

> Âstatic const struct ethtool_ops qeth_l3_ethtool_ops = {
> @@ -3342,6 +3326,12 @@ static int qeth_l3_setup_netdev(struct q
> Â Â Â Â Â Â Â Â Â Â Â Âif (!(card->info.unique_id & UNIQUE_ID_NOT_BY_CARD))
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Âcard->dev->dev_id = card->info.unique_id &
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 0xffff;
> + Â Â Â Â Â Â Â Â Â Â Â if (!card->info.guestlan) {
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â card->dev->hw_features = NETIF_F_SG |
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â NETIF_F_RXCSUM | NETIF_F_IP_CSUM |
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â NETIF_F_TSO;
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â card->dev->features = NETIF_F_RXCSUM;
> + Â Â Â Â Â Â Â Â Â Â Â }

All features except RXCSUM will be disabled by default. Is that the intent here?

Best Regards,
MichaÅ MirosÅaw
ÿô.nlj·Ÿ®‰­†+%ŠË±é¥Šwÿº{.nlj·¥Š{±þÍÓ§¶›¡Ü}©ž²ÆzÚj:+v‰¨þø®w¥þŠàÞ¨è&¢)ß«a¶Úÿûz¹ÞúŽŠÝjÿŠwèf



[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