X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fhns3%2Fhns3_fdir.h;h=fc62daa994fae36e69e06ca7efeffb3a6a4dea78;hb=23e317dd1fbf81bbfb542523e2628e8ed33654d1;hp=c1137b7d0a29a0e4ed92d2190f952a2499320c01;hpb=fcba820d9b9e34007223590d4c75417ed42563c1;p=dpdk.git diff --git a/drivers/net/hns3/hns3_fdir.h b/drivers/net/hns3/hns3_fdir.h index c1137b7d0a..fc62daa994 100644 --- a/drivers/net/hns3/hns3_fdir.h +++ b/drivers/net/hns3/hns3_fdir.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause - * Copyright(c) 2018-2019 Hisilicon Limited. + * Copyright(c) 2018-2021 HiSilicon Limited. */ #ifndef _HNS3_FDIR_H_ @@ -104,8 +104,18 @@ struct hns3_fd_rule_tuples { struct hns3_fd_ad_data { uint16_t ad_id; uint8_t drop_packet; - uint8_t forward_to_direct_queue; + /* + * equal 0 when action is drop. + * index of queue when action is queue. + * index of first queue of queue region when action is queue region. + */ uint16_t queue_id; + /* + * equal 0 when action is drop. + * equal 1 when action is queue. + * numbers of queues of queue region when action is queue region. + */ + uint16_t nb_queues; uint8_t use_counter; uint8_t counter_id; uint8_t use_next_stage; @@ -141,7 +151,18 @@ struct hns3_fdir_rule { uint8_t action; /* VF id, avaiblable when flags with HNS3_RULE_FLAG_VF_ID. */ uint8_t vf_id; + /* + * equal 0 when action is drop. + * index of queue when action is queue. + * index of first queue of queue region when action is queue region. + */ uint16_t queue_id; + /* + * equal 0 when action is drop. + * equal 1 when action is queue. + * numbers of queues of queue region when action is queue region. + */ + uint16_t nb_queues; uint16_t location; struct rte_flow_action_count act_cnt; }; @@ -152,6 +173,12 @@ struct hns3_fdir_rule_ele { struct hns3_fdir_rule fdir_conf; }; +/* rss filter list structure */ +struct hns3_rss_conf_ele { + TAILQ_ENTRY(hns3_rss_conf_ele) entries; + struct hns3_rss_conf filter_info; +}; + /* hns3_flow memory list structure */ struct hns3_flow_mem { TAILQ_ENTRY(hns3_flow_mem) entries; @@ -159,10 +186,12 @@ struct hns3_flow_mem { }; TAILQ_HEAD(hns3_fdir_rule_list, hns3_fdir_rule_ele); +TAILQ_HEAD(hns3_rss_filter_list, hns3_rss_conf_ele); TAILQ_HEAD(hns3_flow_mem_list, hns3_flow_mem); struct hns3_process_private { struct hns3_fdir_rule_list fdir_list; + struct hns3_rss_filter_list filter_rss_list; struct hns3_flow_mem_list flow_list; }; @@ -170,7 +199,6 @@ struct hns3_process_private { * A structure used to define fields of a FDIR related info. */ struct hns3_fdir_info { - rte_spinlock_t flows_lock; struct hns3_fdir_rule_list fdir_list; struct hns3_fdir_rule_ele **hash_map; struct rte_hash *hash_handle; @@ -191,7 +219,7 @@ int hns3_fdir_filter_program(struct hns3_adapter *hns, struct hns3_fdir_rule *rule, bool del); int hns3_clear_all_fdir_filter(struct hns3_adapter *hns); int hns3_get_count(struct hns3_hw *hw, uint32_t id, uint64_t *value); -void hns3_filterlist_init(struct rte_eth_dev *dev); +void hns3_flow_init(struct rte_eth_dev *dev); int hns3_restore_all_fdir_filter(struct hns3_adapter *hns); #endif /* _HNS3_FDIR_H_ */