linux-sctp.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 00/15] sctp: Implement RFC6951: UDP Encapsulation of SCTP
@ 2020-09-29 13:48 Xin Long
  2020-09-29 13:48 ` Xin Long
                   ` (3 more replies)
  0 siblings, 4 replies; 82+ messages in thread
From: Xin Long @ 2020-09-29 13:48 UTC (permalink / raw)
  To: network dev, linux-sctp
  Cc: Marcelo Ricardo Leitner, Neil Horman, Michael Tuexen, Tom Herbert, davem

Description From the RFC:

   The Main Reasons:

   o  To allow SCTP traffic to pass through legacy NATs, which do not
      provide native SCTP support as specified in [BEHAVE] and
      [NATSUPP].

   o  To allow SCTP to be implemented on hosts that do not provide
      direct access to the IP layer.  In particular, applications can
      use their own SCTP implementation if the operating system does not
      provide one.

   Implementation Notes:

   UDP-encapsulated SCTP is normally communicated between SCTP stacks
   using the IANA-assigned UDP port number 9899 (sctp-tunneling) on both
   ends.  There are circumstances where other ports may be used on
   either end, and it might be required to use ports other than the
   registered port.

   Each SCTP stack uses a single local UDP encapsulation port number as
   the destination port for all its incoming SCTP packets, this greatly
   simplifies implementation design.

   An SCTP implementation supporting UDP encapsulation MUST maintain a
   remote UDP encapsulation port number per destination address for each
   SCTP association.  Again, because the remote stack may be using ports
   other than the well-known port, each port may be different from each
   stack.  However, because of remapping of ports by NATs, the remote
   ports associated with different remote IP addresses may not be
   identical, even if they are associated with the same stack.

   Because the well-known port might not be used, implementations need
   to allow other port numbers to be specified as a local or remote UDP
   encapsulation port number through APIs.

Patches:

   This patchset is using the udp4/6 tunnel APIs to implement the UDP
   Encapsulation of SCTP with not much change in SCTP protocol stack
   and with all current SCTP features keeped in Linux Kernel.

   1 - 4: Fix some UDP issues that may be triggered by SCTP over UDP.
   5 - 7: Process incoming UDP encapsulated packets and ICMP packets.
   8 -10: Remote encap port's update by sysctl, sockopt and packets.
   11-14: Process outgoing pakects with UDP encapsulated and its GSO.
      15: Enable this feature.

Tests:

  - lksctp-tools/src/func_tests with UDP Encapsulation enabled/disabled:

      Both make v4test and v6test passed.

  - sctp-tests with UDP Encapsulation enabled/disabled:

      repeatability/procdumps/sctpdiag/gsomtuchange/extoverflow/
      sctphashtable passed. Others failed as expected due to those
      "iptables -p sctp" rules.

  - netperf on lo/netns/virtio_net, with gso enabled/disabled and
    with ip_checksum enabled/disabled, with UDP Encapsulation
    enabled/disabled:

      No clear performance dropped.

