1. 11 May, 2024 20 commits
  2. 10 May, 2024 4 commits
    • David S. Miller's avatar
      Merge tag 'gtp-24-05-07' of git://git.kernel.org/pub/scm/linux/kernel/git/pablo/gtp · f8beae07
      David S. Miller authored
      Pablo neira Ayuso says:
      
      ====================
      gtp pull request 24-05-07
      
      This v3 includes:
      - fix for clang uninitialized variable per Jakub.
      - address Smatch and Coccinelle reports per Simon
      - remove inline in new IPv6 support per Simon
      - fix memleaks in netlink control plane per Simon
      -o-
      
      The following patchset contains IPv6 GTP driver support for net-next,
      this also includes IPv6 over IPv4 and vice-versa:
      
      Patch #1 removes a unnecessary stack variable initialization in the
               socket routine.
      
      Patch #2 deals with GTP extension headers. This variable length extension
               header to decapsulate packets accordingly. Otherwise, packets are
               dropped when these extension headers are present which breaks
               interoperation with other non-Linux based GTP implementations.
      
      Patch #3 prepares for IPv6 support by moving IPv4 specific fields in PDP
               context objects to a union.
      
      Patch #4 adds IPv6 support while retaining backward compatibility.
               Three new attributes allows to declare an IPv6 GTP tunnel
               GTPA_FAMILY, GTPA_PEER_ADDR6 and GTPA_MS_ADDR6 as well as
               IFLA_GTP_LOCAL6 to declare the IPv6 GTP UDP socket. Up to this
               patch, only IPv6 outer in IPv6 inner is supported.
      
      Patch #5 uses IPv6 address /64 prefix for UE/MS in the inner headers.
               Unlike IPv4, which provides a 1:1 mapping between UE/MS,
               IPv6 tunnel encapsulates traffic for /64 address as specified
               by 3GPP TS. Patch has been split from Patch #4 to highlight
               this behaviour.
      
      Patch #6 passes up IPv6 link-local traffic, such as IPv6 SLAAC, for
               handling to userspace so they are handled as control packets.
      
      Patch #7 prepares to allow for GTP IPv4 over IPv6 and vice-versa by
               moving IP specific debugging out of the function to build
               IPv4 and IPv6 GTP packets.
      
      Patch #8 generalizes TOS/DSCP handling following similar approach as
               in the existing iptunnel infrastructure.
      
      Patch #9 adds a helper function to build an IPv4 GTP packet in the outer
               header.
      
      Patch #10 adds a helper function to build an IPv6 GTP packet in the outer
                header.
      
      Patch #11 adds support for GTP IPv4-over-IPv6 and vice-versa.
      
      Patch #12 allows to use the same TID/TEID (tunnel identifier) for inner
                IPv4 and IPv6 packets for better UE/MS dual stack integration.
      
      This series integrates with the osmocom.org project CI and TTCN-3 test
      infrastructure (Oliver Smith) as well as the userspace libgtpnl library.
      
      Thanks to Harald Welte, Oliver Smith and Pau Espin for reviewing and
      providing feedback through the osmocom.org redmine platform to make this
      happen.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f8beae07
    • gaoxingwang's avatar
      net: ipv6: fix wrong start position when receive hop-by-hop fragment · 1cd354fe
      gaoxingwang authored
      In IPv6, ipv6_rcv_core will parse the hop-by-hop type extension header and increase skb->transport_header by one extension header length.
      But if there are more other extension headers like fragment header at this time, the skb->transport_header points to the second extension header,
      not the transport layer header or the first extension header.
      
      This will result in the start and nexthdrp variable not pointing to the same position in ipv6frag_thdr_trunced,
      and ipv6_skip_exthdr returning incorrect offset and frag_off.Sometimes,the length of the last sharded packet is smaller than the calculated incorrect offset, resulting in packet loss.
      We can use network header to offset and calculate the correct position to solve this problem.
      
      Fixes: 9d9e937b (ipv6/netfilter: Discard first fragment not including all headers)
      Signed-off-by: default avatarGao Xingwang <gaoxingwang1@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1cd354fe
    • Eric Dumazet's avatar
      tcp: get rid of twsk_unique() · 383eed2d
      Eric Dumazet authored
      DCCP is going away soon, and had no twsk_unique() method.
      
      We can directly call tcp_twsk_unique() for TCP sockets.
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Reviewed-by: default avatarKuniyuki Iwashima <kuniyu@amazon.com>
      Link: https://lore.kernel.org/r/20240507164140.940547-1-edumazet@google.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      383eed2d
    • Praveen Kumar Kannoju's avatar
      net/sched: adjust device watchdog timer to detect stopped queue at right time · 33fb988b
      Praveen Kumar Kannoju authored
      Applications are sensitive to long network latency, particularly
      heartbeat monitoring ones. Longer the tx timeout recovery higher the
      risk with such applications on a production machines. This patch
      remedies, yet honoring device set tx timeout.
      
      Modify watchdog next timeout to be shorter than the device specified.
      Compute the next timeout be equal to device watchdog timeout less the
      how long ago queue stop had been done. At next watchdog timeout tx
      timeout handler is called into if still in stopped state. Either called
      or not called, restore the watchdog timeout back to device specified.
      Signed-off-by: default avatarPraveen Kumar Kannoju <praveen.kannoju@oracle.com>
      Link: https://lore.kernel.org/r/20240508133617.4424-1-praveen.kannoju@oracle.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      33fb988b
  3. 09 May, 2024 16 commits