History

Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

Pull networking fixes from David Miller: 1) BPF verifier fixes from Daniel Borkmann. 2) HNS driver fixes from Huazhong Tan. 3) FDB only works for ethernet devices, reject attempts to install FDB rules for others. From Ido Schimmel. 4) Fix spectre V1 in vhost, from Jason Wang. 5) Don't pass on-stack object to irq_set_affinity_hint() in mvpp2 driver, from Marc Zyngier. 6) Fix mlx5e checksum handling when RXFCS is enabled, from Eric Dumazet. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (49 commits) openvswitch: Fix push/pop ethernet validation net: stmmac: Fix stmmac_mdio_reset() when building stmmac as modules bpf: test make sure to run unpriv test cases in test_verifier bpf: add various test cases to test_verifier bpf: don't set id on after map lookup with ptr_to_map_val return bpf: fix partial copy of map_ptr when dst is scalar libbpf: Fix compile error in libbpf_attach_type_by_name kselftests/bpf: use ping6 as the default ipv6 ping binary if it exists selftests: mlxsw: qos_mc_aware: Add a test for UC awareness selftests: mlxsw: qos_mc_aware: Tweak for min shaper mlxsw: spectrum: Set minimum shaper on MC TCs mlxsw: reg: QEEC: Add minimum shaper fields net: hns3: bugfix for rtnl_lock's range in the hclgevf_reset() net: hns3: bugfix for rtnl_lock's range in the hclge_reset() net: hns3: bugfix for handling mailbox while the command queue reinitialized net: hns3: fix incorrect return value/type of some functions net: hns3: bugfix for hclge_mdio_write and hclge_mdio_read net: hns3: bugfix for is_valid_csq_clean_head() net: hns3: remove unnecessary queue reset in the hns3_uninit_all_ring() net: hns3: bugfix for the initialization of command queue's spin lock ...

Linus Torvalds committed 8 years ago

Commit 82aa4672 parents ffb845d 46ebe2856 files · +793 −274Browse files

Unified · Split

56 files
  1. Documentation/networking/ip-sysctl.txt +11 −0
  2. drivers/net/bonding/bond_netlink.c +1 −2
  3. drivers/net/ethernet/hisilicon/hns3/hnae3.h +3 −3
  4. drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +85 −32
  5. drivers/net/ethernet/hisilicon/hns3/hns3_enet.h +1 −1
  6. drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c +16 −10
  7. drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c +1 −1
  8. drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +21 −21
  9. drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h +1 −1
  10. drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c +6 −0
  11. drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c +2 −2
  12. drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c +12 −7
  13. drivers/net/ethernet/huawei/hinic/hinic_hw_qp.c +1 −1
  14. drivers/net/ethernet/huawei/hinic/hinic_hw_qp.h +1 −1
  15. drivers/net/ethernet/intel/Kconfig +18 −0
  16. drivers/net/ethernet/intel/fm10k/fm10k_iov.c +30 −21
  17. drivers/net/ethernet/intel/fm10k/fm10k_main.c +1 −1
  18. drivers/net/ethernet/intel/fm10k/fm10k_pci.c +2 −0
  19. drivers/net/ethernet/intel/fm10k/fm10k_type.h +2 −0
  20. drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +1 −1
  21. drivers/net/ethernet/intel/igb/igb_ptp.c +7 −1
  22. drivers/net/ethernet/intel/ixgbe/Makefile +1 −1
  23. drivers/net/ethernet/intel/ixgbe/ixgbe.h +4 −4
  24. drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +3 −3
  25. drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c +3 −1
  26. drivers/net/ethernet/intel/ixgbevf/Makefile +1 −1
  27. drivers/net/ethernet/intel/ixgbevf/ixgbevf.h +2 −2
  28. drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c +1 −1
  29. drivers/net/ethernet/marvell/mvpp2/mvpp2.h +1 −0
  30. drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +14 −4
  31. drivers/net/ethernet/mellanox/mlx4/en_rx.c +1 −0
  32. drivers/net/ethernet/mellanox/mlx5/core/en_rx.c +9 −36
  33. drivers/net/ethernet/mellanox/mlxsw/core.c +17 −7
  34. drivers/net/ethernet/mellanox/mlxsw/reg.h +21 −1
  35. drivers/net/ethernet/mellanox/mlxsw/spectrum.c +25 −0
  36. drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c +0 −2
  37. drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c +1 −1
  38. drivers/vhost/vhost.c +2 −0
  39. include/linux/avf/virtchnl.h +9 −3
  40. include/linux/bpf_verifier.h +3 −0
  41. include/linux/inetdevice.h +3 −1
  42. include/net/af_unix.h +2 −2
  43. kernel/bpf/verifier.c +12 −9
  44. net/core/rtnetlink.c +10 −0
  45. net/ipv4/igmp.c +36 −17
  46. net/ipv4/tcp_bpf.c +1 −0
  47. net/openvswitch/flow_netlink.c +2 −2
  48. net/sctp/associola.c +7 −3
  49. net/sctp/socket.c +5 −3
  50. net/xfrm/Kconfig +0 −1
  51. tools/lib/bpf/libbpf.c +7 −6
  52. tools/testing/selftests/bpf/flow_dissector_load.c +2 −0
  53. tools/testing/selftests/bpf/test_skb_cgroup_id.sh +2 −1
  54. tools/testing/selftests/bpf/test_sock_addr.sh +2 −1
  55. tools/testing/selftests/bpf/test_verifier.c +290 −31
  56. tools/testing/selftests/drivers/net/mlxsw/qos_mc_aware.sh +71 −24
