1. 15 Sep, 2021 37 commits
  2. 14 Sep, 2021 3 commits
    • David S. Miller's avatar
      Merge branch 'hns3-mac' · f2173257
      David S. Miller authored
      Guangbin Huang says:
      
      ====================
      PF support get MAC address space assigned by firmware
      
      This series add support PF to get unicast/multicast MAC address space
      assigned by firmware for the HNS3 ethernet driver.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f2173257
    • Guangbin Huang's avatar
      net: hns3: PF support get multicast MAC address space assigned by firmware · 5c56ff48
      Guangbin Huang authored
      The new firmware supports to divides the whole multicast MAC address space
      equally to functions of all PFs, and calculates the space size of each PF
      according to its function number.
      
      To support this feature, PF driver adds querying multicast MAC address
      space size from firmware and limits used number according to space size.
      Signed-off-by: default avatarGuangbin Huang <huangguangbin2@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5c56ff48
    • Guangbin Huang's avatar
      net: hns3: PF support get unicast MAC address space assigned by firmware · e435a6b5
      Guangbin Huang authored
      Currently, there are two ways for PF to set the unicast MAC address space
      size: specified by config parameters in firmware or set to default value.
      
      That's mean if the config parameters in firmware is zero, driver will
      divide the whole unicast MAC address space equally to 8 PFs. However, in
      this case, the unicast MAC address space will be wasted a lot when the
      hardware actually has less then 8 PFs. And in the other hand, if one PF has
      much more VFs than other PFs, then each function of this PF will has much
      less address space than other PFs.
      
      In order to ameliorate the above two situations, introduce the third way
      of unicast MAC address space assignment: firmware divides the whole unicast
      MAC address space equally to functions of all PFs, and calculates the space
      size of each PF according to its function number. PF queries the space size
      by the querying device specification command when in initialization
      process.
      
      The third way assignment is lower priority than specified by config
      parameters, only if the config parameters is zero can be used, and if
      firmware does not support the third way assignment, then driver still
      divides the whole unicast MAC address space equally to 8 PFs.
      Signed-off-by: default avatarGuangbin Huang <huangguangbin2@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e435a6b5