Skip to content

Commit

Permalink
net/hns3: fix error code for multicast resource
Browse files Browse the repository at this point in the history
[ upstream commit c8cd885352d58bcfcc514770cb6068dd689d0dc3 ]

Return ENOSPC instead of EINVAL when the hardware
has not enough multicast filtering resources.

Fixes: 7d7f9f8 ("net/hns3: support MAC address related operations")

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
  • Loading branch information
Dengdui Huang authored and bluca committed Oct 18, 2023
1 parent 0eca127 commit 25895ad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/net/hns3/hns3_ethdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1913,7 +1913,7 @@ hns3_set_mc_addr_chk_param(struct hns3_hw *hw,
hns3_err(hw, "failed to set mc mac addr, nb_mc_addr(%u) "
"invalid. valid range: 0~%d",
nb_mc_addr, HNS3_MC_MACADDR_NUM);
return -EINVAL;
return -ENOSPC;
}

/* Check if input mac addresses are valid */
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/hns3/hns3_ethdev_vf.c
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ hns3vf_set_mc_addr_chk_param(struct hns3_hw *hw,
hns3_err(hw, "failed to set mc mac addr, nb_mc_addr(%u) "
"invalid. valid range: 0~%d",
nb_mc_addr, HNS3_MC_MACADDR_NUM);
return -EINVAL;
return -ENOSPC;
}

/* Check if input mac addresses are valid */
Expand Down

0 comments on commit 25895ad

Please sign in to comment.