ath79: update 900-unaligned_access_hacks.patch after recent GRO change
[openwrt/staging/blocktrron.git] / target / linux / ath79 / patches-6.1 / 900-unaligned_access_hacks.patch
index 30f23d4814bed6a671c21a441f8931d1b40182fc..da56bc306d2233b2f0e12dfdea5ce0d408589a42 100644 (file)
@@ -86,7 +86,7 @@ SVN-Revision: 35130
        } while (word != stop);
  
        return csum_fold(csum);
-@@ -179,73 +183,6 @@ static inline __sum16 ip_compute_csum(co
+@@ -179,74 +183,6 @@ static inline __sum16 ip_compute_csum(co
        return csum_fold(csum_partial(buff, len, 0));
  }
  
@@ -152,7 +152,8 @@ SVN-Revision: 35130
 -      "       .set    pop"
 -      : "=&r" (sum), "=&r" (tmp)
 -      : "r" (saddr), "r" (daddr),
--        "0" (htonl(len)), "r" (htonl(proto)), "r" (sum));
+-        "0" (htonl(len)), "r" (htonl(proto)), "r" (sum)
+-      : "memory");
 -
 -      return csum_fold(sum);
 -}
@@ -311,7 +312,7 @@ SVN-Revision: 35130
                case IPV6_2292HOPOPTS:
 --- a/net/ipv6/exthdrs.c
 +++ b/net/ipv6/exthdrs.c
-@@ -1003,7 +1003,7 @@ static bool ipv6_hop_jumbo(struct sk_buf
+@@ -1013,7 +1013,7 @@ static bool ipv6_hop_jumbo(struct sk_buf
                goto drop;
        }
  
@@ -336,7 +337,7 @@ SVN-Revision: 35130
  #endif /* _LINUX_TYPES_H */
 --- a/net/ipv4/af_inet.c
 +++ b/net/ipv4/af_inet.c
-@@ -1494,8 +1494,8 @@ struct sk_buff *inet_gro_receive(struct
+@@ -1515,8 +1515,8 @@ struct sk_buff *inet_gro_receive(struct
        if (unlikely(ip_fast_csum((u8 *)iph, 5)))
                goto out;
  
@@ -589,15 +590,15 @@ SVN-Revision: 35130
                 * XXX skbs on the gro_list have all been parsed and pulled
 --- a/include/net/addrconf.h
 +++ b/include/net/addrconf.h
-@@ -47,7 +47,7 @@ struct prefix_info {
+@@ -52,7 +52,7 @@ struct prefix_info {
        __be32                  reserved2;
  
        struct in6_addr         prefix;
 -};
 +} __attribute__((packed, aligned(2)));
  
- #include <linux/ipv6.h>
- #include <linux/netdevice.h>
+ /* rfc4861 4.6.2: IPv6 PIO is 32 bytes in size */
+ static_assert(sizeof(struct prefix_info) == 32);
 --- a/include/net/inet_ecn.h
 +++ b/include/net/inet_ecn.h
 @@ -138,9 +138,9 @@ static inline int IP6_ECN_set_ce(struct
@@ -750,7 +751,7 @@ SVN-Revision: 35130
  EXPORT_SYMBOL(xfrm_parse_spi);
 --- a/net/ipv4/tcp_input.c
 +++ b/net/ipv4/tcp_input.c
-@@ -4178,14 +4178,16 @@ static bool tcp_parse_aligned_timestamp(
+@@ -4183,14 +4183,16 @@ static bool tcp_parse_aligned_timestamp(
  {
        const __be32 *ptr = (const __be32 *)(th + 1);
  
@@ -857,16 +858,25 @@ SVN-Revision: 35130
  
 --- a/net/ipv4/tcp_offload.c
 +++ b/net/ipv4/tcp_offload.c
-@@ -220,7 +220,7 @@ struct sk_buff *tcp_gro_receive(struct l
+@@ -60,7 +60,7 @@ static struct sk_buff *__tcpv4_gso_segme
+       th2 = tcp_hdr(seg->next);
+       iph2 = ip_hdr(seg->next);
  
-               th2 = tcp_hdr(p);
+-      if (!(*(u32 *)&th->source ^ *(u32 *)&th2->source) &&
++      if (!(net_hdr_word(&th->source) ^ net_hdr_word(&th2->source)) &&
+           iph->daddr == iph2->daddr && iph->saddr == iph2->saddr)
+               return segs;
  
+@@ -252,7 +252,7 @@ struct sk_buff *tcp_gro_lookup(struct li
+                       continue;
+               th2 = tcp_hdr(p);
 -              if (*(u32 *)&th->source ^ *(u32 *)&th2->source) {
 +              if (net_hdr_word(&th->source) ^ net_hdr_word(&th2->source)) {
                        NAPI_GRO_CB(p)->same_flow = 0;
                        continue;
                }
-@@ -238,8 +238,8 @@ found:
+@@ -318,8 +318,8 @@ struct sk_buff *tcp_gro_receive(struct l
                  ~(TCP_FLAG_CWR | TCP_FLAG_FIN | TCP_FLAG_PSH));
        flush |= (__force int)(th->ack_seq ^ th2->ack_seq);
        for (i = sizeof(*th); i < thlen; i += 4)