On Wed, 4 Nov 2026 20:40:33 +0800
Shuaisong Yang <[email protected]> wrote:

> Currently, the driver obtains the PF's UMV (unicast MAC VLAN) table
> space from the board configuration, and falls back to the hard-coded
> default value HNS3_DEFAULT_UMV_SPACE_PER_PF (384 = 3072 / 8) when
> the firmware reports an empty umv_space field.
> 
> The hard-coded value is only accurate for chips with a 3072-entry UMV
> table. On chips whose total UMV table size is smaller than 3072, every
> PF still requests 384 entries: the first initialized PF occupies the
> whole table while the others get nothing, which makes adding unicast
> MAC or VLAN entries fail on those ports.
> 
> Fix this by obtaining the UMV size from the device specifications
> command, whose umv_size field is the default value allocated by the
> firmware policy. The requested size is determined at allocation time
> in hns3_init_umv_space(), in the following priority:
>   1. pf->cfg_umv_size, the user specified value from the board
>      configuration
>   2. pf->def_umv_size, the default value reported by the firmware
>   3. the hard-coded default, as the last fallback for old firmware
> 
> Fixes: d51867db65 ("net/hns3: add initialization")
> Cc: [email protected]
> 
> Signed-off-by: Shuaisong Yang <[email protected]>
> ---

Looks ok, I will correct the Fixes line during merge to next-net.
Current process needs longer hash value

Reply via email to