Skip to content
Permalink
Eric-Dumazet/n…
Switch branches/tags

Commits on Jan 24, 2022

  1. ipv4/tcp: do not use per netns ctl sockets

    TCP ipv4 uses per-cpu/per-netns ctl sockets in order to send
    RST and some ACK packets (on behalf of TIMEWAIT sockets).
    
    This adds memory and cpu costs, which do not seem needed.
    Now typical servers have 256 or more cores, this adds considerable
    tax to netns users.
    
    tcp sockets are used from BH context, are not receiving packets,
    and do not store any persistent state but the 'struct net' pointer
    in order to be able to use IPv4 output functions.
    
    Note that I attempted a related change in the past, that had
    to be hot-fixed in commit bdbbb85 ("ipv4: tcp: get rid of ugly unicast_sock")
    
    This patch could very well surface old bugs, on layers not
    taking care of sk->sk_kern_sock properly.
    
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    neebe000 authored and intel-lab-lkp committed Jan 24, 2022
  2. ipv6: do not use per netns icmp sockets

    Back in linux-2.6.25 (commit 98c6d1b "[NETNS]: Make icmpv6_sk per namespace.",
    we added private per-cpu/per-netns ipv6 icmp sockets.
    
    This adds memory and cpu costs, which do not seem needed.
    Now typical servers have 256 or more cores, this adds considerable
    tax to netns users.
    
    icmp sockets are used from BH context, are not receiving packets,
    and do not store any persistent state but the 'struct net' pointer.
    
    icmpv6_xmit_lock() already makes sure to lock the chosen per-cpu
    socket.
    
    This patch has a considerable impact on the number of netns
    that the worker thread in cleanup_net() can dismantle per second,
    because ip6mr_sk_done() is no longer called, meaning we no longer
    acquire the rtnl mutex, competing with other threads adding new netns.
    
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    neebe000 authored and intel-lab-lkp committed Jan 24, 2022
  3. ipv4: do not use per netns icmp sockets

    Back in linux-2.6.25 (commit 4a6ad7a "[NETNS]: Make icmp_sk per namespace."),
    we added private per-cpu/per-netns ipv4 icmp sockets.
    
    This adds memory and cpu costs, which do not seem needed.
    Now typical servers have 256 or more cores, this adds considerable
    tax to netns users.
    
    icmp sockets are used from BH context, are not receiving packets,
    and do not store any persistent state but the 'struct net' pointer.
    
    icmp_xmit_lock() already makes sure to lock the chosen per-cpu
    socket.
    
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    neebe000 authored and intel-lab-lkp committed Jan 24, 2022
  4. tcp/dccp: get rid of inet_twsk_purge()

    Prior patches in the series made sure tw_timer_handler()
    can be fired after netns has been dismantled/freed.
    
    We no longer have to scan a potentially big TCP ehash
    table at netns dismantle.
    
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    neebe000 authored and intel-lab-lkp committed Jan 24, 2022
  5. tcp/dccp: no longer use twsk_net(tw) from tw_timer_handler()

    We will soon get rid of inet_twsk_purge().
    
    This means that tw_timer_handler() might fire after
    a netns has been dismantled/freed.
    
    Instead of adding a function (and data structure) to find a netns
    from tw->tw_net_cookie, just update the SNMP counters
    a bit earlier, when the netns is known to be alive.
    
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    neebe000 authored and intel-lab-lkp committed Jan 24, 2022
  6. tcp/dccp: add tw->tw_bslot

    We want to allow inet_twsk_kill() working even if netns
    has been dismantled/freed, to get rid of inet_twsk_purge().
    
    This patch adds tw->tw_bslot to cache the bind bucket slot
    so that inet_twsk_kill() no longer needs to dereference twsk_net(tw)
    
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    neebe000 authored and intel-lab-lkp committed Jan 24, 2022

Commits on Jan 10, 2022

  1. Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net

    Merge in fixes directly in prep for the 5.17 merge window.
    No conflicts.
    
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Jakub Kicinski committed Jan 10, 2022
  2. tcp: tcp_send_challenge_ack delete useless param skb

    After this parameter is passed in, there is no usage, and deleting it will
     not bring any impact.
    
    Reviewed-by: Eric Dumazet <edumazet@google.com>
    Signed-off-by: Benjamin Yim <yan2228598786@gmail.com>
    Link: https://lore.kernel.org/r/20220109130824.2776-1-yan2228598786@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Benjamin-Yim authored and Jakub Kicinski committed Jan 10, 2022
  3. net/qla3xxx: Remove useless DMA-32 fallback configuration

    As stated in [1], dma_set_mask() with a 64-bit mask never fails if
    dev->dma_mask is non-NULL.
    So, if it fails, the 32 bits case will also fail for the same reason.
    
    So, if dma_set_mask_and_coherent() succeeds, 'pci_using_dac' is known to be
    1.
    
    Simplify code and remove some dead code accordingly.
    
    [1]: https://lkml.org/lkml/2021/6/7/398
    
    Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
    Link: https://lore.kernel.org/r/3011689e8c77d49d7e44509d5a8241320ec408c5.1641754134.git.christophe.jaillet@wanadoo.fr
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    tititiou36 authored and Jakub Kicinski committed Jan 10, 2022
  4. rocker: Remove useless DMA-32 fallback configuration

    As stated in [1], dma_set_mask() with a 64-bit mask never fails if
    dev->dma_mask is non-NULL.
    So, if it fails, the 32 bits case will also fail for the same reason.
    
    Simplify code and remove some dead code accordingly.
    
    [1]: https://lkml.org/lkml/2021/6/7/398
    
    Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
    Link: https://lore.kernel.org/r/9ba2d13099d216f3df83e50ad33a05504c90fe7c.1641744274.git.christophe.jaillet@wanadoo.fr
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    tititiou36 authored and Jakub Kicinski committed Jan 10, 2022
  5. hinic: Remove useless DMA-32 fallback configuration

    As stated in [1], dma_set_mask() with a 64-bit mask never fails if
    dev->dma_mask is non-NULL.
    So, if it fails, the 32 bits case will also fail for the same reason.
    
    Simplify code and remove some dead code accordingly.
    
    [1]: https://lkml.org/lkml/2021/6/7/398
    
    Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
    Link: https://lore.kernel.org/r/23541c28df8d0dcd3663b5dbe0f76af71e70e9cc.1641743855.git.christophe.jaillet@wanadoo.fr
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    tititiou36 authored and Jakub Kicinski committed Jan 10, 2022
  6. lan743x: Remove useless DMA-32 fallback configuration

    As stated in [1], dma_set_mask() with a 64-bit mask never fails if
    dev->dma_mask is non-NULL.
    So, if it fails, the 32 bits case will also fail for the same reason.
    
    Simplify code and remove some dead code accordingly.
    
    [1]: https://lkml.org/lkml/2021/6/7/398
    
    Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
    Link: https://lore.kernel.org/r/ef548716606f257939df9738a801f15b6edf2568.1641743405.git.christophe.jaillet@wanadoo.fr
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    tititiou36 authored and Jakub Kicinski committed Jan 10, 2022
  7. net: enetc: Remove useless DMA-32 fallback configuration

    As stated in [1], dma_set_mask() with a 64-bit mask never fails if
    dev->dma_mask is non-NULL.
    So, if it fails, the 32 bits case will also fail for the same reason.
    
    Simplify code and remove some dead code accordingly.
    
    [1]: https://lkml.org/lkml/2021/6/7/398
    
    Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
    Link: https://lore.kernel.org/r/dbecd4eb49a9586ee343b5473dda4b84c42112e9.1641742884.git.christophe.jaillet@wanadoo.fr
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    tititiou36 authored and Jakub Kicinski committed Jan 10, 2022
  8. cxgb4vf: Remove useless DMA-32 fallback configuration

    As stated in [1], dma_set_mask() with a 64-bit mask never fails if
    dev->dma_mask is non-NULL.
    So, if it fails, the 32 bits case will also fail for the same reason.
    
    So, if dma_set_mask_and_coherent() succeeds, 'pci_using_dac' is known to be
    1.
    
    Simplify code and remove some dead code accordingly.
    
    [1]: https://lkml.org/lkml/2021/6/7/398
    
    Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
    Link: https://lore.kernel.org/r/b14986ea39cea2ca9a6cd0476a3fc167c853ee67.1641736772.git.christophe.jaillet@wanadoo.fr
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    tititiou36 authored and Jakub Kicinski committed Jan 10, 2022
  9. cxgb4: Remove useless DMA-32 fallback configuration

    As stated in [1], dma_set_mask() with a 64-bit mask never fails if
    dev->dma_mask is non-NULL.
    So, if it fails, the 32 bits case will also fail for the same reason.
    
    So, if dma_set_mask_and_coherent() succeeds, 'highdma' is known to be true.
    
    Simplify code and remove some dead code accordingly.
    
    [1]: https://lkml.org/lkml/2021/6/7/398
    
    Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
    Link: https://lore.kernel.org/r/56db10d53be0897ff1be5f37d64b91cb7e1d932c.1641736387.git.christophe.jaillet@wanadoo.fr
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    tititiou36 authored and Jakub Kicinski committed Jan 10, 2022
  10. cxgb3: Remove useless DMA-32 fallback configuration

    As stated in [1], dma_set_mask() with a 64-bit mask never fails if
    dev->dma_mask is non-NULL.
    So, if it fails, the 32 bits case will also fail for the same reason.
    
    So, if dma_set_mask_and_coherent() succeeds, 'pci_using_dac' is known to be
    1.
    
    Simplify code and remove some dead code accordingly.
    
    [1]: https://lkml.org/lkml/2021/6/7/398
    
    Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
    Link: https://lore.kernel.org/r/a0e2539aefb0034091aca02c98440ea9459f1258.1641736234.git.christophe.jaillet@wanadoo.fr
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    tititiou36 authored and Jakub Kicinski committed Jan 10, 2022
  11. bnx2x: Remove useless DMA-32 fallback configuration

    As stated in [1], dma_set_mask() with a 64-bit mask never fails if
    dev->dma_mask is non-NULL.
    So, if it fails, the 32 bits case will also fail for the same reason.
    
    Moreover, dma_set_mask_and_coherent() returns 0 or -EIO, so the return
    code of the function can be used directly.
    
    Finally, inline bnx2x_set_coherency_mask() because it is now only a wrapper
    for a single dma_set_mask_and_coherent() call.
    
    Simplify code and remove some dead code accordingly.
    
    [1]: https://lkml.org/lkml/2021/6/7/398
    
    Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
    Link: https://lore.kernel.org/r/29608a525876afddceabf8f11b2ba606da8748fc.1641730747.git.christophe.jaillet@wanadoo.fr
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    tititiou36 authored and Jakub Kicinski committed Jan 10, 2022
  12. et131x: Remove useless DMA-32 fallback configuration

    As stated in [1], dma_set_mask() with a 64-bit mask never fails if
    dev->dma_mask is non-NULL.
    So, if it fails, the 32 bits case will also fail for the same reason.
    
    Moreover, dma_set_mask_and_coherent() returns 0 or -EIO, so the return
    code of the function can be used directly. There is no need to 'rc = -EIO'
    explicitly.
    
    Simplify code and remove some dead code accordingly.
    
    [1]: https://lkml.org/lkml/2021/6/7/398
    
    Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
    Link: https://lore.kernel.org/r/b9aa46e7e5a5aa61f56aac5ea439930f41ad9946.1641726804.git.christophe.jaillet@wanadoo.fr
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    tititiou36 authored and Jakub Kicinski committed Jan 10, 2022
  13. be2net: Remove useless DMA-32 fallback configuration

    As stated in [1], dma_set_mask() with a 64-bit mask never fails if
    dev->dma_mask is non-NULL.
    So, if it fails, the 32 bits case will also fail for the same reason.
    
    So if dma_set_mask_and_coherent() succeeds, 'netdev->features' will have
    NETIF_F_HIGHDMA in all cases. Move the assignment of this feature in
    be_netdev_init() instead be_probe() which is a much logical place.
    
    Simplify code and remove some dead code accordingly.
    
    [1]: https://lkml.org/lkml/2021/6/7/398
    
    Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
    Link: https://lore.kernel.org/r/637696d7141faa68c29fc34b70f9aa67d5e605f0.1641718999.git.christophe.jaillet@wanadoo.fr
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    tititiou36 authored and Jakub Kicinski committed Jan 10, 2022
  14. vmxnet3: Remove useless DMA-32 fallback configuration

    As stated in [1], dma_set_mask() with a 64-bit mask never fails if
    dev->dma_mask is non-NULL.
    So, if it fails, the 32 bits case will also fail for the same reason.
    
    So if dma_set_mask_and_coherent() succeeds, 'dma64' is know to be 'true'.
    
    Simplify code and remove some dead code accordingly.
    
    [1]: https://lkml.org/lkml/2021/6/7/398
    
    Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
    Link: https://lore.kernel.org/r/43e5dcf1a5e9e9c5d2d86f87810d6e93e3d22e32.1641718188.git.christophe.jaillet@wanadoo.fr
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    tititiou36 authored and Jakub Kicinski committed Jan 10, 2022
  15. bna: Simplify DMA setting

    As stated in [1], dma_set_mask() with a 64-bit mask will never fail if
    dev->dma_mask is non-NULL.
    So, if it fails, the 32 bits case will also fail for the same reason.
    
    So, if dma_set_mask_and_coherent() succeeds, 'using_dac' is known to be
    'true'. This variable can be removed.
    
    Simplify code and remove some dead code accordingly.
    
    [1]: https://lkml.org/lkml/2021/6/7/398
    
    Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
    Link: https://lore.kernel.org/r/1d5a7b3f4fa735f1233c3eb3fa07e71df95fad75.1641658516.git.christophe.jaillet@wanadoo.fr
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    tititiou36 authored and Jakub Kicinski committed Jan 10, 2022
  16. net: alteon: Simplify DMA setting

    As stated in [1], dma_set_mask() with a 64-bit mask will never fail if
    dev->dma_mask is non-NULL.
    So, if it fails, the 32 bits case will also fail for the same reason.
    
    If dma_set_mask_and_coherent() succeeds, 'ap->pci_using_dac' is known to be
    1. So 'pci_using_dac' can be removed from the 'struct ace_private'.
    
    Simplify code and remove some dead code accordingly.
    
    [1]: https://lkml.org/lkml/2021/6/7/398
    
    Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
    Link: https://lore.kernel.org/r/1a414c05c27b21c661aef61dffe1adcd1578b1f5.1641651917.git.christophe.jaillet@wanadoo.fr
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    tititiou36 authored and Jakub Kicinski committed Jan 10, 2022
  17. myri10ge: Simplify DMA setting

    As stated in [1], dma_set_mask() with a 64-bit mask will never fail if
    dev->dma_mask is non-NULL.
    So, if it fails, the 32 bits case will also fail for the same reason.
    
    If dma_set_mask_and_coherent() succeeds, 'dac_enabled' is known to be 1.
    
    Simplify code and remove some dead code accordingly.
    
    [1]: https://lkml.org/lkml/2021/6/7/398
    
    Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
    Link: https://lore.kernel.org/r/e92b0c3a3c1574a97a4e6fd0c30225f10fa59d18.1641651693.git.christophe.jaillet@wanadoo.fr
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    tititiou36 authored and Jakub Kicinski committed Jan 10, 2022
  18. qlcnic: Simplify DMA setting

    As stated in [1], dma_set_mask() with a 64-bit mask will never fail if
    dev->dma_mask is non-NULL.
    So, if it fails, the 32 bits case will also fail for the same reason.
    
    So qlcnic_set_dma_mask(), (in qlcnic_main.c) can be simplified a lot and
    inlined directly in its only caller.
    
    If dma_set_mask_and_coherent() succeeds, 'pci_using_dac' is known to be 1.
    So it can be removed from all the calling chain.
    
    qlcnic_setup_netdev() can finally be simplified as-well.
    
    [1]: https://lkml.org/lkml/2021/6/7/398
    
    Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
    Link: https://lore.kernel.org/r/4996ab0337d62ec6a54b2edf234cd5ced4b4d7ad.1641649611.git.christophe.jaillet@wanadoo.fr
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    tititiou36 authored and Jakub Kicinski committed Jan 10, 2022
  19. net: allwinner: Fix print format

    Kees reports quoted commit introduced the following warning on arm64:
    
    drivers/net/ethernet/allwinner/sun4i-emac.c:922:60: error: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'resource_size_t' {aka 'long long unsigned int'} [-Werror=format=]
      922 |         netdev_info(ndev, "get io resource from device: 0x%x, size = %u\n",
          |                                                           ~^
          |                                                            |                                      |                                                            unsigned int
          |                                                           %llx
      923 |                     regs->start, resource_size(regs));
          |                     ~~~~~~~~~~~
          |                         |
          |                         resource_size_t {aka long long unsigned int}
    
    .. and another one like that for resource_size().
    
    Switch to %pa and a cast.
    
    Reported-by: Kees Cook <keescook@chromium.org>
    Fixes: 47869e8 ("sun4i-emac.c: add dma support")
    Link: https://lore.kernel.org/r/20220108034438.2227343-1-kuba@kernel.org
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Jakub Kicinski committed Jan 10, 2022
  20. page_pool: remove spinlock in page_pool_refill_alloc_cache()

    As page_pool_refill_alloc_cache() is only called by
    __page_pool_get_cached(), which assumes non-concurrent access
    as suggested by the comment in __page_pool_get_cached(), and
    ptr_ring allows concurrent access between consumer and producer,
    so remove the spinlock in page_pool_refill_alloc_cache().
    
    Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
    Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
    Link: https://lore.kernel.org/r/20220107090042.13605-1-linyunsheng@huawei.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Yunsheng Lin authored and Jakub Kicinski committed Jan 10, 2022
  21. amt: fix wrong return type of amt_send_membership_update()

    amt_send_membership_update() would return -1 but it's return type is bool.
    So, it should be used TRUE instead of -1.
    
    Fixes: cbc21dc ("amt: add data plane of amt interface")
    Reported-by: kernel test robot <lkp@intel.com>
    Signed-off-by: Taehee Yoo <ap420073@gmail.com>
    Link: https://lore.kernel.org/r/20220109163702.6331-1-ap420073@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    TaeheeYoo authored and Jakub Kicinski committed Jan 10, 2022
  22. net: mcs7830: handle usb read errors properly

    Syzbot reported uninit value in mcs7830_bind(). The problem was in
    missing validation check for bytes read via usbnet_read_cmd().
    
    usbnet_read_cmd() internally calls usb_control_msg(), that returns
    number of bytes read. Code should validate that requested number of bytes
    was actually read.
    
    So, this patch adds missing size validation check inside
    mcs7830_get_reg() to prevent uninit value bugs
    
    Reported-and-tested-by: syzbot+003c0a286b9af5412510@syzkaller.appspotmail.com
    Fixes: 2a36d70 ("USB: driver for mcs7830 (aka DeLOCK) USB ethernet adapter")
    Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
    Reviewed-by: Arnd Bergmann <arnd@arndb.de>
    Link: https://lore.kernel.org/r/20220106225716.7425-1-paskripkin@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    pskrgag authored and Jakub Kicinski committed Jan 10, 2022
  23. Merge branch 'net-skb-introduce-kfree_skb_with_reason'

    Menglong Dong says:
    
    ====================
    net: skb: introduce kfree_skb_with_reason()
    
    In this series patch, the interface kfree_skb_with_reason() is
    introduced(), which is used to collect skb drop reason, and pass
    it to 'kfree_skb' tracepoint. Therefor, 'drop_monitor' or eBPF is
    able to monitor abnormal skb with detail reason.
    
    In fact, this series patches are out of the intelligence of David
    and Steve, I'm just a truck man :/
    
    Previous discussion is here:
    
    https://lore.kernel.org/netdev/20211118105752.1d46e990@gandalf.local.home/
    https://lore.kernel.org/netdev/67b36bd8-2477-88ac-83a0-35a1eeaf40c9@gmail.com/
    
    In the first patch, kfree_skb_with_reason() is introduced and
    the 'reason' field is added to 'kfree_skb' tracepoint. In the
    second patch, 'kfree_skb()' in replaced with 'kfree_skb_with_reason()'
    in tcp_v4_rcv(). In the third patch, 'kfree_skb_with_reason()' is
    used in __udp4_lib_rcv().
    
    Changes since v3:
    - fix some code style problems in skb.h
    
    Changes since v2:
    - rename kfree_skb_with_reason() to kfree_skb_reason()
    - make kfree_skb() static inline, as Jakub suggested
    
    Changes since v1:
    - rename some drop reason, as David suggested
    - add the third patch
    ====================
    
    Link: https://lore.kernel.org/r/20220109063628.526990-1-imagedong@tencent.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Jakub Kicinski committed Jan 10, 2022
  24. net: skb: use kfree_skb_reason() in __udp4_lib_rcv()

    Replace kfree_skb() with kfree_skb_reason() in __udp4_lib_rcv.
    New drop reason 'SKB_DROP_REASON_UDP_CSUM' is added for udp csum
    error.
    
    Signed-off-by: Menglong Dong <imagedong@tencent.com>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    xmmgithub authored and Jakub Kicinski committed Jan 10, 2022
  25. net: skb: use kfree_skb_reason() in tcp_v4_rcv()

    Replace kfree_skb() with kfree_skb_reason() in tcp_v4_rcv(). Following
    drop reasons are added:
    
    SKB_DROP_REASON_NO_SOCKET
    SKB_DROP_REASON_PKT_TOO_SMALL
    SKB_DROP_REASON_TCP_CSUM
    SKB_DROP_REASON_TCP_FILTER
    
    After this patch, 'kfree_skb' event will print message like this:
    
    $           TASK-PID     CPU#  |||||  TIMESTAMP  FUNCTION
    $              | |         |   |||||     |         |
              <idle>-0       [000] ..s1.    36.113438: kfree_skb: skbaddr=(____ptrval____) protocol=2048 location=(____ptrval____) reason: NO_SOCKET
    
    The reason of skb drop is printed too.
    
    Signed-off-by: Menglong Dong <imagedong@tencent.com>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    xmmgithub authored and Jakub Kicinski committed Jan 10, 2022
  26. net: skb: introduce kfree_skb_reason()

    Introduce the interface kfree_skb_reason(), which is able to pass
    the reason why the skb is dropped to 'kfree_skb' tracepoint.
    
    Add the 'reason' field to 'trace_kfree_skb', therefor user can get
    more detail information about abnormal skb with 'drop_monitor' or
    eBPF.
    
    All drop reasons are defined in the enum 'skb_drop_reason', and
    they will be print as string in 'kfree_skb' tracepoint in format
    of 'reason: XXX'.
    
    ( Maybe the reasons should be defined in a uapi header file, so that
    user space can use them? )
    
    Signed-off-by: Menglong Dong <imagedong@tencent.com>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    xmmgithub authored and Jakub Kicinski committed Jan 10, 2022
  27. net/mlx5e: Fix build error in fec_set_block_stats()

    Build bot reports:
    
    drivers/net/ethernet/mellanox/mlx5/core/en_stats.c: In function 'fec_set_block_stats':
    drivers/net/ethernet/mellanox/mlx5/core/en_stats.c:1235:48: error: 'outl' undeclared (first use in this function); did you mean 'out'?
        1235 |         if (mlx5_core_access_reg(mdev, in, sz, outl, sz, MLX5_REG_PPCNT, 0, 0))
             |                                                ^~~~
             |                                                out
    
    Reported-by: kernel test robot <lkp@intel.com>
    Suggested-by: Leon Romanovsky <leon@kernel.org>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Link: https://lore.kernel.org/r/20220109213321.2292830-1-kuba@kernel.org
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Jakub Kicinski committed Jan 10, 2022
  28. Merge branch 'bnxt_en-update-for-net-next'

    Michael Chan says:
    
    ====================
    bnxt_en: Update for net-next
    
    This series adds better error and debug logging for firmware messages.
    We now also use the firmware provided timeout value for long running
    commands instead of capping it to 40 seconds.
    ====================
    
    Link: https://lore.kernel.org/r/1641772485-10421-1-git-send-email-michael.chan@broadcom.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Jakub Kicinski committed Jan 10, 2022
  29. bnxt_en: improve firmware timeout messaging

    While it has always been possible to infer that an HWRM command was
    abandoned due to an unhealthy firmware status by the shortened timeout
    reported, this change improves the log messaging to account for this
    case explicitly. In the interests of further clarity, the firmware
    status is now also reported in these new messages.
    
    v2: Remove inline keyword for hwrm_wait_must_abort() in .c file.
    
    Reviewed-by: Andy Gospodarek <gospo@broadcom.com>
    Signed-off-by: Edwin Peer <edwin.peer@broadcom.com>
    Signed-off-by: Michael Chan <michael.chan@broadcom.com>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Edwin Peer authored and Jakub Kicinski committed Jan 10, 2022
Older