From: David S. Miller Date: Tue, 18 Jun 2019 02:48:13 +0000 (-0700) Subject: Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=13091aa30535b719e269f20a7bc34002bf5afae5;p=linux.git Merge git://git./linux/kernel/git/davem/net Honestly all the conflicts were simple overlapping changes, nothing really interesting to report. Signed-off-by: David S. Miller --- 13091aa30535b719e269f20a7bc34002bf5afae5 diff --cc drivers/net/ethernet/mellanox/mlx5/core/cmd.c index 30f7dffb5b1b8,e94686c420004..8cdd7e66f8df5 --- a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c @@@ -628,7 -632,11 +632,11 @@@ const char *mlx5_command_str(int comman MLX5_COMMAND_STR_CASE(QUERY_MODIFY_HEADER_CONTEXT); MLX5_COMMAND_STR_CASE(ALLOC_MEMIC); MLX5_COMMAND_STR_CASE(DEALLOC_MEMIC); - MLX5_COMMAND_STR_CASE(QUERY_HOST_PARAMS); + MLX5_COMMAND_STR_CASE(QUERY_ESW_FUNCTIONS); + MLX5_COMMAND_STR_CASE(CREATE_UCTX); + MLX5_COMMAND_STR_CASE(DESTROY_UCTX); + MLX5_COMMAND_STR_CASE(CREATE_UMEM); + MLX5_COMMAND_STR_CASE(DESTROY_UMEM); default: return "unknown command opcode"; } } diff --cc include/uapi/linux/snmp.h index 74904e9d1b726,fd42c1316d3d1..549a31c29f7d4 --- a/include/uapi/linux/snmp.h +++ b/include/uapi/linux/snmp.h @@@ -283,7 -283,7 +283,8 @@@ enu LINUX_MIB_TCPACKCOMPRESSED, /* TCPAckCompressed */ LINUX_MIB_TCPZEROWINDOWDROP, /* TCPZeroWindowDrop */ LINUX_MIB_TCPRCVQDROP, /* TCPRcvQDrop */ + LINUX_MIB_TCPWQUEUETOOBIG, /* TCPWqueueTooBig */ + LINUX_MIB_TCPFASTOPENPASSIVEALTKEY, /* TCPFastOpenPassiveAltKey */ __LINUX_MIB_MAX }; diff --cc kernel/bpf/verifier.c index 5c2cb5bd84ce5,a5c369e60343d..1e9d10b329841 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@@ -5513,13 -5353,12 +5505,16 @@@ static int check_return_code(struct bpf struct tnum range = tnum_range(0, 1); switch (env->prog->type) { + case BPF_PROG_TYPE_CGROUP_SOCK_ADDR: + if (env->prog->expected_attach_type == BPF_CGROUP_UDP4_RECVMSG || + env->prog->expected_attach_type == BPF_CGROUP_UDP6_RECVMSG) + range = tnum_range(1, 1); case BPF_PROG_TYPE_CGROUP_SKB: + if (env->prog->expected_attach_type == BPF_CGROUP_INET_EGRESS) { + range = tnum_range(0, 3); + enforce_attach_type_range = tnum_range(2, 3); + } case BPF_PROG_TYPE_CGROUP_SOCK: - case BPF_PROG_TYPE_CGROUP_SOCK_ADDR: case BPF_PROG_TYPE_SOCK_OPS: case BPF_PROG_TYPE_CGROUP_DEVICE: case BPF_PROG_TYPE_CGROUP_SYSCTL: @@@ -5546,13 -5385,9 +5541,13 @@@ verbose(env, "has unknown scalar value"); } tnum_strn(tn_buf, sizeof(tn_buf), range); - verbose(env, " should have been %s\n", tn_buf); + verbose(env, " should have been in %s\n", tn_buf); return -EINVAL; } + + if (!tnum_is_unknown(enforce_attach_type_range) && + tnum_in(enforce_attach_type_range, reg->var_off)) + env->prog->enforce_expected_attach_type = 1; return 0; } diff --cc net/core/bpf_sk_storage.c index f40e3d35fd9c2,d1c4e1f3be2c7..94c7f77ecb6b6 --- a/net/core/bpf_sk_storage.c +++ b/net/core/bpf_sk_storage.c @@@ -634,16 -633,9 +634,17 @@@ static struct bpf_map *bpf_sk_storage_m return ERR_PTR(-ENOMEM); bpf_map_init_from_attr(&smap->map, attr); - smap->bucket_log = ilog2(roundup_pow_of_two(num_possible_cpus())); + /* Use at least 2 buckets, select_bucket() is undefined behavior with 1 bucket */ + smap->bucket_log = max_t(u32, 1, ilog2(roundup_pow_of_two(num_possible_cpus()))); nbuckets = 1U << smap->bucket_log; + cost = sizeof(*smap->buckets) * nbuckets + sizeof(*smap); + + ret = bpf_map_charge_init(&smap->map.memory, cost); + if (ret < 0) { + kfree(smap); + return ERR_PTR(ret); + } + smap->buckets = kvcalloc(sizeof(*smap->buckets), nbuckets, GFP_USER | __GFP_NOWARN); if (!smap->buckets) { diff --cc net/ipv4/proc.c index 80d2ba1b6299a,073273b751f8f..cc90243ccf767 --- a/net/ipv4/proc.c +++ b/net/ipv4/proc.c @@@ -287,7 -287,7 +287,8 @@@ static const struct snmp_mib snmp4_net_ SNMP_MIB_ITEM("TCPAckCompressed", LINUX_MIB_TCPACKCOMPRESSED), SNMP_MIB_ITEM("TCPZeroWindowDrop", LINUX_MIB_TCPZEROWINDOWDROP), SNMP_MIB_ITEM("TCPRcvQDrop", LINUX_MIB_TCPRCVQDROP), + SNMP_MIB_ITEM("TCPWqueueTooBig", LINUX_MIB_TCPWQUEUETOOBIG), + SNMP_MIB_ITEM("TCPFastOpenPassiveAltKey", LINUX_MIB_TCPFASTOPENPASSIVEALTKEY), SNMP_MIB_SENTINEL }; diff --cc net/mac80211/cfg.c index fcf1dfc3a1cc6,a1973a26c7fc4..4f12d042c89c5 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@@ -4,9 -5,7 +5,8 @@@ * Copyright 2006-2010 Johannes Berg * Copyright 2013-2015 Intel Mobile Communications GmbH * Copyright (C) 2015-2017 Intel Deutschland GmbH + * Copyright (C) 2018-2019 Intel Corporation - * - * This file is GPLv2 as found in COPYING. + * Copyright (C) 2018 Intel Corporation */ #include diff --cc net/mac80211/key.c index faadfeea7127d,89f09a09efdb7..49f86f4125647 --- a/net/mac80211/key.c +++ b/net/mac80211/key.c @@@ -271,12 -271,7 +271,10 @@@ int ieee80211_set_tx_key(struct ieee802 assert_key_lock(local); - old = key_mtx_dereference(local, sta->ptk[sta->ptk_idx]); sta->ptk_idx = key->conf.keyidx; + + if (ieee80211_hw_check(&local->hw, NO_AMPDU_KEYBORDER_SUPPORT)) + clear_sta_flag(sta, WLAN_STA_BLOCK_BA); ieee80211_check_fast_xmit(sta); return 0; diff --cc tools/testing/selftests/bpf/Makefile index 2b426ae1cdc9e,e36356e2377e9..d8df5c9b5b2ff --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@@ -23,10 -21,9 +23,10 @@@ LDLIBS += -lcap -lelf -lrt -lpthrea # Order correspond to 'make run_tests' order TEST_GEN_PROGS = test_verifier test_tag test_maps test_lru_map test_lpm_map test_progs \ test_align test_verifier_log test_dev_cgroup test_tcpbpf_user \ - test_sock test_btf test_sockmap test_lirc_mode2_user get_cgroup_id_user \ - test_socket_cookie test_cgroup_storage test_select_reuseport test_section_names \ + test_sock test_btf test_sockmap get_cgroup_id_user test_socket_cookie \ + test_cgroup_storage test_select_reuseport test_section_names \ - test_netcnt test_tcpnotify_user test_sock_fields test_sysctl + test_netcnt test_tcpnotify_user test_sock_fields test_sysctl test_hashmap \ + test_btf_dump test_cgroup_attach xdping BPF_OBJ_FILES = $(patsubst %.c,%.o, $(notdir $(wildcard progs/*.c))) TEST_GEN_FILES = $(BPF_OBJ_FILES)