From: David S. Miller Date: Tue, 9 Jul 2019 02:48:57 +0000 (-0700) Subject: Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net X-Git-Tag: v5.3-rc1~140^2~22 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=af144a983402f7fd324ce556d9f9011a8b3e01fe;p=linux-block.git Merge git://git./linux/kernel/git/davem/net Two cases of overlapping changes, nothing fancy. Signed-off-by: David S. Miller --- af144a983402f7fd324ce556d9f9011a8b3e01fe diff --cc include/linux/phylink.h index 0fe57a261c9c,5b130140fb8f..300ecdb6790a --- a/include/linux/phylink.h +++ b/include/linux/phylink.h @@@ -114,9 -99,15 +115,15 @@@ struct phylink_mac_ops * If the @state->interface mode is %PHY_INTERFACE_MODE_1000BASEX * or %PHY_INTERFACE_MODE_2500BASEX, select the appropriate mode * based on @state->advertising and/or @state->speed and update - * @state->interface accordingly. + * @state->interface accordingly. See phylink_helper_basex_speed(). + * + * When @state->interface is %PHY_INTERFACE_MODE_NA, phylink expects the + * MAC driver to return all supported link modes. + * + * If the @state->interface mode is not supported, then the @supported + * mask must be cleared. */ -void validate(struct net_device *ndev, unsigned long *supported, +void validate(struct phylink_config *config, unsigned long *supported, struct phylink_link_state *state); /** diff --cc include/net/tls.h index 0279938386ab,889df0312cd1..176d0b039f32 --- a/include/net/tls.h +++ b/include/net/tls.h @@@ -345,8 -310,10 +345,9 @@@ struct tls_offload_context_rx }; #define TLS_OFFLOAD_CONTEXT_SIZE_RX \ - (ALIGN(sizeof(struct tls_offload_context_rx), sizeof(void *)) + \ - TLS_DRIVER_STATE_SIZE) + (sizeof(struct tls_offload_context_rx) + TLS_DRIVER_STATE_SIZE_RX) + void tls_ctx_free(struct tls_context *ctx); int wait_on_pending_writer(struct sock *sk, long *timeo); int tls_sk_query(struct sock *sk, int optname, char __user *optval, int __user *optlen); diff --cc include/net/xdp_sock.h index de4e3a353df3,7da155164947..69796d264f06 --- a/include/net/xdp_sock.h +++ b/include/net/xdp_sock.h @@@ -58,11 -58,16 +58,16 @@@ struct xdp_sock struct xdp_umem *umem; struct list_head flush_node; u16 queue_id; - struct xsk_queue *tx ____cacheline_aligned_in_smp; - struct list_head list; bool zc; + enum { + XSK_READY = 0, + XSK_BOUND, + XSK_UNBOUND, + } state; /* Protects multiple processes in the control path */ struct mutex mutex; + struct xsk_queue *tx ____cacheline_aligned_in_smp; + struct list_head list; /* Mutual exclusion of NAPI TX thread and sendmsg error paths * in the SKB destructor callback. */ diff --cc net/ipv4/devinet.c index 137d1892395d,c5ebfa199794..a4b5bd4d2c89 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c @@@ -482,10 -473,11 +487,13 @@@ static int __inet_insert_ifa(struct in_ ifa->ifa_flags &= ~IFA_F_SECONDARY; last_primary = &in_dev->ifa_list; + /* Don't set IPv6 only flags to IPv4 addresses */ + ifa->ifa_flags &= ~IPV6ONLY_FLAGS; + - for (ifap = &in_dev->ifa_list; (ifa1 = *ifap) != NULL; - ifap = &ifa1->ifa_next) { + ifap = &in_dev->ifa_list; + ifa1 = rtnl_dereference(*ifap); + + while (ifa1) { if (!(ifa1->ifa_flags & IFA_F_SECONDARY) && ifa->ifa_scope <= ifa1->ifa_scope) last_primary = &ifa1->ifa_next; diff --cc net/netfilter/nf_nat_proto.c index 888292e8fbb2,83a24cc5753b..7ac733ebd060 --- a/net/netfilter/nf_nat_proto.c +++ b/net/netfilter/nf_nat_proto.c @@@ -562,9 -562,9 +562,9 @@@ int nf_nat_icmp_reply_translation(struc WARN_ON(ctinfo != IP_CT_RELATED && ctinfo != IP_CT_RELATED_REPLY); - if (!skb_make_writable(skb, hdrlen + sizeof(*inside))) + if (skb_ensure_writable(skb, hdrlen + sizeof(*inside))) return 0; - if (nf_ip_checksum(skb, hooknum, hdrlen, 0)) + if (nf_ip_checksum(skb, hooknum, hdrlen, IPPROTO_ICMP)) return 0; inside = (void *)skb->data + hdrlen; diff --cc net/xdp/xsk.c index 0574f008954c,f53a6ef7c155..d4d6f10aa936 --- a/net/xdp/xsk.c +++ b/net/xdp/xsk.c @@@ -798,8 -817,8 +851,9 @@@ static int xsk_create(struct net *net, sock_set_flag(sk, SOCK_RCU_FREE); xs = xdp_sk(sk); + xs->state = XSK_READY; mutex_init(&xs->mutex); + spin_lock_init(&xs->rx_lock); spin_lock_init(&xs->tx_completion_lock); mutex_lock(&net->xdp.lock); diff --cc tools/testing/selftests/net/config index e4b878d95ba0,3dea2cba2325..b8503a8119b0 --- a/tools/testing/selftests/net/config +++ b/tools/testing/selftests/net/config @@@ -25,6 -25,4 +25,7 @@@ CONFIG_NF_TABLES_IPV6= CONFIG_NF_TABLES_IPV4=y CONFIG_NFT_CHAIN_NAT_IPV6=m CONFIG_NFT_CHAIN_NAT_IPV4=m +CONFIG_NET_SCH_FQ=m +CONFIG_NET_SCH_ETF=m +CONFIG_TEST_BLACKHOLE_DEV=m + CONFIG_KALLSYMS=y