Skip to content
Snippets Groups Projects
Select Git revision
  • 25525b69bb44a628841492f44a5a8e74f34724f4
  • vme-testing default
  • ci-test
  • master
  • remoteproc
  • am625-sk-ov5640
  • pcal6534-upstreaming
  • lps22df-upstreaming
  • msc-upstreaming
  • imx8mp
  • iio/noa1305
  • vme-next
  • vme-next-4.14-rc4
  • v4.14-rc4
  • v4.14-rc3
  • v4.14-rc2
  • v4.14-rc1
  • v4.13
  • vme-next-4.13-rc7
  • v4.13-rc7
  • v4.13-rc6
  • v4.13-rc5
  • v4.13-rc4
  • v4.13-rc3
  • v4.13-rc2
  • v4.13-rc1
  • v4.12
  • v4.12-rc7
  • v4.12-rc6
  • v4.12-rc5
  • v4.12-rc4
  • v4.12-rc3
32 results

ice_main.c

Blame
  • protocol.c 95.87 KiB
    // SPDX-License-Identifier: GPL-2.0
    /* Multipath TCP
     *
     * Copyright (c) 2017 - 2019, Intel Corporation.
     */
    
    #define pr_fmt(fmt) "MPTCP: " fmt
    
    #include <linux/kernel.h>
    #include <linux/module.h>
    #include <linux/netdevice.h>
    #include <linux/sched/signal.h>
    #include <linux/atomic.h>
    #include <net/sock.h>
    #include <net/inet_common.h>
    #include <net/inet_hashtables.h>
    #include <net/protocol.h>
    #include <net/tcp.h>
    #include <net/tcp_states.h>
    #if IS_ENABLED(CONFIG_MPTCP_IPV6)
    #include <net/transp_v6.h>
    #endif
    #include <net/mptcp.h>
    #include <net/xfrm.h>
    #include <asm/ioctls.h>
    #include "protocol.h"
    #include "mib.h"
    
    #define CREATE_TRACE_POINTS
    #include <trace/events/mptcp.h>
    
    #if IS_ENABLED(CONFIG_MPTCP_IPV6)
    struct mptcp6_sock {
    	struct mptcp_sock msk;
    	struct ipv6_pinfo np;
    };
    #endif
    
    struct mptcp_skb_cb {
    	u64 map_seq;
    	u64 end_seq;
    	u32 offset;
    	u8  has_rxtstamp:1;
    };
    
    #define MPTCP_SKB_CB(__skb)	((struct mptcp_skb_cb *)&((__skb)->cb[0]))
    
    enum {
    	MPTCP_CMSG_TS = BIT(0),
    	MPTCP_CMSG_INQ = BIT(1),
    };
    
    static struct percpu_counter mptcp_sockets_allocated ____cacheline_aligned_in_smp;
    
    static void __mptcp_destroy_sock(struct sock *sk);
    static void __mptcp_check_send_data_fin(struct sock *sk);
    
    DEFINE_PER_CPU(struct mptcp_delegated_action, mptcp_delegated_actions);
    static struct net_device mptcp_napi_dev;
    
    /* If msk has an initial subflow socket, and the MP_CAPABLE handshake has not
     * completed yet or has failed, return the subflow socket.
     * Otherwise return NULL.
     */
    struct socket *__mptcp_nmpc_socket(const struct mptcp_sock *msk)
    {
    	if (!msk->subflow || READ_ONCE(msk->can_ack))
    		return NULL;
    
    	return msk->subflow;