Xin Long (15):
  udp: check udp sock encap_type in __udp_lib_err
  udp6: move the mss check after udp gso tunnel processing
  udp: do checksum properly in skb_udp_tunnel_segment
  udp: support sctp over udp in skb_udp_tunnel_segment
  sctp: create udp4 sock and add its encap_rcv
  sctp: create udp6 sock and set its encap_rcv
  sctp: add encap_err_lookup for udp encap socks
  sctp: add encap_port for netns sock asoc and transport
  sctp: add SCTP_REMOTE_UDP_ENCAPS_PORT sockopt
  sctp: allow changing transport encap_port by peer packets
  sctp: add udphdr to overhead when udp_port is set
  sctp: call sk_setup_caps in sctp_packet_transmit instead
  sctp: support for sending packet over udp4 sock
  sctp: support for sending packet over udp6 sock
  sctp: enable udp tunneling socks

 include/net/netns/sctp.h     |   8 +++
 include/net/sctp/constants.h |   2 +
 include/net/sctp/sctp.h      |   9 ++-
 include/net/sctp/sm.h        |   1 +
 include/net/sctp/structs.h   |  13 ++--
 include/uapi/linux/sctp.h    |   7 ++
 net/ipv4/udp.c               |   2 +-
 net/ipv4/udp_offload.c       |  16 +++--
 net/ipv6/udp.c               |   2 +-
 net/ipv6/udp_offload.c       | 154 +++++++++++++++++++++----------------------
 net/sctp/associola.c         |   4 ++
 net/sctp/ipv6.c              |  48 ++++++++++----
 net/sctp/output.c            |  22 +++----
 net/sctp/protocol.c          | 145 ++++++++++++++++++++++++++++++++++++----
 net/sctp/sm_make_chunk.c     |   1 +
 net/sctp/sm_statefuns.c      |   2 +
 net/sctp/socket.c            | 111 +++++++++++++++++++++++++++++++
 net/sctp/sysctl.c            |  53 +++++++++++++++
 18 files changed, 471 insertions(+), 129 deletions(-)

-- 
2.1.0

^ permalink raw reply	[flat|nested] 82+ messages in thread

end of thread, other threads:[~2020-10-08  9:37 UTC | newest]

