Skip to content
Permalink
Tony-Lu/net-sm…
Switch branches/tags

Commits on Jan 14, 2022

  1. net/smc: Introduce tunable linkgroup max connections

    This introduces tunable sysctl knob max_lgr_conns to tune the max
    connections in one linkgroup. This knob is net-namespaceify.
    
    Currently, a linkgroup is shared by SMC_RMBS_PER_LGR_MAX connectiosn at
    max, which is 255. This shares one QP, and introduces more competition,
    as connections increases, such as smc_cdc_get_free_slot(), it shares
    link-level slots. The environment and scenario are different, so this
    makes it possible to tunable by users, to save linkgroup resources or
    reduce competition and increase performance.
    
    Signed-off-by: Tony Lu <tonylu@linux.alibaba.com>
    Tony Lu authored and intel-lab-lkp committed Jan 14, 2022
  2. net/smc: Unbind buffer size from clcsock and make it tunable

    SMC uses smc->sk.sk_{rcv|snd}buf to create buffer for send buffer or
    RMB. And the values of buffer size inherits from clcsock. The clcsock is
    a TCP sock which is initiated during SMC connection startup.
    
    The inherited buffer size doesn't fit SMC well. TCP provides two sysctl
    knobs to tune r/w buffers, net.ipv4.tcp_{r|w}mem, and SMC use the default
    value from TCP. The buffer size is tuned for TCP, but not fit SMC well
    in some scenarios. For example, we need larger buffer of SMC for high
    throughput applications, and smaller buffer of SMC for saving contiguous
    memory. We need to adjust the buffer size apart from TCP and not to
    disturb TCP.
    
    This unbinds buffer size which inherits from clcsock, and provides
    sysctl knobs to adjust buffer size independently. These knobs can be
    tuned with different values for different net namespaces for performance
    and flexibility.
    
    Signed-off-by: Tony Lu <tonylu@linux.alibaba.com>
    Reviewed-by: Wen Gu <guwen@linux.alibaba.com>
    Tony Lu authored and intel-lab-lkp committed Jan 14, 2022
  3. net/smc: Multiple CQs per IB devices

    This patch allows multiple CQs for one IB device, compared to one CQ
    now.
    
    During IB device setup, it would initialize ibdev->num_comp_vectors
    amount of send/recv CQs, and the corresponding tasklets, like queues for
    net devices.
    
    Every smc_link has their own send and recv CQs, which always assigning
    from the least used CQs of current IB device.
    
    Signed-off-by: Tony Lu <tonylu@linux.alibaba.com>
    Tony Lu authored and intel-lab-lkp committed Jan 14, 2022
  4. net/smc: Introduce smc_ib_cq to bind link and cq

    This patch introduces struct smc_ib_cq as a medium between smc_link and
    ib_cq. Every smc_link can access ib_cq from their own, and unbinds
    smc_link from smc_ib_device. This allows flexible mapping, prepares for
    multiple CQs support.
    
    Signed-off-by: Tony Lu <tonylu@linux.alibaba.com>
    Tony Lu authored and intel-lab-lkp committed Jan 14, 2022
  5. net/smc: Prepare for multiple CQs per IB devices

    This introduces load of completion vector helper. During setup progress
    of IB device, it helps pick up the least used vector of current device.
    Only one CQ and two vectors are needed, so it is no practical use right
    now. This prepares for multiple CQs support.
    
    Signed-off-by: Tony Lu <tonylu@linux.alibaba.com>
    Tony Lu authored and intel-lab-lkp committed Jan 14, 2022
  6. net/smc: Spread CQs to differents completion vectors

    This spreads recv/send CQs to different vectors. This removes the
    limitation of single vector, which binds to some CPU.
    
    Signed-off-by: Tony Lu <tonylu@linux.alibaba.com>
    Tony Lu authored and intel-lab-lkp committed Jan 14, 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