Skip to content

Commit

Permalink
net/hns3: fix flow control exception
Browse files Browse the repository at this point in the history
[ upstream commit f1c5552 ]

In multi-TC scenarios, MAC pause is not supported. Otherwise, only
TC0 can trigger pause frames, and other TCs cannot trigger pause
frames. In this case, flow control does not meet the expectation.

Fixes: 62e3ccc ("net/hns3: support flow control")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
  • Loading branch information
LiHuiSong1 authored and steevenlee committed May 8, 2021
1 parent 73db182 commit 654aeb2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/net/hns3/hns3_ethdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -5279,6 +5279,11 @@ hns3_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
return -EOPNOTSUPP;
}

if (hw->num_tc > 1) {
hns3_err(hw, "in multi-TC scenarios, MAC pause is not supported.");
return -EOPNOTSUPP;
}

hns3_get_fc_mode(hw, fc_conf->mode);
if (hw->requested_mode == hw->current_mode &&
pf->pause_time == fc_conf->pause_time)
Expand Down

0 comments on commit 654aeb2

Please sign in to comment.