1. 19 Sep, 2023 4 commits
    • Jian Shen's avatar
      net: hns3: only enable unicast promisc when mac table full · f2ed3049
      Jian Shen authored
      Currently, the driver will enable unicast promisc for the function
      once configure mac address fail. It's unreasonable when the failure
      is caused by using same mac address with other functions. So only
      enable unicast promisc when mac table full.
      
      Fixes: c631c696 ("net: hns3: refactor the promisc mode setting")
      Signed-off-by: default avatarJian Shen <shenjian15@huawei.com>
      Signed-off-by: default avatarJijie Shao <shaojijie@huawei.com>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      f2ed3049
    • Jie Wang's avatar
      net: hns3: fix GRE checksum offload issue · f9f65126
      Jie Wang authored
      The device_version V3 hardware can't offload the checksum for IP in GRE
      packets, but can do it for NvGRE. So default to disable the checksum and
      GSO offload for GRE, but keep the ability to enable it when only using
      NvGRE.
      
      Fixes: 76ad4f0e ("net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC")
      Signed-off-by: default avatarJie Wang <wangjie125@huawei.com>
      Signed-off-by: default avatarJijie Shao <shaojijie@huawei.com>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      f9f65126
    • Jie Wang's avatar
      net: hns3: add cmdq check for vf periodic service task · bd3caddf
      Jie Wang authored
      When the vf cmdq is disabled, there is no need to keep these task running.
      So this patch skip these task when the cmdq is disabled.
      
      Fixes: ff200099 ("net: hns3: remove unnecessary work in hclgevf_main")
      Signed-off-by: default avatarJie Wang <wangjie125@huawei.com>
      Signed-off-by: default avatarJijie Shao <shaojijie@huawei.com>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      bd3caddf
    • Jisheng Zhang's avatar
      net: stmmac: fix incorrect rxq|txq_stats reference · 8070274b
      Jisheng Zhang authored
      commit 133466c3 ("net: stmmac: use per-queue 64 bit statistics
      where necessary") caused one regression as found by Uwe, the backtrace
      looks like:
      
      	INFO: trying to register non-static key.
      	The code is fine but needs lockdep annotation, or maybe
      	you didn't initialize this object before use?
      	turning off the locking correctness validator.
      	CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.5.0-rc1-00449-g133466c3-dirty #21
      	Hardware name: STM32 (Device Tree Support)
      	 unwind_backtrace from show_stack+0x18/0x1c
      	 show_stack from dump_stack_lvl+0x60/0x90
      	 dump_stack_lvl from register_lock_class+0x98c/0x99c
      	 register_lock_class from __lock_acquire+0x74/0x293c
      	 __lock_acquire from lock_acquire+0x134/0x398
      	 lock_acquire from stmmac_get_stats64+0x2ac/0x2fc
      	 stmmac_get_stats64 from dev_get_stats+0x44/0x130
      	 dev_get_stats from rtnl_fill_stats+0x38/0x120
      	 rtnl_fill_stats from rtnl_fill_ifinfo+0x834/0x17f4
      	 rtnl_fill_ifinfo from rtmsg_ifinfo_build_skb+0xc0/0x144
      	 rtmsg_ifinfo_build_skb from rtmsg_ifinfo+0x50/0x88
      	 rtmsg_ifinfo from __dev_notify_flags+0xc0/0xec
      	 __dev_notify_flags from dev_change_flags+0x50/0x5c
      	 dev_change_flags from ip_auto_config+0x2f4/0x1260
      	 ip_auto_config from do_one_initcall+0x70/0x35c
      	 do_one_initcall from kernel_init_freeable+0x2ac/0x308
      	 kernel_init_freeable from kernel_init+0x1c/0x138
      	 kernel_init from ret_from_fork+0x14/0x2c
      
      The reason is the rxq|txq_stats structures are not what expected
      because stmmac_open() -> __stmmac_open() the structure is overwritten
      by "memcpy(&priv->dma_conf, dma_conf, sizeof(*dma_conf));"
      This causes the well initialized syncp member of rxq|txq_stats is
      overwritten unexpectedly as pointed out by Johannes and Uwe.
      
      Fix this issue by moving rxq|txq_stats back to stmmac_extra_stats. For
      SMP cache friendly, we also mark stmmac_txq_stats and stmmac_rxq_stats
      as ____cacheline_aligned_in_smp.
      
      Fixes: 133466c3 ("net: stmmac: use per-queue 64 bit statistics where necessary")
      Signed-off-by: default avatarJisheng Zhang <jszhang@kernel.org>
      Reported-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Tested-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Link: https://lore.kernel.org/r/20230917165328.3403-1-jszhang@kernel.orgSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      8070274b
  2. 18 Sep, 2023 22 commits
  3. 17 Sep, 2023 3 commits
  4. 16 Sep, 2023 4 commits
  5. 15 Sep, 2023 7 commits