Documentation/networking/ip-sysctl.txt+11−0
@@ -316,6 +316,17 @@ tcp_frto - INTEGER · 315 unmodified lines
316316
317317 By default it's enabled with a non-zero value. 0 disables F-RTO.
318318
319+tcp_fwmark_accept - BOOLEAN
320+ If set, incoming connections to listening sockets that do not have a
321+ socket mark will set the mark of the accepting socket to the fwmark of
322+ the incoming SYN packet. This will cause all packets on that connection
323+ (starting from the first SYNACK) to be sent with that fwmark. The
324+ listening socket's mark is unchanged. Listening sockets that already
325+ have a fwmark set via setsockopt(SOL_SOCKET, SO_MARK, ...) are
326+ unaffected.
327+
328+ Default: 0
329+
319330 tcp_invalid_ratelimit - INTEGER
320331 Limit the maximal rate for sending duplicate acknowledgments
321332 in response to incoming TCP packets that are for an existing
drivers/net/bonding/bond_netlink.c+1−2
@@ -638,8 +638,7 @@ static int bond_fill_info(struct sk_buff *skb, · 637 unmodified lines
638638 goto nla_put_failure;
639639
640640 if (nla_put(skb, IFLA_BOND_AD_ACTOR_SYSTEM,
641− sizeof(bond->params.ad_actor_system),
642− &bond->params.ad_actor_system))
641+ ETH_ALEN, &bond->params.ad_actor_system))
643642 goto nla_put_failure;
644643 }
645644 if (!bond_3ad_get_active_agg_info(bond, &info)) {
drivers/net/ethernet/hisilicon/hns3/hnae3.h+3−3
@@ -316,8 +316,8 @@ struct hnae3_ae_ops { · 315 unmodified lines
316316 int (*set_loopback)(struct hnae3_handle *handle,
317317 enum hnae3_loop loop_mode, bool en);
318318
319− void (*set_promisc_mode)(struct hnae3_handle *handle, bool en_uc_pmc,
320− bool en_mc_pmc);
319+ int (*set_promisc_mode)(struct hnae3_handle *handle, bool en_uc_pmc,
320+ bool en_mc_pmc);
321321 int (*set_mtu)(struct hnae3_handle *handle, int new_mtu);
322322
323323 void (*get_pauseparam)(struct hnae3_handle *handle,
@@ -391,7 +391,7 @@ struct hnae3_ae_ops { · 67 unmodified lines
391391 int vector_num,
392392 struct hnae3_ring_chain_node *vr_chain);
393393
394− void (*reset_queue)(struct hnae3_handle *handle, u16 queue_id);
394+ int (*reset_queue)(struct hnae3_handle *handle, u16 queue_id);
395395 u32 (*get_fw_version)(struct hnae3_handle *handle);
396396 void (*get_mdix_mode)(struct hnae3_handle *handle,
397397 u8 *tp_mdix_ctrl, u8 *tp_mdix);
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c+85−32
@@ -509,16 +509,18 @@ static void hns3_nic_set_rx_mode(struct net_device *netdev) · 508 unmodified lines
509509 h->netdev_flags = new_flags;
510510 }
511511
512−void hns3_update_promisc_mode(struct net_device *netdev, u8 promisc_flags)
512+int hns3_update_promisc_mode(struct net_device *netdev, u8 promisc_flags)
513513 {
514514 struct hns3_nic_priv *priv = netdev_priv(netdev);
515515 struct hnae3_handle *h = priv->ae_handle;
516516
517517 if (h->ae_algo->ops->set_promisc_mode) {
518− h->ae_algo->ops->set_promisc_mode(h,
519− promisc_flags & HNAE3_UPE,
520− promisc_flags & HNAE3_MPE);
518+ return h->ae_algo->ops->set_promisc_mode(h,
519+ promisc_flags & HNAE3_UPE,
520+ promisc_flags & HNAE3_MPE);
521521 }
522+
523+ return 0;
522524 }
523525
524526 void hns3_enable_vlan_filter(struct net_device *netdev, bool enable)
@@ -1494,18 +1496,22 @@ static int hns3_vlan_rx_kill_vid(struct net_device *netdev, · 969 unmodified lines
14941496 return ret;
14951497 }
14961498
1497−static void hns3_restore_vlan(struct net_device *netdev)
1499+static int hns3_restore_vlan(struct net_device *netdev)
14981500 {
14991501 struct hns3_nic_priv *priv = netdev_priv(netdev);
1502+ int ret = 0;
15001503 u16 vid;
1501− int ret;
15021504
15031505 for_each_set_bit(vid, priv->active_vlans, VLAN_N_VID) {
15041506 ret = hns3_vlan_rx_add_vid(netdev, htons(ETH_P_8021Q), vid);
1505− if (ret)
1506− netdev_warn(netdev, "Restore vlan: %d filter, ret:%d\n",
1507− vid, ret);
1507+ if (ret) {
1508+ netdev_err(netdev, "Restore vlan: %d filter, ret:%d\n",
1509+ vid, ret);
1510+ return ret;
1511+ }
15081512 }
1513+
1514+ return ret;
15091515 }
15101516
15111517 static int hns3_ndo_set_vf_vlan(struct net_device *netdev, int vf, u16 vlan,
@@ -2727,7 +2733,7 @@ static int hns3_get_vector_ring_chain(struct hns3_enet_tqp_vector *tqp_vector, · 1215 unmodified lines
27272733 chain = devm_kzalloc(&pdev->dev, sizeof(*chain),
27282734 GFP_KERNEL);
27292735 if (!chain)
2730− return -ENOMEM;
2736+ goto err_free_chain;
27312737
27322738 cur_chain->next = chain;
27332739 chain->tqp_index = tx_ring->tqp->tqp_index;
@@ -2757,7 +2763,7 @@ static int hns3_get_vector_ring_chain(struct hns3_enet_tqp_vector *tqp_vector, · 23 unmodified lines
27572763 while (rx_ring) {
27582764 chain = devm_kzalloc(&pdev->dev, sizeof(*chain), GFP_KERNEL);
27592765 if (!chain)
2760− return -ENOMEM;
2766+ goto err_free_chain;
27612767
27622768 cur_chain->next = chain;
27632769 chain->tqp_index = rx_ring->tqp->tqp_index;
@@ -2772,6 +2778,16 @@ static int hns3_get_vector_ring_chain(struct hns3_enet_tqp_vector *tqp_vector, · 8 unmodified lines
27722778 }
27732779
27742780 return 0;
2781+
2782+err_free_chain:
2783+ cur_chain = head->next;
2784+ while (cur_chain) {
2785+ chain = cur_chain->next;
2786+ devm_kfree(&pdev->dev, chain);
2787+ cur_chain = chain;
2788+ }
2789+
2790+ return -ENOMEM;
27752791 }
27762792
27772793 static void hns3_free_vector_ring_chain(struct hns3_enet_tqp_vector *tqp_vector,
@@ -2821,7 +2837,7 @@ static int hns3_nic_init_vector_data(struct hns3_nic_priv *priv) · 43 unmodified lines
28212837 struct hnae3_handle *h = priv->ae_handle;
28222838 struct hns3_enet_tqp_vector *tqp_vector;
28232839 int ret = 0;
2824− u16 i;
2840+ int i;
28252841
28262842 hns3_nic_set_cpumask(priv);
28272843
@@ -2868,13 +2884,19 @@ static int hns3_nic_init_vector_data(struct hns3_nic_priv *priv) · 40 unmodified lines
28682884 hns3_free_vector_ring_chain(tqp_vector, &vector_ring_chain);
28692885
28702886 if (ret)
2871− return ret;
2887+ goto map_ring_fail;
28722888
28732889 netif_napi_add(priv->netdev, &tqp_vector->napi,
28742890 hns3_nic_common_poll, NAPI_POLL_WEIGHT);
28752891 }
28762892
28772893 return 0;
2894+
2895+map_ring_fail:
2896+ while (i--)
2897+ netif_napi_del(&priv->tqp_vector[i].napi);
2898+
2899+ return ret;
28782900 }
28792901
28802902 static int hns3_nic_alloc_vector_data(struct hns3_nic_priv *priv)
@@ -3031,8 +3053,10 @@ static int hns3_queue_to_ring(struct hnae3_queue *tqp, · 150 unmodified lines
30313053 return ret;
30323054
30333055 ret = hns3_ring_get_cfg(tqp, priv, HNAE3_RING_TYPE_RX);
3034− if (ret)
3056+ if (ret) {
3057+ devm_kfree(priv->dev, priv->ring_data[tqp->tqp_index].ring);
30353058 return ret;
3059+ }
30363060
30373061 return 0;
30383062 }
@@ -3059,6 +3083,12 @@ static int hns3_get_ring_config(struct hns3_nic_priv *priv) · 20 unmodified lines
30593083
30603084 return 0;
30613085 err:
3086+ while (i--) {
3087+ devm_kfree(priv->dev, priv->ring_data[i].ring);
3088+ devm_kfree(priv->dev,
3089+ priv->ring_data[i + h->kinfo.num_tqps].ring);
3090+ }
3091+
30623092 devm_kfree(&pdev->dev, priv->ring_data);
30633093 return ret;
30643094 }
@@ -3226,9 +3256,6 @@ int hns3_uninit_all_ring(struct hns3_nic_priv *priv) · 161 unmodified lines
32263256 int i;
32273257
32283258 for (i = 0; i < h->kinfo.num_tqps; i++) {
3229− if (h->ae_algo->ops->reset_queue)
3230− h->ae_algo->ops->reset_queue(h, i);
3231−
32323259 hns3_fini_ring(priv->ring_data[i].ring);
32333260 hns3_fini_ring(priv->ring_data[i + h->kinfo.num_tqps].ring);
32343261 }
@@ -3236,11 +3263,12 @@ int hns3_uninit_all_ring(struct hns3_nic_priv *priv) · 1 unmodified line
32363263 }
32373264
32383265 /* Set mac addr if it is configured. or leave it to the AE driver */
3239−static void hns3_init_mac_addr(struct net_device *netdev, bool init)
3266+static int hns3_init_mac_addr(struct net_device *netdev, bool init)
32403267 {
32413268 struct hns3_nic_priv *priv = netdev_priv(netdev);
32423269 struct hnae3_handle *h = priv->ae_handle;
32433270 u8 mac_addr_temp[ETH_ALEN];
3271+ int ret = 0;
32443272
32453273 if (h->ae_algo->ops->get_mac_addr && init) {
32463274 h->ae_algo->ops->get_mac_addr(h, mac_addr_temp);
@@ -3255,8 +3283,9 @@ static void hns3_init_mac_addr(struct net_device *netdev, bool init) · 8 unmodified lines
32553283 }
32563284
32573285 if (h->ae_algo->ops->set_mac_addr)
3258− h->ae_algo->ops->set_mac_addr(h, netdev->dev_addr, true);
3286+ ret = h->ae_algo->ops->set_mac_addr(h, netdev->dev_addr, true);
32593287
3288+ return ret;
32603289 }
32613290
32623291 static int hns3_restore_fd_rules(struct net_device *netdev)
@@ -3469,20 +3498,29 @@ err_out: · 206 unmodified lines
34693498 return ret;
34703499 }
34713500
3472−static void hns3_recover_hw_addr(struct net_device *ndev)
3501+static int hns3_recover_hw_addr(struct net_device *ndev)
34733502 {
34743503 struct netdev_hw_addr_list *list;
34753504 struct netdev_hw_addr *ha, *tmp;
3505+ int ret = 0;
34763506
34773507 /* go through and sync uc_addr entries to the device */
34783508 list = &ndev->uc;
3479− list_for_each_entry_safe(ha, tmp, &list->list, list)
3480− hns3_nic_uc_sync(ndev, ha->addr);
3509+ list_for_each_entry_safe(ha, tmp, &list->list, list) {
3510+ ret = hns3_nic_uc_sync(ndev, ha->addr);
3511+ if (ret)
3512+ return ret;
3513+ }
34813514
34823515 /* go through and sync mc_addr entries to the device */
34833516 list = &ndev->mc;
3484− list_for_each_entry_safe(ha, tmp, &list->list, list)
3485− hns3_nic_mc_sync(ndev, ha->addr);
3517+ list_for_each_entry_safe(ha, tmp, &list->list, list) {
3518+ ret = hns3_nic_mc_sync(ndev, ha->addr);
3519+ if (ret)
3520+ return ret;
3521+ }
3522+
3523+ return ret;
34863524 }
34873525
34883526 static void hns3_remove_hw_addr(struct net_device *netdev)
@@ -3609,7 +3647,10 @@ int hns3_nic_reset_all_ring(struct hnae3_handle *h) · 120 unmodified lines
36093647 int ret;
36103648
36113649 for (i = 0; i < h->kinfo.num_tqps; i++) {
3612− h->ae_algo->ops->reset_queue(h, i);
3650+ ret = h->ae_algo->ops->reset_queue(h, i);
3651+ if (ret)
3652+ return ret;
3653+
36133654 hns3_init_ring_hw(priv->ring_data[i].ring);
36143655
36153656 /* We need to clear tx ring here because self test will
@@ -3701,18 +3742,30 @@ static int hns3_reset_notify_init_enet(struct hnae3_handle *handle) · 85 unmodified lines
37013742 bool vlan_filter_enable;
37023743 int ret;
37033744
3704− hns3_init_mac_addr(netdev, false);
3705− hns3_recover_hw_addr(netdev);
3706− hns3_update_promisc_mode(netdev, handle->netdev_flags);
3745+ ret = hns3_init_mac_addr(netdev, false);
3746+ if (ret)
3747+ return ret;
3748+
3749+ ret = hns3_recover_hw_addr(netdev);
3750+ if (ret)
3751+ return ret;
3752+
3753+ ret = hns3_update_promisc_mode(netdev, handle->netdev_flags);
3754+ if (ret)
3755+ return ret;
3756+
37073757 vlan_filter_enable = netdev->flags & IFF_PROMISC ? false : true;
37083758 hns3_enable_vlan_filter(netdev, vlan_filter_enable);
37093759
3710−
37113760 /* Hardware table is only clear when pf resets */
3712− if (!(handle->flags & HNAE3_SUPPORT_VF))
3713− hns3_restore_vlan(netdev);
3761+ if (!(handle->flags & HNAE3_SUPPORT_VF)) {
3762+ ret = hns3_restore_vlan(netdev);
3763+ return ret;
3764+ }
37143765
3715− hns3_restore_fd_rules(netdev);
3766+ ret = hns3_restore_fd_rules(netdev);
3767+ if (ret)
3768+ return ret;
37163769
37173770 /* Carrier off reporting is important to ethtool even BEFORE open */
37183771 netif_carrier_off(netdev);
drivers/net/ethernet/hisilicon/hns3/hns3_enet.h+1−1
@@ -640,7 +640,7 @@ void hns3_set_vector_coalesce_rl(struct hns3_enet_tqp_vector *tqp_vector, · 639 unmodified lines
640640 u32 rl_value);
641641
642642 void hns3_enable_vlan_filter(struct net_device *netdev, bool enable);
643−void hns3_update_promisc_mode(struct net_device *netdev, u8 promisc_flags);
643+int hns3_update_promisc_mode(struct net_device *netdev, u8 promisc_flags);
644644
645645 #ifdef CONFIG_HNS3_DCB
646646 void hns3_dcbnl_setup(struct hnae3_handle *handle);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c+16−10
@@ -24,15 +24,15 @@ static int hclge_ring_space(struct hclge_cmq_ring *ring) · 23 unmodified lines
2424 return ring->desc_num - used - 1;
2525 }
2626
27−static int is_valid_csq_clean_head(struct hclge_cmq_ring *ring, int h)
27+static int is_valid_csq_clean_head(struct hclge_cmq_ring *ring, int head)
2828 {
29− int u = ring->next_to_use;
30− int c = ring->next_to_clean;
29+ int ntu = ring->next_to_use;
30+ int ntc = ring->next_to_clean;
3131
32− if (unlikely(h >= ring->desc_num))
33− return 0;
32+ if (ntu > ntc)
33+ return head >= ntc && head <= ntu;
3434
35− return u > c ? (h > c && h <= u) : (h > c || h <= u);
35+ return head >= ntc || head <= ntu;
3636 }
3737
3838 static int hclge_alloc_cmd_desc(struct hclge_cmq_ring *ring)
@@ -304,6 +304,10 @@ int hclge_cmd_queue_init(struct hclge_dev *hdev) · 265 unmodified lines
304304 {
305305 int ret;
306306
307+ /* Setup the lock for command queue */
308+ spin_lock_init(&hdev->hw.cmq.csq.lock);
309+ spin_lock_init(&hdev->hw.cmq.crq.lock);
310+
307311 /* Setup the queue entries for use cmd queue */
308312 hdev->hw.cmq.csq.desc_num = HCLGE_NIC_CMQ_DESC_NUM;
309313 hdev->hw.cmq.crq.desc_num = HCLGE_NIC_CMQ_DESC_NUM;
@@ -337,18 +341,20 @@ int hclge_cmd_init(struct hclge_dev *hdev) · 27 unmodified lines
337341 u32 version;
338342 int ret;
339343
344+ spin_lock_bh(&hdev->hw.cmq.csq.lock);
345+ spin_lock_bh(&hdev->hw.cmq.crq.lock);
346+
340347 hdev->hw.cmq.csq.next_to_clean = 0;
341348 hdev->hw.cmq.csq.next_to_use = 0;
342349 hdev->hw.cmq.crq.next_to_clean = 0;
343350 hdev->hw.cmq.crq.next_to_use = 0;
344351
345− /* Setup the lock for command queue */
346− spin_lock_init(&hdev->hw.cmq.csq.lock);
347− spin_lock_init(&hdev->hw.cmq.crq.lock);
348−
349352 hclge_cmd_init_regs(&hdev->hw);
350353 clear_bit(HCLGE_STATE_CMD_DISABLE, &hdev->state);
351354
355+ spin_unlock_bh(&hdev->hw.cmq.crq.lock);
356+ spin_unlock_bh(&hdev->hw.cmq.csq.lock);
357+
352358 ret = hclge_cmd_query_firmware_version(&hdev->hw, &version);
353359 if (ret) {
354360 dev_err(&hdev->pdev->dev,
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c+1−1
@@ -751,7 +751,7 @@ static void hclge_process_ncsi_error(struct hclge_dev *hdev, · 750 unmodified lines
751751 ret = hclge_cmd_clear_error(hdev, &desc_wr, &desc_rd,
752752 HCLGE_NCSI_INT_CLR, 0);
753753 if (ret)
754− dev_err(dev, "failed(=%d) to clear NCSI intrerrupt status\n",
754+ dev_err(dev, "failed(=%d) to clear NCSI interrupt status\n",
755755 ret);
756756 }
757757
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c+21−21
@@ -2236,7 +2236,7 @@ static irqreturn_t hclge_misc_irq_handle(int irq, void *data) · 2235 unmodified lines
22362236 }
22372237
22382238 /* clear the source of interrupt if it is not cause by reset */
2239− if (event_cause != HCLGE_VECTOR0_EVENT_RST) {
2239+ if (event_cause == HCLGE_VECTOR0_EVENT_MBX) {
22402240 hclge_clear_event_cause(hdev, event_cause, clearval);
22412241 hclge_enable_vector(&hdev->misc_vector, true);
22422242 }
@@ -2470,14 +2470,17 @@ static void hclge_reset(struct hclge_dev *hdev) · 227 unmodified lines
24702470 handle = &hdev->vport[0].nic;
24712471 rtnl_lock();
24722472 hclge_notify_client(hdev, HNAE3_DOWN_CLIENT);
2473+ rtnl_unlock();
24732474
24742475 if (!hclge_reset_wait(hdev)) {
2476+ rtnl_lock();
24752477 hclge_notify_client(hdev, HNAE3_UNINIT_CLIENT);
24762478 hclge_reset_ae_dev(hdev->ae_dev);
24772479 hclge_notify_client(hdev, HNAE3_INIT_CLIENT);
24782480
24792481 hclge_clear_reset_cause(hdev);
24802482 } else {
2483+ rtnl_lock();
24812484 /* schedule again to check pending resets later */
24822485 set_bit(hdev->reset_type, &hdev->reset_pending);
24832486 hclge_reset_task_schedule(hdev);
@@ -3314,8 +3317,8 @@ void hclge_promisc_param_init(struct hclge_promisc_param *param, bool en_uc, · 830 unmodified lines
33143317 param->vf_id = vport_id;
33153318 }
33163319
3317−static void hclge_set_promisc_mode(struct hnae3_handle *handle, bool en_uc_pmc,
3318− bool en_mc_pmc)
3320+static int hclge_set_promisc_mode(struct hnae3_handle *handle, bool en_uc_pmc,
3321+ bool en_mc_pmc)
33193322 {
33203323 struct hclge_vport *vport = hclge_get_vport(handle);
33213324 struct hclge_dev *hdev = vport->back;
@@ -3323,7 +3326,7 @@ static void hclge_set_promisc_mode(struct hnae3_handle *handle, bool en_uc_pmc, · 1 unmodified line
33233326
33243327 hclge_promisc_param_init(&param, en_uc_pmc, en_mc_pmc, true,
33253328 vport->vport_id);
3326− hclge_cmd_set_promisc_mode(hdev, &param);
3329+ return hclge_cmd_set_promisc_mode(hdev, &param);
33273330 }
33283331
33293332 static int hclge_get_fd_mode(struct hclge_dev *hdev, u8 *fd_mode)
@@ -6107,31 +6110,28 @@ static u16 hclge_covert_handle_qid_global(struct hnae3_handle *handle, · 2777 unmodified lines
61076110 return tqp->index;
61086111 }
61096112
6110−void hclge_reset_tqp(struct hnae3_handle *handle, u16 queue_id)
6113+int hclge_reset_tqp(struct hnae3_handle *handle, u16 queue_id)
61116114 {
61126115 struct hclge_vport *vport = hclge_get_vport(handle);
61136116 struct hclge_dev *hdev = vport->back;
61146117 int reset_try_times = 0;
61156118 int reset_status;
61166119 u16 queue_gid;
6117− int ret;
6118−
6119− if (test_bit(HCLGE_STATE_RST_HANDLING, &hdev->state))
6120− return;
6120+ int ret = 0;
61216121
61226122 queue_gid = hclge_covert_handle_qid_global(handle, queue_id);
61236123
61246124 ret = hclge_tqp_enable(hdev, queue_id, 0, false);
61256125 if (ret) {
6126− dev_warn(&hdev->pdev->dev, "Disable tqp fail, ret = %d\n", ret);
6127− return;
6126+ dev_err(&hdev->pdev->dev, "Disable tqp fail, ret = %d\n", ret);
6127+ return ret;
61286128 }
61296129
61306130 ret = hclge_send_reset_tqp_cmd(hdev, queue_gid, true);
61316131 if (ret) {
6132− dev_warn(&hdev->pdev->dev,
6133− "Send reset tqp cmd fail, ret = %d\n", ret);
6134− return;
6132+ dev_err(&hdev->pdev->dev,
6133+ "Send reset tqp cmd fail, ret = %d\n", ret);
6134+ return ret;
61356135 }
61366136
61376137 reset_try_times = 0;
@@ -6144,16 +6144,16 @@ void hclge_reset_tqp(struct hnae3_handle *handle, u16 queue_id) · 6 unmodified lines
61446144 }
61456145
61466146 if (reset_try_times >= HCLGE_TQP_RESET_TRY_TIMES) {
6147− dev_warn(&hdev->pdev->dev, "Reset TQP fail\n");
6148− return;
6147+ dev_err(&hdev->pdev->dev, "Reset TQP fail\n");
6148+ return ret;
61496149 }
61506150
61516151 ret = hclge_send_reset_tqp_cmd(hdev, queue_gid, false);
6152− if (ret) {
6153− dev_warn(&hdev->pdev->dev,
6154− "Deassert the soft reset fail, ret = %d\n", ret);
6155− return;
6156− }
6152+ if (ret)
6153+ dev_err(&hdev->pdev->dev,
6154+ "Deassert the soft reset fail, ret = %d\n", ret);
6155+
6156+ return ret;
61576157 }
61586158
61596159 void hclge_reset_vf_queue(struct hclge_vport *vport, u16 queue_id)
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h+1−1
@@ -778,7 +778,7 @@ int hclge_rss_init_hw(struct hclge_dev *hdev); · 777 unmodified lines
778778 void hclge_rss_indir_init_cfg(struct hclge_dev *hdev);
779779
780780 void hclge_mbx_handler(struct hclge_dev *hdev);
781−void hclge_reset_tqp(struct hnae3_handle *handle, u16 queue_id);
781+int hclge_reset_tqp(struct hnae3_handle *handle, u16 queue_id);
782782 void hclge_reset_vf_queue(struct hclge_vport *vport, u16 queue_id);
783783 int hclge_cfg_flowctrl(struct hclge_dev *hdev);
784784 int hclge_func_reset_cmd(struct hclge_dev *hdev, int func_id);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c+6−0
@@ -400,6 +400,12 @@ void hclge_mbx_handler(struct hclge_dev *hdev) · 399 unmodified lines
400400
401401 /* handle all the mailbox requests in the queue */
402402 while (!hclge_cmd_crq_empty(&hdev->hw)) {
403+ if (test_bit(HCLGE_STATE_CMD_DISABLE, &hdev->state)) {
404+ dev_warn(&hdev->pdev->dev,
405+ "command queue needs re-initializing\n");
406+ return;
407+ }
408+
403409 desc = &crq->desc[crq->next_to_use];
404410 req = (struct hclge_mbx_vf_to_pf_cmd *)desc->data;
405411
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c+2−2
@@ -52,7 +52,7 @@ static int hclge_mdio_write(struct mii_bus *bus, int phyid, int regnum, · 51 unmodified lines
5252 struct hclge_desc desc;
5353 int ret;
5454
55− if (test_bit(HCLGE_STATE_RST_HANDLING, &hdev->state))
55+ if (test_bit(HCLGE_STATE_CMD_DISABLE, &hdev->state))
5656 return 0;
5757
5858 hclge_cmd_setup_basic_desc(&desc, HCLGE_OPC_MDIO_CONFIG, false);
@@ -90,7 +90,7 @@ static int hclge_mdio_read(struct mii_bus *bus, int phyid, int regnum) · 31 unmodified lines
9090 struct hclge_desc desc;
9191 int ret;
9292
93− if (test_bit(HCLGE_STATE_RST_HANDLING, &hdev->state))
93+ if (test_bit(HCLGE_STATE_CMD_DISABLE, &hdev->state))
9494 return 0;
9595
9696 hclge_cmd_setup_basic_desc(&desc, HCLGE_OPC_MDIO_CONFIG, true);
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c+12−7
@@ -925,12 +925,12 @@ static int hclgevf_cmd_set_promisc_mode(struct hclgevf_dev *hdev, · 924 unmodified lines
925925 return status;
926926 }
927927
928−static void hclgevf_set_promisc_mode(struct hnae3_handle *handle,
929− bool en_uc_pmc, bool en_mc_pmc)
928+static int hclgevf_set_promisc_mode(struct hnae3_handle *handle,
929+ bool en_uc_pmc, bool en_mc_pmc)
930930 {
931931 struct hclgevf_dev *hdev = hclgevf_ae_get_hdev(handle);
932932
933− hclgevf_cmd_set_promisc_mode(hdev, en_uc_pmc, en_mc_pmc);
933+ return hclgevf_cmd_set_promisc_mode(hdev, en_uc_pmc, en_mc_pmc);
934934 }
935935
936936 static int hclgevf_tqp_enable(struct hclgevf_dev *hdev, int tqp_id,
@@ -1080,7 +1080,7 @@ static int hclgevf_en_hw_strip_rxvtag(struct hnae3_handle *handle, bool enable) · 143 unmodified lines
10801080 1, false, NULL, 0);
10811081 }
10821082
1083−static void hclgevf_reset_tqp(struct hnae3_handle *handle, u16 queue_id)
1083+static int hclgevf_reset_tqp(struct hnae3_handle *handle, u16 queue_id)
10841084 {
10851085 struct hclgevf_dev *hdev = hclgevf_ae_get_hdev(handle);
10861086 u8 msg_data[2];
@@ -1091,10 +1091,10 @@ static void hclgevf_reset_tqp(struct hnae3_handle *handle, u16 queue_id) · 4 unmodified lines
10911091 /* disable vf queue before send queue reset msg to PF */
10921092 ret = hclgevf_tqp_enable(hdev, queue_id, 0, false);
10931093 if (ret)
1094− return;
1094+ return ret;
10951095
1096− hclgevf_send_mbx_msg(hdev, HCLGE_MBX_QUEUE_RESET, 0, msg_data,
1097− 2, true, NULL, 0);
1096+ return hclgevf_send_mbx_msg(hdev, HCLGE_MBX_QUEUE_RESET, 0, msg_data,
1097+ 2, true, NULL, 0);
10981098 }
10991099
11001100 static int hclgevf_notify_client(struct hclgevf_dev *hdev,
@@ -1170,6 +1170,8 @@ static int hclgevf_reset(struct hclgevf_dev *hdev) · 69 unmodified lines
11701170 /* bring down the nic to stop any ongoing TX/RX */
11711171 hclgevf_notify_client(hdev, HNAE3_DOWN_CLIENT);
11721172
1173+ rtnl_unlock();
1174+
11731175 /* check if VF could successfully fetch the hardware reset completion
11741176 * status from the hardware
11751177 */
@@ -1181,12 +1183,15 @@ static int hclgevf_reset(struct hclgevf_dev *hdev) · 5 unmodified lines
11811183 ret);
11821184
11831185 dev_warn(&hdev->pdev->dev, "VF reset failed, disabling VF!\n");
1186+ rtnl_lock();
11841187 hclgevf_notify_client(hdev, HNAE3_UNINIT_CLIENT);
11851188
11861189 rtnl_unlock();
11871190 return ret;
11881191 }
11891192
1193+ rtnl_lock();
1194+
11901195 /* now, re-initialize the nic client and ae device*/
11911196 ret = hclgevf_reset_stack(hdev);
11921197 if (ret)
drivers/net/ethernet/huawei/hinic/hinic_hw_qp.c+1−1
@@ -532,7 +532,7 @@ void hinic_task_set_inner_l3(struct hinic_sq_task *task, · 531 unmodified lines
532532 }
533533
534534 void hinic_task_set_tunnel_l4(struct hinic_sq_task *task,
535− enum hinic_l4_offload_type l4_type,
535+ enum hinic_l4_tunnel_type l4_type,
536536 u32 tunnel_len)
537537 {
538538 task->pkt_info2 |= HINIC_SQ_TASK_INFO2_SET(l4_type, TUNNEL_L4TYPE) |
drivers/net/ethernet/huawei/hinic/hinic_hw_qp.h+1−1
@@ -160,7 +160,7 @@ void hinic_task_set_inner_l3(struct hinic_sq_task *task, · 159 unmodified lines
160160 u32 network_len);
161161
162162 void hinic_task_set_tunnel_l4(struct hinic_sq_task *task,
163− enum hinic_l4_offload_type l4_type,
163+ enum hinic_l4_tunnel_type l4_type,
164164 u32 tunnel_len);
165165
166166 void hinic_set_cs_inner_l4(struct hinic_sq_task *task,
drivers/net/ethernet/intel/Kconfig+18−0
@@ -200,6 +200,15 @@ config IXGBE_DCB · 199 unmodified lines
200200
201201 If unsure, say N.
202202
203+config IXGBE_IPSEC
204+ bool "IPSec XFRM cryptography-offload acceleration"
205+ depends on IXGBE
206+ depends on XFRM_OFFLOAD
207+ default y
208+ select XFRM_ALGO
209+ ---help---
210+ Enable support for IPSec offload in ixgbe.ko
211+
203212 config IXGBEVF
204213 tristate "Intel(R) 10GbE PCI Express Virtual Function Ethernet support"
205214 depends on PCI_MSI
@@ -217,6 +226,15 @@ config IXGBEVF · 11 unmodified lines
217226 will be called ixgbevf. MSI-X interrupt support is required
218227 for this driver to work correctly.
219228
229+config IXGBEVF_IPSEC
230+ bool "IPSec XFRM cryptography-offload acceleration"
231+ depends on IXGBEVF
232+ depends on XFRM_OFFLOAD
233+ default y
234+ select XFRM_ALGO
235+ ---help---
236+ Enable support for IPSec offload in ixgbevf.ko
237+
220238 config I40E
221239 tristate "Intel(R) Ethernet Controller XL710 Family support"
222240 imply PTP_1588_CLOCK
drivers/net/ethernet/intel/fm10k/fm10k_iov.c+30−21
@@ -244,7 +244,8 @@ process_mbx: · 243 unmodified lines
244244 }
245245
246246 /* guarantee we have free space in the SM mailbox */
247− if (!hw->mbx.ops.tx_ready(&hw->mbx, FM10K_VFMBX_MSG_MTU)) {
247+ if (hw->mbx.state == FM10K_STATE_OPEN &&
248+ !hw->mbx.ops.tx_ready(&hw->mbx, FM10K_VFMBX_MSG_MTU)) {
248249 /* keep track of how many times this occurs */
249250 interface->hw_sm_mbx_full++;
250251
@@ -302,6 +303,28 @@ void fm10k_iov_suspend(struct pci_dev *pdev) · 51 unmodified lines
302303 }
303304 }
304305
306+static void fm10k_mask_aer_comp_abort(struct pci_dev *pdev)
307+{
308+ u32 err_mask;
309+ int pos;
310+
311+ pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_ERR);
312+ if (!pos)
313+ return;
314+
315+ /* Mask the completion abort bit in the ERR_UNCOR_MASK register,
316+ * preventing the device from reporting these errors to the upstream
317+ * PCIe root device. This avoids bringing down platforms which upgrade
318+ * non-fatal completer aborts into machine check exceptions. Completer
319+ * aborts can occur whenever a VF reads a queue it doesn't own.
320+ */
321+ pci_read_config_dword(pdev, pos + PCI_ERR_UNCOR_MASK, &err_mask);
322+ err_mask |= PCI_ERR_UNC_COMP_ABORT;
323+ pci_write_config_dword(pdev, pos + PCI_ERR_UNCOR_MASK, err_mask);
324+
325+ mmiowb();
326+}
327+
305328 int fm10k_iov_resume(struct pci_dev *pdev)
306329 {
307330 struct fm10k_intfc *interface = pci_get_drvdata(pdev);
@@ -317,6 +340,12 @@ int fm10k_iov_resume(struct pci_dev *pdev) · 9 unmodified lines
317340 if (!iov_data)
318341 return -ENOMEM;
319342
343+ /* Lower severity of completer abort error reporting as
344+ * the VFs can trigger this any time they read a queue
345+ * that they don't own.
346+ */
347+ fm10k_mask_aer_comp_abort(pdev);
348+
320349 /* allocate hardware resources for the VFs */
321350 hw->iov.ops.assign_resources(hw, num_vfs, num_vfs);
322351
@@ -460,20 +489,6 @@ void fm10k_iov_disable(struct pci_dev *pdev) · 137 unmodified lines
460489 fm10k_iov_free_data(pdev);
461490 }
462491
463−static void fm10k_disable_aer_comp_abort(struct pci_dev *pdev)
464−{
465− u32 err_sev;
466− int pos;
467−
468− pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_ERR);
469− if (!pos)
470− return;
471−
472− pci_read_config_dword(pdev, pos + PCI_ERR_UNCOR_SEVER, &err_sev);
473− err_sev &= ~PCI_ERR_UNC_COMP_ABORT;
474− pci_write_config_dword(pdev, pos + PCI_ERR_UNCOR_SEVER, err_sev);
475−}
476−
477492 int fm10k_iov_configure(struct pci_dev *pdev, int num_vfs)
478493 {
479494 int current_vfs = pci_num_vf(pdev);
@@ -495,12 +510,6 @@ int fm10k_iov_configure(struct pci_dev *pdev, int num_vfs) · 15 unmodified lines
495510
496511 /* allocate VFs if not already allocated */
497512 if (num_vfs && num_vfs != current_vfs) {
498− /* Disable completer abort error reporting as
499− * the VFs can trigger this any time they read a queue
500− * that they don't own.
501− */
502− fm10k_disable_aer_comp_abort(pdev);
503−
504513 err = pci_enable_sriov(pdev, num_vfs);
505514 if (err) {
506515 dev_err(&pdev->dev,
drivers/net/ethernet/intel/fm10k/fm10k_main.c+1−1
@@ -11,7 +11,7 @@ · 10 unmodified lines
1111
1212 #include "fm10k.h"
1313
14−#define DRV_VERSION "0.23.4-k"
14+#define DRV_VERSION "0.26.1-k"
1515 #define DRV_SUMMARY "Intel(R) Ethernet Switch Host Interface Driver"
1616 const char fm10k_driver_version[] = DRV_VERSION;
1717 char fm10k_driver_name[] = "fm10k";
drivers/net/ethernet/intel/fm10k/fm10k_pci.c+2−0
@@ -23,6 +23,8 @@ static const struct fm10k_info *fm10k_info_tbl[] = { · 22 unmodified lines
2323 */
2424 static const struct pci_device_id fm10k_pci_tbl[] = {
2525 { PCI_VDEVICE(INTEL, FM10K_DEV_ID_PF), fm10k_device_pf },
26+ { PCI_VDEVICE(INTEL, FM10K_DEV_ID_SDI_FM10420_QDA2), fm10k_device_pf },
27+ { PCI_VDEVICE(INTEL, FM10K_DEV_ID_SDI_FM10420_DA2), fm10k_device_pf },
2628 { PCI_VDEVICE(INTEL, FM10K_DEV_ID_VF), fm10k_device_vf },
2729 /* required last entry */
2830 { 0, }
drivers/net/ethernet/intel/fm10k/fm10k_type.h+2−0
@@ -15,6 +15,8 @@ struct fm10k_hw; · 14 unmodified lines
1515
1616 #define FM10K_DEV_ID_PF 0x15A4
1717 #define FM10K_DEV_ID_VF 0x15A5
18+#define FM10K_DEV_ID_SDI_FM10420_QDA2 0x15D0
19+#define FM10K_DEV_ID_SDI_FM10420_DA2 0x15D5
1820
1921 #define FM10K_MAX_QUEUES 256
2022 #define FM10K_MAX_QUEUES_PF 128
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c+1−1
@@ -3674,7 +3674,7 @@ int i40e_vc_process_vf_msg(struct i40e_pf *pf, s16 vf_id, u32 v_opcode, · 3673 unmodified lines
36743674 dev_err(&pf->pdev->dev, "Invalid message from VF %d, opcode %d, len %d\n",
36753675 local_vf_id, v_opcode, msglen);
36763676 switch (ret) {
3677− case VIRTCHNL_ERR_PARAM:
3677+ case VIRTCHNL_STATUS_ERR_PARAM:
36783678 return -EPERM;
36793679 default:
36803680 return -EINVAL;
drivers/net/ethernet/intel/igb/igb_ptp.c+7−1
@@ -51,9 +51,15 @@ · 50 unmodified lines
5151 *
5252 * The 40 bit 82580 SYSTIM overflows every
5353 * 2^40 * 10^-9 / 60 = 18.3 minutes.
54+ *
55+ * SYSTIM is converted to real time using a timecounter. As
56+ * timecounter_cyc2time() allows old timestamps, the timecounter
57+ * needs to be updated at least once per half of the SYSTIM interval.
58+ * Scheduling of delayed work is not very accurate, so we aim for 8
59+ * minutes to be sure the actual interval is shorter than 9.16 minutes.
5460 */
5561
56−#define IGB_SYSTIM_OVERFLOW_PERIOD (HZ * 60 * 9)
62+#define IGB_SYSTIM_OVERFLOW_PERIOD (HZ * 60 * 8)
5763 #define IGB_PTP_TX_TIMEOUT (HZ * 15)
5864 #define INCPERIOD_82576 BIT(E1000_TIMINCA_16NS_SHIFT)
5965 #define INCVALUE_82576_MASK GENMASK(E1000_TIMINCA_16NS_SHIFT - 1, 0)
drivers/net/ethernet/intel/ixgbe/Makefile+1−1
@@ -17,4 +17,4 @@ ixgbe-$(CONFIG_IXGBE_DCB) += ixgbe_dcb.o ixgbe_dcb_82598.o \ · 16 unmodified lines
1717 ixgbe-$(CONFIG_IXGBE_HWMON) += ixgbe_sysfs.o
1818 ixgbe-$(CONFIG_DEBUG_FS) += ixgbe_debugfs.o
1919 ixgbe-$(CONFIG_FCOE:m=y) += ixgbe_fcoe.o
20−ixgbe-$(CONFIG_XFRM_OFFLOAD) += ixgbe_ipsec.o
20+ixgbe-$(CONFIG_IXGBE_IPSEC) += ixgbe_ipsec.o
drivers/net/ethernet/intel/ixgbe/ixgbe.h+4−4
@@ -769,9 +769,9 @@ struct ixgbe_adapter { · 768 unmodified lines
769769 #define IXGBE_RSS_KEY_SIZE 40 /* size of RSS Hash Key in bytes */
770770 u32 *rss_key;
771771
772−#ifdef CONFIG_XFRM_OFFLOAD
772+#ifdef CONFIG_IXGBE_IPSEC
773773 struct ixgbe_ipsec *ipsec;
774−#endif /* CONFIG_XFRM_OFFLOAD */
774+#endif /* CONFIG_IXGBE_IPSEC */
775775
776776 /* AF_XDP zero-copy */
777777 struct xdp_umem **xsk_umems;
@@ -1008,7 +1008,7 @@ void ixgbe_store_key(struct ixgbe_adapter *adapter); · 230 unmodified lines
10081008 void ixgbe_store_reta(struct ixgbe_adapter *adapter);
10091009 s32 ixgbe_negotiate_fc(struct ixgbe_hw *hw, u32 adv_reg, u32 lp_reg,
10101010 u32 adv_sym, u32 adv_asm, u32 lp_sym, u32 lp_asm);
1011−#ifdef CONFIG_XFRM_OFFLOAD
1011+#ifdef CONFIG_IXGBE_IPSEC
10121012 void ixgbe_init_ipsec_offload(struct ixgbe_adapter *adapter);
10131013 void ixgbe_stop_ipsec_offload(struct ixgbe_adapter *adapter);
10141014 void ixgbe_ipsec_restore(struct ixgbe_adapter *adapter);
@@ -1036,5 +1036,5 @@ static inline int ixgbe_ipsec_vf_add_sa(struct ixgbe_adapter *adapter, · 21 unmodified lines
10361036 u32 *mbuf, u32 vf) { return -EACCES; }
10371037 static inline int ixgbe_ipsec_vf_del_sa(struct ixgbe_adapter *adapter,
10381038 u32 *mbuf, u32 vf) { return -EACCES; }
1039−#endif /* CONFIG_XFRM_OFFLOAD */
1039+#endif /* CONFIG_IXGBE_IPSEC */
10401040 #endif /* _IXGBE_H_ */
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c+3−3
@@ -8694,7 +8694,7 @@ netdev_tx_t ixgbe_xmit_frame_ring(struct sk_buff *skb, · 8693 unmodified lines
86948694
86958695 #endif /* IXGBE_FCOE */
86968696
8697−#ifdef CONFIG_XFRM_OFFLOAD
8697+#ifdef CONFIG_IXGBE_IPSEC
86988698 if (skb->sp && !ixgbe_ipsec_tx(tx_ring, first, &ipsec_tx))
86998699 goto out_drop;
87008700 #endif
@@ -10190,7 +10190,7 @@ ixgbe_features_check(struct sk_buff *skb, struct net_device *dev, · 1489 unmodified lines
1019010190 * the TSO, so it's the exception.
1019110191 */
1019210192 if (skb->encapsulation && !(features & NETIF_F_TSO_MANGLEID)) {
10193−#ifdef CONFIG_XFRM_OFFLOAD
10193+#ifdef CONFIG_IXGBE_IPSEC
1019410194 if (!skb->sp)
1019510195 #endif
1019610196 features &= ~NETIF_F_TSO;
@@ -10883,7 +10883,7 @@ skip_sriov: · 686 unmodified lines
1088310883 if (hw->mac.type >= ixgbe_mac_82599EB)
1088410884 netdev->features |= NETIF_F_SCTP_CRC;
1088510885
10886−#ifdef CONFIG_XFRM_OFFLOAD
10886+#ifdef CONFIG_IXGBE_IPSEC
1088710887 #define IXGBE_ESP_FEATURES (NETIF_F_HW_ESP | \
1088810888 NETIF_F_HW_ESP_TX_CSUM | \
1088910889 NETIF_F_GSO_ESP)
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c+3−1
@@ -722,8 +722,10 @@ static inline void ixgbe_vf_reset_event(struct ixgbe_adapter *adapter, u32 vf) · 721 unmodified lines
722722 ixgbe_set_vmvir(adapter, vfinfo->pf_vlan,
723723 adapter->default_up, vf);
724724
725− if (vfinfo->spoofchk_enabled)
725+ if (vfinfo->spoofchk_enabled) {
726726 hw->mac.ops.set_vlan_anti_spoofing(hw, true, vf);
727+ hw->mac.ops.set_mac_anti_spoofing(hw, true, vf);
728+ }
727729 }
728730
729731 /* reset multicast table array for vf */
drivers/net/ethernet/intel/ixgbevf/Makefile+1−1
@@ -10,5 +10,5 @@ ixgbevf-objs := vf.o \ · 9 unmodified lines
1010 mbx.o \
1111 ethtool.o \
1212 ixgbevf_main.o
13−ixgbevf-$(CONFIG_XFRM_OFFLOAD) += ipsec.o
13+ixgbevf-$(CONFIG_IXGBEVF_IPSEC) += ipsec.o
1414
drivers/net/ethernet/intel/ixgbevf/ixgbevf.h+2−2
@@ -459,7 +459,7 @@ int ethtool_ioctl(struct ifreq *ifr); · 458 unmodified lines
459459
460460 extern void ixgbevf_write_eitr(struct ixgbevf_q_vector *q_vector);
461461
462−#ifdef CONFIG_XFRM_OFFLOAD
462+#ifdef CONFIG_IXGBEVF_IPSEC
463463 void ixgbevf_init_ipsec_offload(struct ixgbevf_adapter *adapter);
464464 void ixgbevf_stop_ipsec_offload(struct ixgbevf_adapter *adapter);
465465 void ixgbevf_ipsec_restore(struct ixgbevf_adapter *adapter);
@@ -482,7 +482,7 @@ static inline int ixgbevf_ipsec_tx(struct ixgbevf_ring *tx_ring, · 16 unmodified lines
482482 struct ixgbevf_tx_buffer *first,
483483 struct ixgbevf_ipsec_tx_data *itd)
484484 { return 0; }
485−#endif /* CONFIG_XFRM_OFFLOAD */
485+#endif /* CONFIG_IXGBEVF_IPSEC */
486486
487487 void ixgbe_napi_add_all(struct ixgbevf_adapter *adapter);
488488 void ixgbe_napi_del_all(struct ixgbevf_adapter *adapter);
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c+1−1
@@ -4150,7 +4150,7 @@ static int ixgbevf_xmit_frame_ring(struct sk_buff *skb, · 4149 unmodified lines
41504150 first->tx_flags = tx_flags;
41514151 first->protocol = vlan_get_protocol(skb);
41524152
4153−#ifdef CONFIG_XFRM_OFFLOAD
4153+#ifdef CONFIG_IXGBEVF_IPSEC
41544154 if (skb->sp && !ixgbevf_ipsec_tx(tx_ring, first, &ipsec_tx))
41554155 goto out_drop;
41564156 #endif
drivers/net/ethernet/marvell/mvpp2/mvpp2.h+1−0
@@ -796,6 +796,7 @@ struct mvpp2_queue_vector { · 795 unmodified lines
796796 int nrxqs;
797797 u32 pending_cause_rx;
798798 struct mvpp2_port *port;
799+ struct cpumask *mask;
799800 };
800801
801802 struct mvpp2_port {
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c+14−4
@@ -3298,24 +3298,30 @@ static int mvpp2_irqs_init(struct mvpp2_port *port) · 3297 unmodified lines
32983298 for (i = 0; i < port->nqvecs; i++) {
32993299 struct mvpp2_queue_vector *qv = port->qvecs + i;
33003300
3301− if (qv->type == MVPP2_QUEUE_VECTOR_PRIVATE)
3301+ if (qv->type == MVPP2_QUEUE_VECTOR_PRIVATE) {
3302+ qv->mask = kzalloc(cpumask_size(), GFP_KERNEL);
3303+ if (!qv->mask) {
3304+ err = -ENOMEM;
3305+ goto err;
3306+ }
3307+
33023308 irq_set_status_flags(qv->irq, IRQ_NO_BALANCING);
3309+ }
33033310
33043311 err = request_irq(qv->irq, mvpp2_isr, 0, port->dev->name, qv);
33053312 if (err)
33063313 goto err;
33073314
33083315 if (qv->type == MVPP2_QUEUE_VECTOR_PRIVATE) {
3309− unsigned long mask = 0;
33103316 unsigned int cpu;
33113317
33123318 for_each_present_cpu(cpu) {
33133319 if (mvpp2_cpu_to_thread(port->priv, cpu) ==
33143320 qv->sw_thread_id)
3315− mask |= BIT(cpu);
3321+ cpumask_set_cpu(cpu, qv->mask);
33163322 }
33173323
3318− irq_set_affinity_hint(qv->irq, to_cpumask(&mask));
3324+ irq_set_affinity_hint(qv->irq, qv->mask);
33193325 }
33203326 }
33213327
@@ -3325,6 +3331,8 @@ err: · 3 unmodified lines
33253331 struct mvpp2_queue_vector *qv = port->qvecs + i;
33263332
33273333 irq_set_affinity_hint(qv->irq, NULL);
3334+ kfree(qv->mask);
3335+ qv->mask = NULL;
33283336 free_irq(qv->irq, qv);
33293337 }
33303338
@@ -3339,6 +3347,8 @@ static void mvpp2_irqs_deinit(struct mvpp2_port *port) · 8 unmodified lines
33393347 struct mvpp2_queue_vector *qv = port->qvecs + i;
33403348
33413349 irq_set_affinity_hint(qv->irq, NULL);
3350+ kfree(qv->mask);
3351+ qv->mask = NULL;
33423352 irq_clear_status_flags(qv->irq, IRQ_NO_BALANCING);
33433353 free_irq(qv->irq, qv);
33443354 }
drivers/net/ethernet/mellanox/mlx4/en_rx.c+1−0
@@ -43,6 +43,7 @@ · 42 unmodified lines
4343 #include <linux/vmalloc.h>
4444 #include <linux/irq.h>
4545
46+#include <net/ip.h>
4647 #if IS_ENABLED(CONFIG_IPV6)
4748 #include <net/ip6_checksum.h>
4849 #endif
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c+9−36
@@ -713,43 +713,15 @@ static inline void mlx5e_enable_ecn(struct mlx5e_rq *rq, struct sk_buff *skb) · 712 unmodified lines
713713 rq->stats->ecn_mark += !!rc;
714714 }
715715
716−static __be32 mlx5e_get_fcs(struct sk_buff *skb)
716+static u32 mlx5e_get_fcs(const struct sk_buff *skb)
717717 {
718− int last_frag_sz, bytes_in_prev, nr_frags;
719− u8 *fcs_p1, *fcs_p2;
720− skb_frag_t *last_frag;
721− __be32 fcs_bytes;
718+ const void *fcs_bytes;
719+ u32 _fcs_bytes;
722720
723− if (!skb_is_nonlinear(skb))
724− return *(__be32 *)(skb->data + skb->len - ETH_FCS_LEN);
721+ fcs_bytes = skb_header_pointer(skb, skb->len - ETH_FCS_LEN,
722+ ETH_FCS_LEN, &_fcs_bytes);
725723
726− nr_frags = skb_shinfo(skb)->nr_frags;
727− last_frag = &skb_shinfo(skb)->frags[nr_frags - 1];
728− last_frag_sz = skb_frag_size(last_frag);
729−
730− /* If all FCS data is in last frag */
731− if (last_frag_sz >= ETH_FCS_LEN)
732− return *(__be32 *)(skb_frag_address(last_frag) +
733− last_frag_sz - ETH_FCS_LEN);
734−
735− fcs_p2 = (u8 *)skb_frag_address(last_frag);
736− bytes_in_prev = ETH_FCS_LEN - last_frag_sz;
737−
738− /* Find where the other part of the FCS is - Linear or another frag */
739− if (nr_frags == 1) {
740− fcs_p1 = skb_tail_pointer(skb);
741− } else {
742− skb_frag_t *prev_frag = &skb_shinfo(skb)->frags[nr_frags - 2];
743−
744− fcs_p1 = skb_frag_address(prev_frag) +
745− skb_frag_size(prev_frag);
746− }
747− fcs_p1 -= bytes_in_prev;
748−
749− memcpy(&fcs_bytes, fcs_p1, bytes_in_prev);
750− memcpy(((u8 *)&fcs_bytes) + bytes_in_prev, fcs_p2, last_frag_sz);
751−
752− return fcs_bytes;
724+ return __get_unaligned_cpu32(fcs_bytes);
753725 }
754726
755727 static u8 get_ip_proto(struct sk_buff *skb, __be16 proto)
@@ -797,8 +769,9 @@ static inline void mlx5e_handle_csum(struct net_device *netdev, · 41 unmodified lines
797769 network_depth - ETH_HLEN,
798770 skb->csum);
799771 if (unlikely(netdev->features & NETIF_F_RXFCS))
800− skb->csum = csum_add(skb->csum,
801− (__force __wsum)mlx5e_get_fcs(skb));
772+ skb->csum = csum_block_add(skb->csum,
773+ (__force __wsum)mlx5e_get_fcs(skb),
774+ skb->len - ETH_FCS_LEN);
802775 stats->csum_complete++;
803776 return;
804777 }
drivers/net/ethernet/mellanox/mlxsw/core.c+17−7
@@ -943,8 +943,8 @@ static int mlxsw_devlink_core_bus_device_reload(struct devlink *devlink, · 942 unmodified lines
943943 mlxsw_core->bus,
944944 mlxsw_core->bus_priv, true,
945945 devlink);
946− if (err)
947− mlxsw_core->reload_fail = true;
946+ mlxsw_core->reload_fail = !!err;
947+
948948 return err;
949949 }
950950
@@ -1083,8 +1083,15 @@ void mlxsw_core_bus_device_unregister(struct mlxsw_core *mlxsw_core, · 132 unmodified lines
10831083 {
10841084 struct devlink *devlink = priv_to_devlink(mlxsw_core);
10851085
1086− if (mlxsw_core->reload_fail)
1087− goto reload_fail;
1086+ if (mlxsw_core->reload_fail) {
1087+ if (!reload)
1088+ /* Only the parts that were not de-initialized in the
1089+ * failed reload attempt need to be de-initialized.
1090+ */
1091+ goto reload_fail_deinit;
1092+ else
1093+ return;
1094+ }
10881095
10891096 if (mlxsw_core->driver->fini)
10901097 mlxsw_core->driver->fini(mlxsw_core);
@@ -1098,9 +1105,12 @@ void mlxsw_core_bus_device_unregister(struct mlxsw_core *mlxsw_core, · 7 unmodified lines
10981105 if (!reload)
10991106 devlink_resources_unregister(devlink, NULL);
11001107 mlxsw_core->bus->fini(mlxsw_core->bus_priv);
1101− if (reload)
1102− return;
1103−reload_fail:
1108+
1109+ return;
1110+
1111+reload_fail_deinit:
1112+ devlink_unregister(devlink);
1113+ devlink_resources_unregister(devlink, NULL);
11041114 devlink_free(devlink);
11051115 }
11061116 EXPORT_SYMBOL(mlxsw_core_bus_device_unregister);
drivers/net/ethernet/mellanox/mlxsw/reg.h+21−1
@@ -3284,7 +3284,7 @@ static inline void mlxsw_reg_qtct_pack(char *payload, u8 local_port, · 3283 unmodified lines
32843284 * Configures the ETS elements.
32853285 */
32863286 #define MLXSW_REG_QEEC_ID 0x400D
3287−#define MLXSW_REG_QEEC_LEN 0x1C
3287+#define MLXSW_REG_QEEC_LEN 0x20
32883288
32893289 MLXSW_REG_DEFINE(qeec, MLXSW_REG_QEEC_ID, MLXSW_REG_QEEC_LEN);
32903290
@@ -3326,6 +3326,15 @@ MLXSW_ITEM32(reg, qeec, element_index, 0x04, 0, 8); · 35 unmodified lines
33263326 */
33273327 MLXSW_ITEM32(reg, qeec, next_element_index, 0x08, 0, 8);
33283328
3329+/* reg_qeec_mise
3330+ * Min shaper configuration enable. Enables configuration of the min
3331+ * shaper on this ETS element
3332+ * 0 - Disable
3333+ * 1 - Enable
3334+ * Access: RW
3335+ */
3336+MLXSW_ITEM32(reg, qeec, mise, 0x0C, 31, 1);
3337+
33293338 enum {
33303339 MLXSW_REG_QEEC_BYTES_MODE,
33313340 MLXSW_REG_QEEC_PACKETS_MODE,
@@ -3342,6 +3351,17 @@ enum { · 10 unmodified lines
33423351 */
33433352 MLXSW_ITEM32(reg, qeec, pb, 0x0C, 28, 1);
33443353
3354+/* The smallest permitted min shaper rate. */
3355+#define MLXSW_REG_QEEC_MIS_MIN 200000 /* Kbps */
3356+
3357+/* reg_qeec_min_shaper_rate
3358+ * Min shaper information rate.
3359+ * For CPU port, can only be configured for port hierarchy.
3360+ * When in bytes mode, value is specified in units of 1000bps.
3361+ * Access: RW
3362+ */
3363+MLXSW_ITEM32(reg, qeec, min_shaper_rate, 0x0C, 0, 28);
3364+
33453365 /* reg_qeec_mase
33463366 * Max shaper configuration enable. Enables configuration of the max
33473367 * shaper on this ETS element.
drivers/net/ethernet/mellanox/mlxsw/spectrum.c+25−0
@@ -2740,6 +2740,21 @@ int mlxsw_sp_port_ets_maxrate_set(struct mlxsw_sp_port *mlxsw_sp_port, · 2739 unmodified lines
27402740 return mlxsw_reg_write(mlxsw_sp->core, MLXSW_REG(qeec), qeec_pl);
27412741 }
27422742
2743+static int mlxsw_sp_port_min_bw_set(struct mlxsw_sp_port *mlxsw_sp_port,
2744+ enum mlxsw_reg_qeec_hr hr, u8 index,
2745+ u8 next_index, u32 minrate)
2746+{
2747+ struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp;
2748+ char qeec_pl[MLXSW_REG_QEEC_LEN];
2749+
2750+ mlxsw_reg_qeec_pack(qeec_pl, mlxsw_sp_port->local_port, hr, index,
2751+ next_index);
2752+ mlxsw_reg_qeec_mise_set(qeec_pl, true);
2753+ mlxsw_reg_qeec_min_shaper_rate_set(qeec_pl, minrate);
2754+
2755+ return mlxsw_reg_write(mlxsw_sp->core, MLXSW_REG(qeec), qeec_pl);
2756+}
2757+
27432758 int mlxsw_sp_port_prio_tc_set(struct mlxsw_sp_port *mlxsw_sp_port,
27442759 u8 switch_prio, u8 tclass)
27452760 {
@@ -2817,6 +2832,16 @@ static int mlxsw_sp_port_ets_init(struct mlxsw_sp_port *mlxsw_sp_port) · 71 unmodified lines
28172832 return err;
28182833 }
28192834
2835+ /* Configure the min shaper for multicast TCs. */
2836+ for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) {
2837+ err = mlxsw_sp_port_min_bw_set(mlxsw_sp_port,
2838+ MLXSW_REG_QEEC_HIERARCY_TC,
2839+ i + 8, i,
2840+ MLXSW_REG_QEEC_MIS_MIN);
2841+ if (err)
2842+ return err;
2843+ }
2844+
28202845 /* Map all priorities to traffic class 0. */
28212846 for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) {
28222847 err = mlxsw_sp_port_prio_tc_set(mlxsw_sp_port, i, 0);
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c+0−2
@@ -2661,8 +2661,6 @@ static void mlxsw_sp_switchdev_bridge_fdb_event_work(struct work_struct *work) · 2660 unmodified lines
26612661 break;
26622662 case SWITCHDEV_FDB_DEL_TO_DEVICE:
26632663 fdb_info = &switchdev_work->fdb_info;
2664− if (!fdb_info->added_by_user)
2665− break;
26662664 mlxsw_sp_port_fdb_set(mlxsw_sp_port, fdb_info, false);
26672665 break;
26682666 case SWITCHDEV_FDB_ADD_TO_BRIDGE: /* fall through */
drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c+1−1
@@ -243,7 +243,7 @@ static int stmmac_mdio_write(struct mii_bus *bus, int phyaddr, int phyreg, · 242 unmodified lines
243243 */
244244 int stmmac_mdio_reset(struct mii_bus *bus)
245245 {
246−#if defined(CONFIG_STMMAC_PLATFORM)
246+#if IS_ENABLED(CONFIG_STMMAC_PLATFORM)
247247 struct net_device *ndev = bus->priv;
248248 struct stmmac_priv *priv = netdev_priv(ndev);
249249 unsigned int mii_address = priv->hw->mii.addr;
drivers/vhost/vhost.c+2−0
@@ -30,6 +30,7 @@ · 29 unmodified lines
3030 #include <linux/sched/mm.h>
3131 #include <linux/sched/signal.h>
3232 #include <linux/interval_tree_generic.h>
33+#include <linux/nospec.h>
3334
3435 #include "vhost.h"
3536
@@ -1387,6 +1388,7 @@ long vhost_vring_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *arg · 1351 unmodified lines
13871388 if (idx >= d->nvqs)
13881389 return -ENOBUFS;
13891390
1391+ idx = array_index_nospec(idx, d->nvqs);
13901392 vq = d->vqs[idx];
13911393
13921394 mutex_lock(&vq->mutex);
include/linux/avf/virtchnl.h+9−3
@@ -62,13 +62,19 @@ · 61 unmodified lines
6262 /* Error Codes */
6363 enum virtchnl_status_code {
6464 VIRTCHNL_STATUS_SUCCESS = 0,
65− VIRTCHNL_ERR_PARAM = -5,
65+ VIRTCHNL_STATUS_ERR_PARAM = -5,
66+ VIRTCHNL_STATUS_ERR_NO_MEMORY = -18,
6667 VIRTCHNL_STATUS_ERR_OPCODE_MISMATCH = -38,
6768 VIRTCHNL_STATUS_ERR_CQP_COMPL_ERROR = -39,
6869 VIRTCHNL_STATUS_ERR_INVALID_VF_ID = -40,
69− VIRTCHNL_STATUS_NOT_SUPPORTED = -64,
70+ VIRTCHNL_STATUS_ERR_ADMIN_QUEUE_ERROR = -53,
71+ VIRTCHNL_STATUS_ERR_NOT_SUPPORTED = -64,
7072 };
7173
74+/* Backward compatibility */
75+#define VIRTCHNL_ERR_PARAM VIRTCHNL_STATUS_ERR_PARAM
76+#define VIRTCHNL_STATUS_NOT_SUPPORTED VIRTCHNL_STATUS_ERR_NOT_SUPPORTED
77+
7278 #define VIRTCHNL_LINK_SPEED_100MB_SHIFT 0x1
7379 #define VIRTCHNL_LINK_SPEED_1000MB_SHIFT 0x2
7480 #define VIRTCHNL_LINK_SPEED_10GB_SHIFT 0x3
@@ -831,7 +837,7 @@ virtchnl_vc_validate_vf_msg(struct virtchnl_version_info *ver, u32 v_opcode, · 756 unmodified lines
831837 case VIRTCHNL_OP_EVENT:
832838 case VIRTCHNL_OP_UNKNOWN:
833839 default:
834− return VIRTCHNL_ERR_PARAM;
840+ return VIRTCHNL_STATUS_ERR_PARAM;
835841 }
836842 /* few more checks */
837843 if (err_msg_format || valid_len != msglen)
include/linux/bpf_verifier.h+3−0
@@ -51,6 +51,9 @@ struct bpf_reg_state { · 50 unmodified lines
5151 * PTR_TO_MAP_VALUE_OR_NULL
5252 */
5353 struct bpf_map *map_ptr;
54+
55+ /* Max size from any of the above. */
56+ unsigned long raw;
5457 };
5558 /* Fixed part of pointer offset, pointer types only */
5659 s32 off;
include/linux/inetdevice.h+3−1
@@ -37,7 +37,9 @@ struct in_device { · 36 unmodified lines
3737 unsigned long mr_v1_seen;
3838 unsigned long mr_v2_seen;
3939 unsigned long mr_maxdelay;
40− unsigned char mr_qrv;
40+ unsigned long mr_qi; /* Query Interval */
41+ unsigned long mr_qri; /* Query Response Interval */
42+ unsigned char mr_qrv; /* Query Robustness Variable */
4143 unsigned char mr_gq_running;
4244 unsigned char mr_ifc_count;
4345 struct timer_list mr_gq_timer; /* general query timer */
include/net/af_unix.h+2−2
@@ -13,7 +13,7 @@ void unix_notinflight(struct user_struct *user, struct file *fp); · 12 unmodified lines
1313 void unix_gc(void);
1414 void wait_for_unix_gc(void);
1515 struct sock *unix_get_socket(struct file *filp);
16−struct sock *unix_peer_get(struct sock *);
16+struct sock *unix_peer_get(struct sock *sk);
1717
1818 #define UNIX_HASH_SIZE 256
1919 #define UNIX_HASH_BITS 8
@@ -40,7 +40,7 @@ struct unix_skb_parms { · 20 unmodified lines
4040 u32 consumed;
4141 } __randomize_layout;
4242
43−#define UNIXCB(skb) (*(struct unix_skb_parms *)&((skb)->cb))
43+#define UNIXCB(skb) (*(struct unix_skb_parms *)&((skb)->cb))
4444
4545 #define unix_state_lock(s) spin_lock(&unix_sk(s)->lock)
4646 #define unix_state_unlock(s) spin_unlock(&unix_sk(s)->lock)
kernel/bpf/verifier.c+12−9
@@ -2852,10 +2852,6 @@ static int check_helper_call(struct bpf_verifier_env *env, int func_id, int insn · 2851 unmodified lines
28522852 regs[BPF_REG_0].type = NOT_INIT;
28532853 } else if (fn->ret_type == RET_PTR_TO_MAP_VALUE_OR_NULL ||
28542854 fn->ret_type == RET_PTR_TO_MAP_VALUE) {
2855− if (fn->ret_type == RET_PTR_TO_MAP_VALUE)
2856− regs[BPF_REG_0].type = PTR_TO_MAP_VALUE;
2857− else
2858− regs[BPF_REG_0].type = PTR_TO_MAP_VALUE_OR_NULL;
28592855 /* There is no offset yet applied, variable or fixed */
28602856 mark_reg_known_zero(env, regs, BPF_REG_0);
28612857 /* remember map_ptr, so that check_map_access()
@@ -2868,7 +2864,12 @@ static int check_helper_call(struct bpf_verifier_env *env, int func_id, int insn · 6 unmodified lines
28682864 return -EINVAL;
28692865 }
28702866 regs[BPF_REG_0].map_ptr = meta.map_ptr;
2871− regs[BPF_REG_0].id = ++env->id_gen;
2867+ if (fn->ret_type == RET_PTR_TO_MAP_VALUE) {
2868+ regs[BPF_REG_0].type = PTR_TO_MAP_VALUE;
2869+ } else {
2870+ regs[BPF_REG_0].type = PTR_TO_MAP_VALUE_OR_NULL;
2871+ regs[BPF_REG_0].id = ++env->id_gen;
2872+ }
28722873 } else if (fn->ret_type == RET_PTR_TO_SOCKET_OR_NULL) {
28732874 int id = acquire_reference_state(env, insn_idx);
28742875 if (id < 0)
@@ -3046,7 +3047,7 @@ static int adjust_ptr_min_max_vals(struct bpf_verifier_env *env, · 171 unmodified lines
30463047 dst_reg->umax_value = umax_ptr;
30473048 dst_reg->var_off = ptr_reg->var_off;
30483049 dst_reg->off = ptr_reg->off + smin_val;
3049− dst_reg->range = ptr_reg->range;
3050+ dst_reg->raw = ptr_reg->raw;
30503051 break;
30513052 }
30523053 /* A new variable offset is created. Note that off_reg->off
@@ -3076,10 +3077,11 @@ static int adjust_ptr_min_max_vals(struct bpf_verifier_env *env, · 23 unmodified lines
30763077 }
30773078 dst_reg->var_off = tnum_add(ptr_reg->var_off, off_reg->var_off);
30783079 dst_reg->off = ptr_reg->off;
3080+ dst_reg->raw = ptr_reg->raw;
30793081 if (reg_is_pkt_pointer(ptr_reg)) {
30803082 dst_reg->id = ++env->id_gen;
30813083 /* something was added to pkt_ptr, set range to zero */
3082− dst_reg->range = 0;
3084+ dst_reg->raw = 0;
30833085 }
30843086 break;
30853087 case BPF_SUB:
@@ -3108,7 +3110,7 @@ static int adjust_ptr_min_max_vals(struct bpf_verifier_env *env, · 22 unmodified lines
31083110 dst_reg->var_off = ptr_reg->var_off;
31093111 dst_reg->id = ptr_reg->id;
31103112 dst_reg->off = ptr_reg->off - smin_val;
3111− dst_reg->range = ptr_reg->range;
3113+ dst_reg->raw = ptr_reg->raw;
31123114 break;
31133115 }
31143116 /* A new variable offset is created. If the subtrahend is known
@@ -3134,11 +3136,12 @@ static int adjust_ptr_min_max_vals(struct bpf_verifier_env *env, · 19 unmodified lines
31343136 }
31353137 dst_reg->var_off = tnum_sub(ptr_reg->var_off, off_reg->var_off);
31363138 dst_reg->off = ptr_reg->off;
3139+ dst_reg->raw = ptr_reg->raw;
31373140 if (reg_is_pkt_pointer(ptr_reg)) {
31383141 dst_reg->id = ++env->id_gen;
31393142 /* something was added to pkt_ptr, set range to zero */
31403143 if (smin_val < 0)
3141− dst_reg->range = 0;
3144+ dst_reg->raw = 0;
31423145 }
31433146 break;
31443147 case BPF_AND:
net/core/rtnetlink.c+10−0
@@ -3600,6 +3600,11 @@ static int rtnl_fdb_add(struct sk_buff *skb, struct nlmsghdr *nlh, · 3599 unmodified lines
36003600 return -EINVAL;
36013601 }
36023602
3603+ if (dev->type != ARPHRD_ETHER) {
3604+ NL_SET_ERR_MSG(extack, "FDB add only supported for Ethernet devices");
3605+ return -EINVAL;
3606+ }
3607+
36033608 addr = nla_data(tb[NDA_LLADDR]);
36043609
36053610 err = fdb_vid_parse(tb[NDA_VLAN], &vid, extack);
@@ -3704,6 +3709,11 @@ static int rtnl_fdb_del(struct sk_buff *skb, struct nlmsghdr *nlh, · 98 unmodified lines
37043709 return -EINVAL;
37053710 }
37063711
3712+ if (dev->type != ARPHRD_ETHER) {
3713+ NL_SET_ERR_MSG(extack, "FDB delete only supported for Ethernet devices");
3714+ return -EINVAL;
3715+ }
3716+
37073717 addr = nla_data(tb[NDA_LLADDR]);
37083718
37093719 err = fdb_vid_parse(tb[NDA_VLAN], &vid, extack);
net/ipv4/igmp.c+36−17
@@ -111,13 +111,10 @@ · 110 unmodified lines
111111 #ifdef CONFIG_IP_MULTICAST
112112 /* Parameter names and values are taken from igmp-v2-06 draft */
113113
114−#define IGMP_V1_ROUTER_PRESENT_TIMEOUT (400*HZ)
115−#define IGMP_V2_ROUTER_PRESENT_TIMEOUT (400*HZ)
116114 #define IGMP_V2_UNSOLICITED_REPORT_INTERVAL (10*HZ)
117115 #define IGMP_V3_UNSOLICITED_REPORT_INTERVAL (1*HZ)
116+#define IGMP_QUERY_INTERVAL (125*HZ)
118117 #define IGMP_QUERY_RESPONSE_INTERVAL (10*HZ)
119−#define IGMP_QUERY_ROBUSTNESS_VARIABLE 2
120−
121118
122119 #define IGMP_INITIAL_REPORT_DELAY (1)
123120
@@ -935,13 +932,15 @@ static bool igmp_heard_query(struct in_device *in_dev, struct sk_buff *skb, · 811 unmodified lines
935932
936933 max_delay = IGMP_QUERY_RESPONSE_INTERVAL;
937934 in_dev->mr_v1_seen = jiffies +
938− IGMP_V1_ROUTER_PRESENT_TIMEOUT;
935+ (in_dev->mr_qrv * in_dev->mr_qi) +
936+ in_dev->mr_qri;
939937 group = 0;
940938 } else {
941939 /* v2 router present */
942940 max_delay = ih->code*(HZ/IGMP_TIMER_SCALE);
943941 in_dev->mr_v2_seen = jiffies +
944− IGMP_V2_ROUTER_PRESENT_TIMEOUT;
942+ (in_dev->mr_qrv * in_dev->mr_qi) +
943+ in_dev->mr_qri;
945944 }
946945 /* cancel the interface change timer */
947946 in_dev->mr_ifc_count = 0;
@@ -981,8 +980,21 @@ static bool igmp_heard_query(struct in_device *in_dev, struct sk_buff *skb, · 33 unmodified lines
981980 if (!max_delay)
982981 max_delay = 1; /* can't mod w/ 0 */
983982 in_dev->mr_maxdelay = max_delay;
984− if (ih3->qrv)
985− in_dev->mr_qrv = ih3->qrv;
983+
984+ /* RFC3376, 4.1.6. QRV and 4.1.7. QQIC, when the most recently
985+ * received value was zero, use the default or statically
986+ * configured value.
987+ */
988+ in_dev->mr_qrv = ih3->qrv ?: net->ipv4.sysctl_igmp_qrv;
989+ in_dev->mr_qi = IGMPV3_QQIC(ih3->qqic)*HZ ?: IGMP_QUERY_INTERVAL;
990+
991+ /* RFC3376, 8.3. Query Response Interval:
992+ * The number of seconds represented by the [Query Response
993+ * Interval] must be less than the [Query Interval].
994+ */
995+ if (in_dev->mr_qri >= in_dev->mr_qi)
996+ in_dev->mr_qri = (in_dev->mr_qi/HZ - 1)*HZ;
997+
986998 if (!group) { /* general query */
987999 if (ih3->nsrcs)
9881000 return true; /* no sources allowed */
@@ -1723,18 +1735,30 @@ void ip_mc_down(struct in_device *in_dev) · 734 unmodified lines
17231735 ip_mc_dec_group(in_dev, IGMP_ALL_HOSTS);
17241736 }
17251737
1726−void ip_mc_init_dev(struct in_device *in_dev)
1727−{
17281738 #ifdef CONFIG_IP_MULTICAST
1739+static void ip_mc_reset(struct in_device *in_dev)
1740+{
17291741 struct net *net = dev_net(in_dev->dev);
1742+
1743+ in_dev->mr_qi = IGMP_QUERY_INTERVAL;
1744+ in_dev->mr_qri = IGMP_QUERY_RESPONSE_INTERVAL;
1745+ in_dev->mr_qrv = net->ipv4.sysctl_igmp_qrv;
1746+}
1747+#else
1748+static void ip_mc_reset(struct in_device *in_dev)
1749+{
1750+}
17301751 #endif
1752+
1753+void ip_mc_init_dev(struct in_device *in_dev)
1754+{
17311755 ASSERT_RTNL();
17321756
17331757 #ifdef CONFIG_IP_MULTICAST
17341758 timer_setup(&in_dev->mr_gq_timer, igmp_gq_timer_expire, 0);
17351759 timer_setup(&in_dev->mr_ifc_timer, igmp_ifc_timer_expire, 0);
1736− in_dev->mr_qrv = net->ipv4.sysctl_igmp_qrv;
17371760 #endif
1761+ ip_mc_reset(in_dev);
17381762
17391763 spin_lock_init(&in_dev->mc_tomb_lock);
17401764 }
@@ -1744,15 +1768,10 @@ void ip_mc_init_dev(struct in_device *in_dev) · 3 unmodified lines
17441768 void ip_mc_up(struct in_device *in_dev)
17451769 {
17461770 struct ip_mc_list *pmc;
1747−#ifdef CONFIG_IP_MULTICAST
1748− struct net *net = dev_net(in_dev->dev);
1749−#endif
17501771
17511772 ASSERT_RTNL();
17521773
1753−#ifdef CONFIG_IP_MULTICAST
1754− in_dev->mr_qrv = net->ipv4.sysctl_igmp_qrv;
1755−#endif
1774+ ip_mc_reset(in_dev);
17561775 ip_mc_inc_group(in_dev, IGMP_ALL_HOSTS);
17571776
17581777 for_each_pmc_rtnl(in_dev, pmc) {
net/ipv4/tcp_bpf.c+1−0
@@ -145,6 +145,7 @@ msg_bytes_ready: · 144 unmodified lines
145145 ret = err;
146146 goto out;
147147 }
148+ copied = -EAGAIN;
148149 }
149150 ret = copied;
150151 out:
net/openvswitch/flow_netlink.c+2−2
@@ -3030,7 +3030,7 @@ static int __ovs_nla_copy_actions(struct net *net, const struct nlattr *attr, · 3029 unmodified lines
30303030 * is already present */
30313031 if (mac_proto != MAC_PROTO_NONE)
30323032 return -EINVAL;
3033− mac_proto = MAC_PROTO_NONE;
3033+ mac_proto = MAC_PROTO_ETHERNET;
30343034 break;
30353035
30363036 case OVS_ACTION_ATTR_POP_ETH:
@@ -3038,7 +3038,7 @@ static int __ovs_nla_copy_actions(struct net *net, const struct nlattr *attr, · 1 unmodified line
30383038 return -EINVAL;
30393039 if (vlan_tci & htons(VLAN_TAG_PRESENT))
30403040 return -EINVAL;
3041− mac_proto = MAC_PROTO_ETHERNET;
3041+ mac_proto = MAC_PROTO_NONE;
30423042 break;
30433043
30443044 case OVS_ACTION_ATTR_PUSH_NSH:
net/sctp/associola.c+7−3
@@ -499,8 +499,9 @@ void sctp_assoc_set_primary(struct sctp_association *asoc, · 498 unmodified lines
499499 void sctp_assoc_rm_peer(struct sctp_association *asoc,
500500 struct sctp_transport *peer)
501501 {
502− struct list_head *pos;
503− struct sctp_transport *transport;
502+ struct sctp_transport *transport;
503+ struct list_head *pos;
504+ struct sctp_chunk *ch;
504505
505506 pr_debug("%s: association:%p addr:%pISpc\n",
506507 __func__, asoc, &peer->ipaddr.sa);
@@ -564,7 +565,6 @@ void sctp_assoc_rm_peer(struct sctp_association *asoc, · 57 unmodified lines
564565 */
565566 if (!list_empty(&peer->transmitted)) {
566567 struct sctp_transport *active = asoc->peer.active_path;
567− struct sctp_chunk *ch;
568568
569569 /* Reset the transport of each chunk on this list */
570570 list_for_each_entry(ch, &peer->transmitted,
@@ -586,6 +586,10 @@ void sctp_assoc_rm_peer(struct sctp_association *asoc, · 15 unmodified lines
586586 sctp_transport_hold(active);
587587 }
588588
589+ list_for_each_entry(ch, &asoc->outqueue.out_chunk_list, list)
590+ if (ch->transport == peer)
591+ ch->transport = NULL;
592+
589593 asoc->peer.transport_count--;
590594
591595 sctp_transport_free(peer);
net/sctp/socket.c+5−3
@@ -7083,14 +7083,15 @@ static int sctp_getsockopt_pr_assocstatus(struct sock *sk, int len, · 7082 unmodified lines
70837083 }
70847084
70857085 policy = params.sprstat_policy;
7086− if (!policy || (policy & ~(SCTP_PR_SCTP_MASK | SCTP_PR_SCTP_ALL)))
7086+ if (!policy || (policy & ~(SCTP_PR_SCTP_MASK | SCTP_PR_SCTP_ALL)) ||
7087+ ((policy & SCTP_PR_SCTP_ALL) && (policy & SCTP_PR_SCTP_MASK)))
70877088 goto out;
70887089
70897090 asoc = sctp_id2assoc(sk, params.sprstat_assoc_id);
70907091 if (!asoc)
70917092 goto out;
70927093
7093− if (policy & SCTP_PR_SCTP_ALL) {
7094+ if (policy == SCTP_PR_SCTP_ALL) {
70947095 params.sprstat_abandoned_unsent = 0;
70957096 params.sprstat_abandoned_sent = 0;
70967097 for (policy = 0; policy <= SCTP_PR_INDEX(MAX); policy++) {
@@ -7142,7 +7143,8 @@ static int sctp_getsockopt_pr_streamstatus(struct sock *sk, int len, · 45 unmodified lines
71427143 }
71437144
71447145 policy = params.sprstat_policy;
7145− if (!policy || (policy & ~(SCTP_PR_SCTP_MASK | SCTP_PR_SCTP_ALL)))
7146+ if (!policy || (policy & ~(SCTP_PR_SCTP_MASK | SCTP_PR_SCTP_ALL)) ||
7147+ ((policy & SCTP_PR_SCTP_ALL) && (policy & SCTP_PR_SCTP_MASK)))
71467148 goto out;
71477149
71487150 asoc = sctp_id2assoc(sk, params.sprstat_assoc_id);
net/xfrm/Kconfig+0−1
@@ -8,7 +8,6 @@ config XFRM · 7 unmodified lines
88
99 config XFRM_OFFLOAD
1010 bool
11− depends on XFRM
1211
1312 config XFRM_ALGO
1413 tristate
tools/lib/bpf/libbpf.c+7−6
@@ -2084,19 +2084,19 @@ void bpf_program__set_expected_attach_type(struct bpf_program *prog, · 2083 unmodified lines
20842084 prog->expected_attach_type = type;
20852085 }
20862086
2087−#define BPF_PROG_SEC_IMPL(string, ptype, eatype, atype) \
2088− { string, sizeof(string) - 1, ptype, eatype, atype }
2087+#define BPF_PROG_SEC_IMPL(string, ptype, eatype, is_attachable, atype) \
2088+ { string, sizeof(string) - 1, ptype, eatype, is_attachable, atype }
20892089
20902090 /* Programs that can NOT be attached. */
2091−#define BPF_PROG_SEC(string, ptype) BPF_PROG_SEC_IMPL(string, ptype, 0, -EINVAL)
2091+#define BPF_PROG_SEC(string, ptype) BPF_PROG_SEC_IMPL(string, ptype, 0, 0, 0)
20922092
20932093 /* Programs that can be attached. */
20942094 #define BPF_APROG_SEC(string, ptype, atype) \
2095− BPF_PROG_SEC_IMPL(string, ptype, 0, atype)
2095+ BPF_PROG_SEC_IMPL(string, ptype, 0, 1, atype)
20962096
20972097 /* Programs that must specify expected attach type at load time. */
20982098 #define BPF_EAPROG_SEC(string, ptype, eatype) \
2099− BPF_PROG_SEC_IMPL(string, ptype, eatype, eatype)
2099+ BPF_PROG_SEC_IMPL(string, ptype, eatype, 1, eatype)
21002100
21012101 /* Programs that can be attached but attach type can't be identified by section
21022102 * name. Kept for backward compatibility.
@@ -2108,6 +2108,7 @@ static const struct { · 5 unmodified lines
21082108 size_t len;
21092109 enum bpf_prog_type prog_type;
21102110 enum bpf_attach_type expected_attach_type;
2111+ int is_attachable;
21112112 enum bpf_attach_type attach_type;
21122113 } section_names[] = {
21132114 BPF_PROG_SEC("socket", BPF_PROG_TYPE_SOCKET_FILTER),
@@ -2198,7 +2199,7 @@ int libbpf_attach_type_by_name(const char *name, · 84 unmodified lines
21982199 for (i = 0; i < ARRAY_SIZE(section_names); i++) {
21992200 if (strncmp(name, section_names[i].sec, section_names[i].len))
22002201 continue;
2201− if (section_names[i].attach_type == -EINVAL)
2202+ if (!section_names[i].is_attachable)
22022203 return -EINVAL;
22032204 *attach_type = section_names[i].attach_type;
22042205 return 0;
tools/testing/selftests/bpf/flow_dissector_load.c+2−0
@@ -11,6 +11,8 @@ · 10 unmodified lines
1111 #include <bpf/bpf.h>
1212 #include <bpf/libbpf.h>
1313
14+#include "bpf_rlimit.h"
15+
1416 const char *cfg_pin_path = "/sys/fs/bpf/flow_dissector";
1517 const char *cfg_map_name = "jmp_table";
1618 bool cfg_attach = true;
tools/testing/selftests/bpf/test_skb_cgroup_id.sh+2−1
@@ -10,7 +10,7 @@ wait_for_ip() · 9 unmodified lines
1010 echo -n "Wait for testing link-local IP to become available "
1111 for _i in $(seq ${MAX_PING_TRIES}); do
1212 echo -n "."
13− if ping -6 -q -c 1 -W 1 ff02::1%${TEST_IF} >/dev/null 2>&1; then
13+ if $PING6 -c 1 -W 1 ff02::1%${TEST_IF} >/dev/null 2>&1; then
1414 echo " OK"
1515 return
1616 fi
@@ -58,5 +58,6 @@ BPF_PROG_OBJ="${DIR}/test_skb_cgroup_id_kern.o" · 41 unmodified lines
5858 BPF_PROG_SECTION="cgroup_id_logger"
5959 BPF_PROG_ID=0
6060 PROG="${DIR}/test_skb_cgroup_id_user"
61+type ping6 >/dev/null 2>&1 && PING6="ping6" || PING6="ping -6"
6162
6263 main
tools/testing/selftests/bpf/test_sock_addr.sh+2−1
@@ -4,7 +4,8 @@ set -eu · 3 unmodified lines
44
55 ping_once()
66 {
7− ping -${1} -q -c 1 -W 1 ${2%%/*} >/dev/null 2>&1
7+ type ping${1} >/dev/null 2>&1 && PING="ping${1}" || PING="ping -${1}"
8+ $PING -q -c 1 -W 1 ${2%%/*} >/dev/null 2>&1
89 }
910
1011 wait_for_ip()
tools/testing/selftests/bpf/test_verifier.c+290−31
@@ -76,7 +76,7 @@ struct bpf_test { · 75 unmodified lines
7676 int fixup_percpu_cgroup_storage[MAX_FIXUPS];
7777 const char *errstr;
7878 const char *errstr_unpriv;
79− uint32_t retval;
79+ uint32_t retval, retval_unpriv;
8080 enum {
8181 UNDEF,
8282 ACCEPT,
@@ -3084,6 +3084,8 @@ static struct bpf_test tests[] = { · 3001 unmodified lines
30843084 .fixup_prog1 = { 2 },
30853085 .result = ACCEPT,
30863086 .retval = 42,
3087+ /* Verifier rewrite for unpriv skips tail call here. */
3088+ .retval_unpriv = 2,
30873089 },
30883090 {
30893091 "stack pointer arithmetic",
@@ -6454,6 +6456,256 @@ static struct bpf_test tests[] = { · 3364 unmodified lines
64546456 .errstr = "R1 min value is negative",
64556457 .prog_type = BPF_PROG_TYPE_TRACEPOINT,
64566458 },
6459+ {
6460+ "map access: known scalar += value_ptr",
6461+ .insns = {
6462+ BPF_ST_MEM(BPF_DW, BPF_REG_10, -8, 0),
6463+ BPF_MOV64_REG(BPF_REG_2, BPF_REG_10),
6464+ BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8),
6465+ BPF_LD_MAP_FD(BPF_REG_1, 0),
6466+ BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0,
6467+ BPF_FUNC_map_lookup_elem),
6468+ BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 3),
6469+ BPF_MOV64_IMM(BPF_REG_1, 4),
6470+ BPF_ALU64_REG(BPF_ADD, BPF_REG_1, BPF_REG_0),
6471+ BPF_LDX_MEM(BPF_B, BPF_REG_0, BPF_REG_1, 0),
6472+ BPF_MOV64_IMM(BPF_REG_0, 1),
6473+ BPF_EXIT_INSN(),
6474+ },
6475+ .fixup_map_array_48b = { 3 },
6476+ .result = ACCEPT,
6477+ .retval = 1,
6478+ },
6479+ {
6480+ "map access: value_ptr += known scalar",
6481+ .insns = {
6482+ BPF_ST_MEM(BPF_DW, BPF_REG_10, -8, 0),
6483+ BPF_MOV64_REG(BPF_REG_2, BPF_REG_10),
6484+ BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8),
6485+ BPF_LD_MAP_FD(BPF_REG_1, 0),
6486+ BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0,
6487+ BPF_FUNC_map_lookup_elem),
6488+ BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 3),
6489+ BPF_MOV64_IMM(BPF_REG_1, 4),
6490+ BPF_ALU64_REG(BPF_ADD, BPF_REG_0, BPF_REG_1),
6491+ BPF_LDX_MEM(BPF_B, BPF_REG_1, BPF_REG_0, 0),
6492+ BPF_MOV64_IMM(BPF_REG_0, 1),
6493+ BPF_EXIT_INSN(),
6494+ },
6495+ .fixup_map_array_48b = { 3 },
6496+ .result = ACCEPT,
6497+ .retval = 1,
6498+ },
6499+ {
6500+ "map access: unknown scalar += value_ptr",
6501+ .insns = {
6502+ BPF_ST_MEM(BPF_DW, BPF_REG_10, -8, 0),
6503+ BPF_MOV64_REG(BPF_REG_2, BPF_REG_10),
6504+ BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8),
6505+ BPF_LD_MAP_FD(BPF_REG_1, 0),
6506+ BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0,
6507+ BPF_FUNC_map_lookup_elem),
6508+ BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 4),
6509+ BPF_LDX_MEM(BPF_B, BPF_REG_1, BPF_REG_0, 0),
6510+ BPF_ALU64_IMM(BPF_AND, BPF_REG_1, 0xf),
6511+ BPF_ALU64_REG(BPF_ADD, BPF_REG_1, BPF_REG_0),
6512+ BPF_LDX_MEM(BPF_B, BPF_REG_0, BPF_REG_1, 0),
6513+ BPF_MOV64_IMM(BPF_REG_0, 1),
6514+ BPF_EXIT_INSN(),
6515+ },
6516+ .fixup_map_array_48b = { 3 },
6517+ .result = ACCEPT,
6518+ .retval = 1,
6519+ },
6520+ {
6521+ "map access: value_ptr += unknown scalar",
6522+ .insns = {
6523+ BPF_ST_MEM(BPF_DW, BPF_REG_10, -8, 0),
6524+ BPF_MOV64_REG(BPF_REG_2, BPF_REG_10),
6525+ BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8),
6526+ BPF_LD_MAP_FD(BPF_REG_1, 0),
6527+ BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0,
6528+ BPF_FUNC_map_lookup_elem),
6529+ BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 4),
6530+ BPF_LDX_MEM(BPF_B, BPF_REG_1, BPF_REG_0, 0),
6531+ BPF_ALU64_IMM(BPF_AND, BPF_REG_1, 0xf),
6532+ BPF_ALU64_REG(BPF_ADD, BPF_REG_0, BPF_REG_1),
6533+ BPF_LDX_MEM(BPF_B, BPF_REG_1, BPF_REG_0, 0),
6534+ BPF_MOV64_IMM(BPF_REG_0, 1),
6535+ BPF_EXIT_INSN(),
6536+ },
6537+ .fixup_map_array_48b = { 3 },
6538+ .result = ACCEPT,
6539+ .retval = 1,
6540+ },
6541+ {
6542+ "map access: value_ptr += value_ptr",
6543+ .insns = {
6544+ BPF_ST_MEM(BPF_DW, BPF_REG_10, -8, 0),
6545+ BPF_MOV64_REG(BPF_REG_2, BPF_REG_10),
6546+ BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8),
6547+ BPF_LD_MAP_FD(BPF_REG_1, 0),
6548+ BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0,
6549+ BPF_FUNC_map_lookup_elem),
6550+ BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 2),
6551+ BPF_ALU64_REG(BPF_ADD, BPF_REG_0, BPF_REG_0),
6552+ BPF_LDX_MEM(BPF_B, BPF_REG_1, BPF_REG_0, 0),
6553+ BPF_MOV64_IMM(BPF_REG_0, 1),
6554+ BPF_EXIT_INSN(),
6555+ },
6556+ .fixup_map_array_48b = { 3 },
6557+ .result = REJECT,
6558+ .errstr = "R0 pointer += pointer prohibited",
6559+ },
6560+ {
6561+ "map access: known scalar -= value_ptr",
6562+ .insns = {
6563+ BPF_ST_MEM(BPF_DW, BPF_REG_10, -8, 0),
6564+ BPF_MOV64_REG(BPF_REG_2, BPF_REG_10),
6565+ BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8),
6566+ BPF_LD_MAP_FD(BPF_REG_1, 0),
6567+ BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0,
6568+ BPF_FUNC_map_lookup_elem),
6569+ BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 3),
6570+ BPF_MOV64_IMM(BPF_REG_1, 4),
6571+ BPF_ALU64_REG(BPF_SUB, BPF_REG_1, BPF_REG_0),
6572+ BPF_LDX_MEM(BPF_B, BPF_REG_0, BPF_REG_1, 0),
6573+ BPF_MOV64_IMM(BPF_REG_0, 1),
6574+ BPF_EXIT_INSN(),
6575+ },
6576+ .fixup_map_array_48b = { 3 },
6577+ .result = REJECT,
6578+ .errstr = "R1 tried to subtract pointer from scalar",
6579+ },
6580+ {
6581+ "map access: value_ptr -= known scalar",
6582+ .insns = {
6583+ BPF_ST_MEM(BPF_DW, BPF_REG_10, -8, 0),
6584+ BPF_MOV64_REG(BPF_REG_2, BPF_REG_10),
6585+ BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8),
6586+ BPF_LD_MAP_FD(BPF_REG_1, 0),
6587+ BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0,
6588+ BPF_FUNC_map_lookup_elem),
6589+ BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 3),
6590+ BPF_MOV64_IMM(BPF_REG_1, 4),
6591+ BPF_ALU64_REG(BPF_SUB, BPF_REG_0, BPF_REG_1),
6592+ BPF_LDX_MEM(BPF_B, BPF_REG_1, BPF_REG_0, 0),
6593+ BPF_MOV64_IMM(BPF_REG_0, 1),
6594+ BPF_EXIT_INSN(),
6595+ },
6596+ .fixup_map_array_48b = { 3 },
6597+ .result = REJECT,
6598+ .errstr = "R0 min value is outside of the array range",
6599+ },
6600+ {
6601+ "map access: value_ptr -= known scalar, 2",
6602+ .insns = {
6603+ BPF_ST_MEM(BPF_DW, BPF_REG_10, -8, 0),
6604+ BPF_MOV64_REG(BPF_REG_2, BPF_REG_10),
6605+ BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8),
6606+ BPF_LD_MAP_FD(BPF_REG_1, 0),
6607+ BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0,
6608+ BPF_FUNC_map_lookup_elem),
6609+ BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 5),
6610+ BPF_MOV64_IMM(BPF_REG_1, 6),
6611+ BPF_MOV64_IMM(BPF_REG_2, 4),
6612+ BPF_ALU64_REG(BPF_ADD, BPF_REG_0, BPF_REG_1),
6613+ BPF_ALU64_REG(BPF_SUB, BPF_REG_0, BPF_REG_2),
6614+ BPF_LDX_MEM(BPF_B, BPF_REG_1, BPF_REG_0, 0),
6615+ BPF_MOV64_IMM(BPF_REG_0, 1),
6616+ BPF_EXIT_INSN(),
6617+ },
6618+ .fixup_map_array_48b = { 3 },
6619+ .result = ACCEPT,
6620+ .retval = 1,
6621+ },
6622+ {
6623+ "map access: unknown scalar -= value_ptr",
6624+ .insns = {
6625+ BPF_ST_MEM(BPF_DW, BPF_REG_10, -8, 0),
6626+ BPF_MOV64_REG(BPF_REG_2, BPF_REG_10),
6627+ BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8),
6628+ BPF_LD_MAP_FD(BPF_REG_1, 0),
6629+ BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0,
6630+ BPF_FUNC_map_lookup_elem),
6631+ BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 4),
6632+ BPF_LDX_MEM(BPF_B, BPF_REG_1, BPF_REG_0, 0),
6633+ BPF_ALU64_IMM(BPF_AND, BPF_REG_1, 0xf),
6634+ BPF_ALU64_REG(BPF_SUB, BPF_REG_1, BPF_REG_0),
6635+ BPF_LDX_MEM(BPF_B, BPF_REG_0, BPF_REG_1, 0),
6636+ BPF_MOV64_IMM(BPF_REG_0, 1),
6637+ BPF_EXIT_INSN(),
6638+ },
6639+ .fixup_map_array_48b = { 3 },
6640+ .result = REJECT,
6641+ .errstr = "R1 tried to subtract pointer from scalar",
6642+ },
6643+ {
6644+ "map access: value_ptr -= unknown scalar",
6645+ .insns = {
6646+ BPF_ST_MEM(BPF_DW, BPF_REG_10, -8, 0),
6647+ BPF_MOV64_REG(BPF_REG_2, BPF_REG_10),
6648+ BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8),
6649+ BPF_LD_MAP_FD(BPF_REG_1, 0),
6650+ BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0,
6651+ BPF_FUNC_map_lookup_elem),
6652+ BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 4),
6653+ BPF_LDX_MEM(BPF_B, BPF_REG_1, BPF_REG_0, 0),
6654+ BPF_ALU64_IMM(BPF_AND, BPF_REG_1, 0xf),
6655+ BPF_ALU64_REG(BPF_SUB, BPF_REG_0, BPF_REG_1),
6656+ BPF_LDX_MEM(BPF_B, BPF_REG_1, BPF_REG_0, 0),
6657+ BPF_MOV64_IMM(BPF_REG_0, 1),
6658+ BPF_EXIT_INSN(),
6659+ },
6660+ .fixup_map_array_48b = { 3 },
6661+ .result = REJECT,
6662+ .errstr = "R0 min value is negative",
6663+ },
6664+ {
6665+ "map access: value_ptr -= unknown scalar, 2",
6666+ .insns = {
6667+ BPF_ST_MEM(BPF_DW, BPF_REG_10, -8, 0),
6668+ BPF_MOV64_REG(BPF_REG_2, BPF_REG_10),
6669+ BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8),
6670+ BPF_LD_MAP_FD(BPF_REG_1, 0),
6671+ BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0,
6672+ BPF_FUNC_map_lookup_elem),
6673+ BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 8),
6674+ BPF_LDX_MEM(BPF_B, BPF_REG_1, BPF_REG_0, 0),
6675+ BPF_ALU64_IMM(BPF_AND, BPF_REG_1, 0xf),
6676+ BPF_ALU64_IMM(BPF_OR, BPF_REG_1, 0x7),
6677+ BPF_ALU64_REG(BPF_ADD, BPF_REG_0, BPF_REG_1),
6678+ BPF_LDX_MEM(BPF_B, BPF_REG_1, BPF_REG_0, 0),
6679+ BPF_ALU64_IMM(BPF_AND, BPF_REG_1, 0x7),
6680+ BPF_ALU64_REG(BPF_SUB, BPF_REG_0, BPF_REG_1),
6681+ BPF_LDX_MEM(BPF_B, BPF_REG_1, BPF_REG_0, 0),
6682+ BPF_MOV64_IMM(BPF_REG_0, 1),
6683+ BPF_EXIT_INSN(),
6684+ },
6685+ .fixup_map_array_48b = { 3 },
6686+ .result = ACCEPT,
6687+ .retval = 1,
6688+ },
6689+ {
6690+ "map access: value_ptr -= value_ptr",
6691+ .insns = {
6692+ BPF_ST_MEM(BPF_DW, BPF_REG_10, -8, 0),
6693+ BPF_MOV64_REG(BPF_REG_2, BPF_REG_10),
6694+ BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8),
6695+ BPF_LD_MAP_FD(BPF_REG_1, 0),
6696+ BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0,
6697+ BPF_FUNC_map_lookup_elem),
6698+ BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 2),
6699+ BPF_ALU64_REG(BPF_SUB, BPF_REG_0, BPF_REG_0),
6700+ BPF_LDX_MEM(BPF_B, BPF_REG_1, BPF_REG_0, 0),
6701+ BPF_MOV64_IMM(BPF_REG_0, 1),
6702+ BPF_EXIT_INSN(),
6703+ },
6704+ .fixup_map_array_48b = { 3 },
6705+ .result = REJECT,
6706+ .errstr = "R0 invalid mem access 'inv'",
6707+ .errstr_unpriv = "R0 pointer -= pointer prohibited",
6708+ },
64576709 {
64586710 "map lookup helper access to map",
64596711 .insns = {
@@ -13899,6 +14151,33 @@ static void do_test_fixup(struct bpf_test *test, enum bpf_map_type prog_type, · 7439 unmodified lines
1389914151 }
1390014152 }
1390114153
14154+static int set_admin(bool admin)
14155+{
14156+ cap_t caps;
14157+ const cap_value_t cap_val = CAP_SYS_ADMIN;
14158+ int ret = -1;
14159+
14160+ caps = cap_get_proc();
14161+ if (!caps) {
14162+ perror("cap_get_proc");
14163+ return -1;
14164+ }
14165+ if (cap_set_flag(caps, CAP_EFFECTIVE, 1, &cap_val,
14166+ admin ? CAP_SET : CAP_CLEAR)) {
14167+ perror("cap_set_flag");
14168+ goto out;
14169+ }
14170+ if (cap_set_proc(caps)) {
14171+ perror("cap_set_proc");
14172+ goto out;
14173+ }
14174+ ret = 0;
14175+out:
14176+ if (cap_free(caps))
14177+ perror("cap_free");
14178+ return ret;
14179+}
14180+
1390214181 static void do_test_single(struct bpf_test *test, bool unpriv,
1390314182 int *passes, int *errors)
1390414183 {
@@ -13907,6 +14186,7 @@ static void do_test_single(struct bpf_test *test, bool unpriv, · 2 unmodified lines
1390714186 struct bpf_insn *prog = test->insns;
1390814187 int map_fds[MAX_NR_MAPS];
1390914188 const char *expected_err;
14189+ uint32_t expected_val;
1391014190 uint32_t retval;
1391114191 int i, err;
1391214192
@@ -13926,6 +14206,8 @@ static void do_test_single(struct bpf_test *test, bool unpriv, · 13 unmodified lines
1392614206 test->result_unpriv : test->result;
1392714207 expected_err = unpriv && test->errstr_unpriv ?
1392814208 test->errstr_unpriv : test->errstr;
14209+ expected_val = unpriv && test->retval_unpriv ?
14210+ test->retval_unpriv : test->retval;
1392914211
1393014212 reject_from_alignment = fd_prog < 0 &&
1393114213 (test->flags & F_NEEDS_EFFICIENT_UNALIGNED_ACCESS) &&
@@ -13959,16 +14241,20 @@ static void do_test_single(struct bpf_test *test, bool unpriv, · 27 unmodified lines
1395914241 __u8 tmp[TEST_DATA_LEN << 2];
1396014242 __u32 size_tmp = sizeof(tmp);
1396114243
14244+ if (unpriv)
14245+ set_admin(true);
1396214246 err = bpf_prog_test_run(fd_prog, 1, test->data,
1396314247 sizeof(test->data), tmp, &size_tmp,
1396414248 &retval, NULL);
14249+ if (unpriv)
14250+ set_admin(false);
1396514251 if (err && errno != 524/*ENOTSUPP*/ && errno != EPERM) {
1396614252 printf("Unexpected bpf_prog_test_run error\n");
1396714253 goto fail_log;
1396814254 }
13969− if (!err && retval != test->retval &&
13970− test->retval != POINTER_VALUE) {
13971− printf("FAIL retval %d != %d\n", retval, test->retval);
14255+ if (!err && retval != expected_val &&
14256+ expected_val != POINTER_VALUE) {
14257+ printf("FAIL retval %d != %d\n", retval, expected_val);
1397214258 goto fail_log;
1397314259 }
1397414260 }
@@ -14011,33 +14297,6 @@ static bool is_admin(void) · 36 unmodified lines
1401114297 return (sysadmin == CAP_SET);
1401214298 }
1401314299
14014−static int set_admin(bool admin)
14015−{
14016− cap_t caps;
14017− const cap_value_t cap_val = CAP_SYS_ADMIN;
14018− int ret = -1;
14019−
14020− caps = cap_get_proc();
14021− if (!caps) {
14022− perror("cap_get_proc");
14023− return -1;
14024− }
14025− if (cap_set_flag(caps, CAP_EFFECTIVE, 1, &cap_val,
14026− admin ? CAP_SET : CAP_CLEAR)) {
14027− perror("cap_set_flag");
14028− goto out;
14029− }
14030− if (cap_set_proc(caps)) {
14031− perror("cap_set_proc");
14032− goto out;
14033− }
14034− ret = 0;
14035−out:
14036− if (cap_free(caps))
14037− perror("cap_free");
14038− return ret;
14039−}
14040−
1404114300 static void get_unpriv_disabled()
1404214301 {
1404314302 char buf[2];
tools/testing/selftests/drivers/net/mlxsw/qos_mc_aware.sh+71−24
@@ -25,24 +25,24 @@ · 24 unmodified lines
2525 # Thus we set MTU to 10K on all involved interfaces. Then both unicast and
2626 # multicast traffic uses 8K frames.
2727 #
28−# +-----------------------+ +----------------------------------+
29−# | H1 | | H2 |
30−# | | | unicast --> + $h2.111 |
31−# | | | traffic | 192.0.2.129/28 |
32−# | multicast | | | e-qos-map 0:1 |
33−# | traffic | | | |
34−# | $h1 + <----- | | + $h2 |
35−# +-----|-----------------+ +--------------|-------------------+
36−# | |
37−# +-----|-------------------------------------------------|-------------------+
38−# | + $swp1 + $swp2 |
39−# | | >1Gbps | >1Gbps |
40−# | +---|----------------+ +----------|----------------+ |
41−# | | + $swp1.1 | | + $swp2.111 | |
28+# +---------------------------+ +----------------------------------+
29+# | H1 | | H2 |
30+# | | | unicast --> + $h2.111 |
31+# | multicast | | traffic | 192.0.2.129/28 |
32+# | traffic | | | e-qos-map 0:1 |
33+# | $h1 + <----- | | | |
34+# | 192.0.2.65/28 | | | + $h2 |
35+# +---------------|-----------+ +--------------|-------------------+
36+# | |
37+# +---------------|---------------------------------------|-------------------+
38+# | $swp1 + + $swp2 |
39+# | >1Gbps | | >1Gbps |
40+# | +-------------|------+ +----------|----------------+ |
41+# | | $swp1.1 + | | + $swp2.111 | |
4242 # | | BR1 | SW | BR111 | |
43−# | | + $swp3.1 | | + $swp3.111 | |
44−# | +---|----------------+ +----------|----------------+ |
45−# | \_________________________________________________/ |
43+# | | $swp3.1 + | | + $swp3.111 | |
44+# | +-------------|------+ +----------|----------------+ |
45+# | \_______________________________________/ |
4646 # | | |
4747 # | + $swp3 |
4848 # | | 1Gbps bottleneck |
@@ -51,6 +51,7 @@ · 2 unmodified lines
5151 # |
5252 # +--|-----------------+
5353 # | + $h3 H3 |
54+# | | 192.0.2.66/28 |
5455 # | | |
5556 # | + $h3.111 |
5657 # | 192.0.2.130/28 |
@@ -59,6 +60,7 @@ · 2 unmodified lines
5960 ALL_TESTS="
6061 ping_ipv4
6162 test_mc_aware
63+ test_uc_aware
6264 "
6365
6466 lib_dir=$(dirname $0)/../../../net/forwarding
@@ -68,14 +70,14 @@ source $lib_dir/lib.sh · 3 unmodified lines
6870
6971 h1_create()
7072 {
71− simple_if_init $h1
73+ simple_if_init $h1 192.0.2.65/28
7274 mtu_set $h1 10000
7375 }
7476
7577 h1_destroy()
7678 {
7779 mtu_restore $h1
78− simple_if_fini $h1
80+ simple_if_fini $h1 192.0.2.65/28
7981 }
8082
8183 h2_create()
@@ -97,7 +99,7 @@ h2_destroy() · 15 unmodified lines
9799
98100 h3_create()
99101 {
100− simple_if_init $h3
102+ simple_if_init $h3 192.0.2.66/28
101103 mtu_set $h3 10000
102104
103105 vlan_create $h3 111 v$h3 192.0.2.130/28
@@ -108,7 +110,7 @@ h3_destroy() · 4 unmodified lines
108110 vlan_destroy $h3 111
109111
110112 mtu_restore $h3
111− simple_if_fini $h3
113+ simple_if_fini $h3 192.0.2.66/28
112114 }
113115
114116 switch_create()
@@ -251,7 +253,7 @@ measure_uc_rate() · 136 unmodified lines
251253 # average ingress rate to somewhat mitigate this.
252254 local min_ingress=2147483648
253255
254− mausezahn $h2.111 -p 8000 -A 192.0.2.129 -B 192.0.2.130 -c 0 \
256+ $MZ $h2.111 -p 8000 -A 192.0.2.129 -B 192.0.2.130 -c 0 \
255257 -a own -b $h3mac -t udp -q &
256258 sleep 1
257259
@@ -291,7 +293,7 @@ test_mc_aware() · 33 unmodified lines
291293 check_err $? "Could not get high enough UC-only ingress rate"
292294 local ucth1=${uc_rate[1]}
293295
294− mausezahn $h1 -p 8000 -c 0 -a own -b bc -t udp -q &
296+ $MZ $h1 -p 8000 -c 0 -a own -b bc -t udp -q &
295297
296298 local d0=$(date +%s)
297299 local t0=$(ethtool_stats_get $h3 rx_octets_prio_0)
@@ -311,7 +313,7 @@ test_mc_aware() · 13 unmodified lines
311313 ret = 100 * ($ucth1 - $ucth2) / $ucth1
312314 if (ret > 0) { ret } else { 0 }
313315 ")
314− check_err $(bc <<< "$deg > 10")
316+ check_err $(bc <<< "$deg > 25")
315317
316318 local interval=$((d1 - d0))
317319 local mc_ir=$(rate $u0 $u1 $interval)
@@ -335,6 +337,51 @@ test_mc_aware() · 17 unmodified lines
335337 echo " egress UC throughput $(humanize ${uc_rate_2[1]})"
336338 echo " ingress MC throughput $(humanize $mc_ir)"
337339 echo " egress MC throughput $(humanize $mc_er)"
340+ echo
341+}
342+
343+test_uc_aware()
344+{
345+ RET=0
346+
347+ $MZ $h2.111 -p 8000 -A 192.0.2.129 -B 192.0.2.130 -c 0 \
348+ -a own -b $h3mac -t udp -q &
349+
350+ local d0=$(date +%s)
351+ local t0=$(ethtool_stats_get $h3 rx_octets_prio_1)
352+ local u0=$(ethtool_stats_get $swp2 rx_octets_prio_1)
353+ sleep 1
354+
355+ local attempts=50
356+ local passes=0
357+ local i
358+
359+ for ((i = 0; i < attempts; ++i)); do
360+ if $ARPING -c 1 -I $h1 -b 192.0.2.66 -q -w 0.1; then
361+ ((passes++))
362+ fi
363+
364+ sleep 0.1
365+ done
366+
367+ local d1=$(date +%s)
368+ local t1=$(ethtool_stats_get $h3 rx_octets_prio_1)
369+ local u1=$(ethtool_stats_get $swp2 rx_octets_prio_1)
370+
371+ local interval=$((d1 - d0))
372+ local uc_ir=$(rate $u0 $u1 $interval)
373+ local uc_er=$(rate $t0 $t1 $interval)
374+
375+ ((attempts == passes))
376+ check_err $?
377+
378+ # Suppress noise from killing mausezahn.
379+ { kill %% && wait; } 2>/dev/null
380+
381+ log_test "MC performace under UC overload"
382+ echo " ingress UC throughput $(humanize ${uc_ir})"
383+ echo " egress UC throughput $(humanize ${uc_er})"
384+ echo " sent $attempts BC ARPs, got $passes responses"
338385 }
339386
340387 trap cleanup EXIT

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t