66e4c8d95008 ("net: warn if transport header was not set") added a check that triggers a warning in r8169, see [0]. The commit referenced in the Fixes tag refers to the change from which the patch applies cleanly, there's nothing wrong with this commit. It seems the actual issue (not bug, because the warning is harmless here) was introduced with bdfa4ed68187 ("r8169: use Giant Send"). [0] https://bugzilla.kernel.org/show_bug.cgi?id=216157
Unified · Split
| @@ -4190,7 +4190,6 @@ static void rtl8169_tso_csum_v1(struct sk_buff *skb, u32 *opts) · 4189 unmodified lines | ||
| 4190 | 4190 | static bool rtl8169_tso_csum_v2(struct rtl8169_private *tp, |
| 4191 | 4191 | struct sk_buff *skb, u32 *opts) |
| 4192 | 4192 | { |
| 4193 | − u32 transport_offset = (u32)skb_transport_offset(skb); | |
| 4194 | 4193 | struct skb_shared_info *shinfo = skb_shinfo(skb); |
| 4195 | 4194 | u32 mss = shinfo->gso_size; |
| 4196 | 4195 | |
| @@ -4207,7 +4206,7 @@ static bool rtl8169_tso_csum_v2(struct rtl8169_private *tp, · 10 unmodified lines | ||
| 4207 | 4206 | WARN_ON_ONCE(1); |
| 4208 | 4207 | } |
| 4209 | 4208 | |
| 4210 | − opts[0] |= transport_offset << GTTCPHO_SHIFT; | |
| 4209 | + opts[0] |= skb_transport_offset(skb) << GTTCPHO_SHIFT; | |
| 4211 | 4210 | opts[1] |= mss << TD1_MSS_SHIFT; |
| 4212 | 4211 | } else if (skb->ip_summed == CHECKSUM_PARTIAL) { |
| 4213 | 4212 | u8 ip_protocol; |
| @@ -4235,7 +4234,7 @@ static bool rtl8169_tso_csum_v2(struct rtl8169_private *tp, · 21 unmodified lines | ||
| 4235 | 4234 | else |
| 4236 | 4235 | WARN_ON_ONCE(1); |
| 4237 | 4236 | |
| 4238 | − opts[1] |= transport_offset << TCPHO_SHIFT; | |
| 4237 | + opts[1] |= skb_transport_offset(skb) << TCPHO_SHIFT; | |
| 4239 | 4238 | } else { |
| 4240 | 4239 | unsigned int padto = rtl_quirk_packet_padto(tp, skb); |
| 4241 | 4240 | |
| @@ -4402,14 +4401,13 @@ static netdev_features_t rtl8169_features_check(struct sk_buff *skb, · 160 unmodified lines | ||
| 4402 | 4401 | struct net_device *dev, |
| 4403 | 4402 | netdev_features_t features) |
| 4404 | 4403 | { |
| 4405 | − int transport_offset = skb_transport_offset(skb); | |
| 4406 | 4404 | struct rtl8169_private *tp = netdev_priv(dev); |
| 4407 | 4405 | |
| 4408 | 4406 | if (skb_is_gso(skb)) { |
| 4409 | 4407 | if (tp->mac_version == RTL_GIGA_MAC_VER_34) |
| 4410 | 4408 | features = rtl8168evl_fix_tso(skb, features); |
| 4411 | 4409 | |
| 4412 | − if (transport_offset > GTTCPHO_MAX && | |
| 4410 | + if (skb_transport_offset(skb) > GTTCPHO_MAX && | |
| 4413 | 4411 | rtl_chip_supports_csum_v2(tp)) |
| 4414 | 4412 | features &= ~NETIF_F_ALL_TSO; |
| 4415 | 4413 | } else if (skb->ip_summed == CHECKSUM_PARTIAL) { |
| @@ -4420,7 +4418,7 @@ static netdev_features_t rtl8169_features_check(struct sk_buff *skb, · 4 unmodified lines | ||
| 4420 | 4418 | if (rtl_quirk_packet_padto(tp, skb)) |
| 4421 | 4419 | features &= ~NETIF_F_CSUM_MASK; |
| 4422 | 4420 | |
| 4423 | − if (transport_offset > TCPHO_MAX && | |
| 4421 | + if (skb_transport_offset(skb) > TCPHO_MAX && | |
| 4424 | 4422 | rtl_chip_supports_csum_v2(tp)) |
| 4425 | 4423 | features &= ~NETIF_F_CSUM_MASK; |
| 4426 | 4424 | } |