From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail04.ics.ntt-tx.co.jp (mail05.ics.ntt-tx.co.jp [210.232.35.69]) by dpdk.org (Postfix) with ESMTP id 0B21B1B01F for ; Thu, 28 Dec 2017 05:56:13 +0100 (CET) Received: from gwchk03.silk.ntt-tx.co.jp (gwchk03.silk.ntt-tx.co.jp [10.107.0.111]) by mail04.ics.ntt-tx.co.jp (unknown) with ESMTP id vBS4uC0m025262 for unknown; Thu, 28 Dec 2017 13:56:12 +0900 Received: (from root@localhost) by gwchk03.silk.ntt-tx.co.jp (unknown) id vBS4uA83027513 for unknown; Thu, 28 Dec 2017 13:56:10 +0900 Received: from gwchk.silk.ntt-tx.co.jp [10.107.0.110] by gwchk03.silk.ntt-tx.co.jp with ESMTP id PAA27512; Thu, 28 Dec 2017 13:56:10 +0900 Received: from imss03.silk.ntt-tx.co.jp (localhost [127.0.0.1]) by imss03.silk.ntt-tx.co.jp (unknown) with ESMTP id vBS4uAu3011258 for unknown; Thu, 28 Dec 2017 13:56:10 +0900 Received: from mgate01.silk.ntt-tx.co.jp (smtp02.silk.ntt-tx.co.jp [10.107.0.37]) by imss03.silk.ntt-tx.co.jp (unknown) with ESMTP id vBS4uAO8011255 for unknown; Thu, 28 Dec 2017 13:56:10 +0900 Message-Id: <201712280456.vBS4uAO8011255@imss03.silk.ntt-tx.co.jp> Received: from localhost by mgate01.silk.ntt-tx.co.jp (unknown) id vBS4u4bN025622 ; Thu, 28 Dec 2017 13:56:07 +0900 From: x-fn-spp@sl.ntt-tx.co.jp To: spp@dpdk.org Date: Thu, 28 Dec 2017 13:55:56 +0900 X-Mailer: git-send-email 1.9.1 In-Reply-To: <4aae78ff-3b6c-cdfe-a8b7-24ec08b73935@lab.ntt.co.jp> References: <4aae78ff-3b6c-cdfe-a8b7-24ec08b73935@lab.ntt.co.jp> X-TM-AS-MML: No Subject: [spp] [PATCH 49/57] spp_vf: refactor comments in classifier_mac.c X-BeenThere: spp@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Soft Patch Panel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Dec 2017 04:56:14 -0000 From: Hiroyuki Nakamura * Add supplemental description for the reason why hash table count is needed. * Add TODO for adding explanations of data structures. Signed-off-by: Yasufumi Ogawa --- src/vf/classifier_mac.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/vf/classifier_mac.c b/src/vf/classifier_mac.c index a088040..e2aa715 100644 --- a/src/vf/classifier_mac.c +++ b/src/vf/classifier_mac.c @@ -61,6 +61,8 @@ static const size_t HASH_TABLE_NAME_BUF_SZ = static const size_t ETHER_ADDR_STR_BUF_SZ = ETHER_ADDR_LEN * 2 + (ETHER_ADDR_LEN - 1) + 1; +/* TODO(yasufum) add explanation of data structure of classifier and mng info */ + /* classified data (destination port, target packets, etc) */ struct classified_data { enum port_type if_type; @@ -90,10 +92,12 @@ struct classifier_mac_mng_info { /* classifier information per lcore */ static struct classifier_mac_mng_info g_classifier_mng_info[RTE_MAX_LCORE]; -/* hash table count. use to make hash table name. - [reason for value] - it is incremented at the time of use, - but since we want to start at 0. */ +/** + * Hash table count used for making a name of hash table + * + * This function is required because it is incremented at the time of use, + * but since we want to start at 0. + */ static rte_atomic16_t g_hash_table_count = RTE_ATOMIC16_INIT(0xff); static inline int -- 1.9.1