X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fhns3%2Fhns3_fdir.c;h=5c3dd05f2188a4ab81c1607f5a74b1f5bf3e2e5e;hb=3e66aafe5412a47a9e10a93b0228efe1bea3083a;hp=6ab439d06b57ca22df3988bc3176c6e7f09895d5;hpb=5c471cb581ebd9a06918dbf5092f4228cc1e565e;p=dpdk.git diff --git a/drivers/net/hns3/hns3_fdir.c b/drivers/net/hns3/hns3_fdir.c index 6ab439d06b..5c3dd05f21 100644 --- a/drivers/net/hns3/hns3_fdir.c +++ b/drivers/net/hns3/hns3_fdir.c @@ -41,6 +41,8 @@ #define HNS3_FD_AD_WR_RULE_ID_B 0 #define HNS3_FD_AD_RULE_ID_S 1 #define HNS3_FD_AD_RULE_ID_M GENMASK(13, 1) +#define HNS3_FD_AD_COUNTER_HIGH_BIT 7 +#define HNS3_FD_AD_COUNTER_HIGH_BIT_B 26 enum HNS3_PORT_TYPE { HOST_PORT, @@ -424,6 +426,9 @@ static int hns3_fd_ad_config(struct hns3_hw *hw, int loc, action->write_rule_id_to_bd); hns3_set_field(ad_data, HNS3_FD_AD_RULE_ID_M, HNS3_FD_AD_RULE_ID_S, action->rule_id); + /* set extend bit if counter_id is in [128 ~ 255] */ + if (action->counter_id & BIT(HNS3_FD_AD_COUNTER_HIGH_BIT)) + hns3_set_bit(ad_data, HNS3_FD_AD_COUNTER_HIGH_BIT_B, 1); ad_data <<= HNS3_FD_AD_DATA_S; hns3_set_bit(ad_data, HNS3_FD_AD_DROP_B, action->drop_packet); hns3_set_bit(ad_data, HNS3_FD_AD_DIRECT_QID_B,