mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 18:13:41 +02:00
net: hns3: extend HCLGE_FD_AD_QID to 11 bits
Currently, HCLGE_FD_AD_QID has only 10 bits and supports a maximum of 1023 queues. However, there are actually scenarios where the queue_id exceeds 1023. This patch adds an additional bit to HCLGE_FD_AD_QID to ensure that queue_id greater than 1023 are supported. Signed-off-by: Jijie Shao <shaojijie@huawei.com> Link: https://patch.msgid.link/20260123094756.3718516-2-shaojijie@huawei.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
parent
4c17c01c31
commit
878406d4d6
|
|
@ -727,8 +727,8 @@ struct hclge_fd_tcam_config_3_cmd {
|
|||
|
||||
#define HCLGE_FD_AD_DROP_B 0
|
||||
#define HCLGE_FD_AD_DIRECT_QID_B 1
|
||||
#define HCLGE_FD_AD_QID_S 2
|
||||
#define HCLGE_FD_AD_QID_M GENMASK(11, 2)
|
||||
#define HCLGE_FD_AD_QID_L_S 2
|
||||
#define HCLGE_FD_AD_QID_L_M GENMASK(11, 2)
|
||||
#define HCLGE_FD_AD_USE_COUNTER_B 12
|
||||
#define HCLGE_FD_AD_COUNTER_NUM_S 13
|
||||
#define HCLGE_FD_AD_COUNTER_NUM_M GENMASK(19, 13)
|
||||
|
|
@ -741,6 +741,7 @@ struct hclge_fd_tcam_config_3_cmd {
|
|||
#define HCLGE_FD_AD_TC_OVRD_B 16
|
||||
#define HCLGE_FD_AD_TC_SIZE_S 17
|
||||
#define HCLGE_FD_AD_TC_SIZE_M GENMASK(20, 17)
|
||||
#define HCLGE_FD_AD_QID_H_B 21
|
||||
|
||||
struct hclge_fd_ad_config_cmd {
|
||||
u8 stage;
|
||||
|
|
|
|||
|
|
@ -5679,11 +5679,13 @@ static int hclge_fd_ad_config(struct hclge_dev *hdev, u8 stage, int loc,
|
|||
hnae3_set_field(ad_data, HCLGE_FD_AD_TC_SIZE_M,
|
||||
HCLGE_FD_AD_TC_SIZE_S, (u32)action->tc_size);
|
||||
}
|
||||
hnae3_set_bit(ad_data, HCLGE_FD_AD_QID_H_B,
|
||||
action->queue_id >= HCLGE_TQP_MAX_SIZE_DEV_V2 ? 1 : 0);
|
||||
ad_data <<= 32;
|
||||
hnae3_set_bit(ad_data, HCLGE_FD_AD_DROP_B, action->drop_packet);
|
||||
hnae3_set_bit(ad_data, HCLGE_FD_AD_DIRECT_QID_B,
|
||||
action->forward_to_direct_queue);
|
||||
hnae3_set_field(ad_data, HCLGE_FD_AD_QID_M, HCLGE_FD_AD_QID_S,
|
||||
hnae3_set_field(ad_data, HCLGE_FD_AD_QID_L_M, HCLGE_FD_AD_QID_L_S,
|
||||
action->queue_id);
|
||||
hnae3_set_bit(ad_data, HCLGE_FD_AD_USE_COUNTER_B, action->use_counter);
|
||||
hnae3_set_field(ad_data, HCLGE_FD_AD_COUNTER_NUM_M,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user