Thread overview: 82+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-29 13:48 [PATCH net-next 00/15] sctp: Implement RFC6951: UDP Encapsulation of SCTP Xin Long
2020-09-29 13:48 ` Xin Long
2020-09-29 13:48 ` [PATCH net-next 01/15] udp: check udp sock encap_type in __udp_lib_err Xin Long
2020-09-29 13:48   ` Xin Long
2020-09-29 13:48   ` [PATCH net-next 02/15] udp6: move the mss check after udp gso tunnel processing Xin Long
2020-09-29 13:48     ` Xin Long
2020-09-29 13:48     ` [PATCH net-next 03/15] udp: do checksum properly in skb_udp_tunnel_segment Xin Long
2020-09-29 13:48       ` Xin Long
2020-09-29 13:48       ` [PATCH net-next 04/15] udp: support sctp over udp " Xin Long
2020-09-29 13:48         ` Xin Long
2020-09-29 13:48         ` [PATCH net-next 05/15] sctp: create udp4 sock and add its encap_rcv Xin Long
2020-09-29 13:48           ` Xin Long
2020-09-29 13:48           ` [PATCH net-next 06/15] sctp: create udp6 sock and set " Xin Long
2020-09-29 13:48             ` Xin Long
2020-09-29 13:48             ` [PATCH net-next 07/15] sctp: add encap_err_lookup for udp encap socks Xin Long
2020-09-29 13:48               ` Xin Long
2020-09-29 13:49               ` [PATCH net-next 08/15] sctp: add encap_port for netns sock asoc and transport Xin Long
2020-09-29 13:49                 ` Xin Long
2020-09-29 13:49                 ` [PATCH net-next 09/15] sctp: add SCTP_REMOTE_UDP_ENCAPS_PORT sockopt Xin Long
2020-09-29 13:49                   ` Xin Long
2020-09-29 13:49                   ` [PATCH net-next 10/15] sctp: allow changing transport encap_port by peer packets Xin Long
2020-09-29 13:49                     ` Xin Long
2020-09-29 13:49                     ` [PATCH net-next 11/15] sctp: add udphdr to overhead when udp_port is set Xin Long
2020-09-29 13:49                       ` Xin Long
2020-09-29 13:49                       ` [PATCH net-next 12/15] sctp: call sk_setup_caps in sctp_packet_transmit instead Xin Long
2020-09-29 13:49                         ` Xin Long
2020-09-29 13:49                         ` [PATCH net-next 13/15] sctp: support for sending packet over udp4 sock Xin Long
2020-09-29 13:49                           ` Xin Long
2020-09-29 13:49                           ` [PATCH net-next 14/15] sctp: support for sending packet over udp6 sock Xin Long
2020-09-29 13:49                             ` Xin Long
2020-09-29 13:49                             ` [PATCH net-next 15/15] sctp: enable udp tunneling socks Xin Long
2020-09-29 13:49                               ` Xin Long
2020-10-03  4:12                               ` Marcelo Ricardo Leitner
2020-10-03  4:12                                 ` Marcelo Ricardo Leitner
2020-10-03  8:20                                 ` Xin Long
2020-10-03  8:20                                   ` Xin Long
2020-09-29 16:25                           ` [PATCH net-next 13/15] sctp: support for sending packet over udp4 sock kernel test robot
2020-09-29 16:25                             ` kernel test robot
2020-09-30  6:26                             ` Xin Long
2020-09-30  6:26                               ` Xin Long
2020-09-29 19:19                           ` kernel test robot
2020-09-29 19:19                             ` kernel test robot
2020-10-03  4:09                         ` [PATCH net-next 12/15] sctp: call sk_setup_caps in sctp_packet_transmit instead Marcelo Ricardo Leitner
2020-10-03  4:09                           ` Marcelo Ricardo Leitner
2020-10-03  7:45                           ` Xin Long
2020-10-03  7:45                             ` Xin Long
2020-09-29 19:00                       ` [PATCH net-next 11/15] sctp: add udphdr to overhead when udp_port is set kernel test robot
2020-09-29 19:00                         ` kernel test robot
2020-10-03  4:08                         ` Marcelo Ricardo Leitner
2020-10-03  4:08                           ` Marcelo Ricardo Leitner
2020-10-03  7:57                           ` Xin Long
2020-10-03  8:12                             ` Xin Long
2020-10-03 11:23                             ` Xin Long
2020-10-03 11:23                               ` Xin Long
2020-10-03 12:24                               ` Xin Long
2020-10-03 12:24                                 ` Xin Long
2020-10-05 19:01                                 ` Marcelo Ricardo Leitner
2020-10-05 19:01                                   ` Marcelo Ricardo Leitner
2020-10-05 20:08                                   ` Michael Tuexen
2020-10-05 20:08                                     ` Michael Tuexen
2020-10-08  9:37                                   ` Xin Long
2020-10-08  9:37                                     ` Xin Long
2020-10-03  4:07                       ` Marcelo Ricardo Leitner
2020-10-03  4:07                         ` Marcelo Ricardo Leitner
2020-10-03  7:54                         ` Xin Long
2020-10-03  7:54                           ` Xin Long
2020-10-03  4:06                     ` [PATCH net-next 10/15] sctp: allow changing transport encap_port by peer packets Marcelo Ricardo Leitner
2020-10-03  4:06                       ` Marcelo Ricardo Leitner
2020-10-03  4:05                   ` [PATCH net-next 09/15] sctp: add SCTP_REMOTE_UDP_ENCAPS_PORT sockopt Marcelo Ricardo Leitner
2020-10-03  4:05                     ` Marcelo Ricardo Leitner
2020-10-03  7:41                     ` Xin Long
2020-10-03  7:41                       ` Xin Long
2020-10-03  4:04       ` [PATCH net-next 03/15] udp: do checksum properly in skb_udp_tunnel_segment Marcelo Ricardo Leitner
2020-10-03  4:04         ` Marcelo Ricardo Leitner
2020-10-03  7:40         ` Xin Long
2020-10-03  7:40           ` Xin Long
2020-09-29 16:39 ` [PATCH net-next 00/15] sctp: Implement RFC6951: UDP Encapsulation of SCTP Michael Tuexen
2020-09-29 16:39   ` Michael Tuexen
2020-09-29 17:49   ` Xin Long
2020-09-29 18:04     ` Xin Long
2020-10-01 12:41 ` Marcelo Ricardo Leitner
2020-10-01 12:41   ` Marcelo Ricardo Leitner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).