From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com [209.85.212.171]) by dpdk.org (Postfix) with ESMTP id 2FF6B2A9 for ; Mon, 3 Nov 2014 08:49:13 +0100 (CET) Received: by mail-wi0-f171.google.com with SMTP id q5so5669456wiv.4 for ; Sun, 02 Nov 2014 23:58:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=p7qherllRCHJYwcYOtKb188CcIbMjcgSQi+pHmTCR1o=; b=kNNFlVwvG7NrYa/ldqFqNrBhtkRT9o/F4VnON0wAwjIlK+C1cFLZyLY6QdIGqa2rrq NDYTEe2aoQVAN0IZ1lBQlm/V/lbXqQshqQYkgbu006AdPLKlOy8bqIDvjtBAPy7M5l6N FPn6FpAgcT4DvbALCO9hsXFXSlfaQ/Zf0r/PkXNquuGbr5dn6HTrsld5jSf3UeTRaFcC qPHEz8kPVNUWJuonLm4ln7+nb4gYDqwjzGAuKEuOk7SxavzhHSMRT1mx+jX3fgiMBKl+ fBFUCvXXk9iJpelPotFkcGFqZZoqtyuTX427Z0ZN6RorA9PkRWJrKh7nGEnleXpjF+9Y qgkw== X-Gm-Message-State: ALoCoQkA97oTyvNALB6vpve87qCtSZeGAWmT6hu8l8ojplDcB/ik2JysEYsjgg6Rv1N6V1JKwKSU X-Received: by 10.194.134.198 with SMTP id pm6mr107610wjb.136.1415001506207; Sun, 02 Nov 2014 23:58:26 -0800 (PST) Received: from xps13.localnet (3.17.90.92.rev.sfr.net. [92.90.17.3]) by mx.google.com with ESMTPSA id fx2sm21229364wjb.37.2014.11.02.23.58.24 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 02 Nov 2014 23:58:25 -0800 (PST) From: Thomas Monjalon To: Helin Zhang Date: Mon, 03 Nov 2014 08:57:18 +0100 Message-ID: <1845096.HFlylc4sxo@xps13> Organization: 6WIND User-Agent: KMail/4.14.2 (Linux/3.17.1-1-ARCH; KDE/4.14.2; x86_64; ; ) In-Reply-To: <1413861289-26662-3-git-send-email-helin.zhang@intel.com> References: <1413180766-12211-1-git-send-email-helin.zhang@intel.com> <1413861289-26662-1-git-send-email-helin.zhang@intel.com> <1413861289-26662-3-git-send-email-helin.zhang@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v5 2/5] ethdev: add enum type and relevant structures for hash filter control X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Nov 2014 07:49:13 -0000 2014-10-21 11:14, Helin Zhang: > +enum rte_eth_hash_filter_info_type { > + RTE_ETH_HASH_FILTER_INFO_TYPE_UNKNOWN = 0, > + RTE_ETH_HASH_FILTER_INFO_TYPE_SYM_HASH_ENA_PER_PCTYPE, PCTYPE is an unknown word in the API layer. Could you replace it by something more generic? > + RTE_ETH_HASH_FILTER_INFO_TYPE_SYM_HASH_ENA_PER_PORT, > + RTE_ETH_HASH_FILTER_INFO_TYPE_FILTER_SWAP, > + RTE_ETH_HASH_FILTER_INFO_TYPE_HASH_FUNCTION, > + RTE_ETH_HASH_FILTER_INFO_TYPE_MAX, > +}; You should comment each constant. > +struct rte_eth_sym_hash_ena_info { > + /**< packet classification type, defined in rte_ethdev.h */ > + uint8_t pctype; No, PCTYPE is not anymore defined in ethdev. > +/** > + * A structure used to set or get filter swap information, to support > + * 'RTE_ETH_FILTER_HASH', 'RTE_ETH_FILTER_GET/RTE_ETH_FILTER_SET', > + * with information type 'RTE_ETH_HASH_FILTER_INFO_TYPE_FILTER_SWAP'. > + */ > +struct rte_eth_filter_swap_info { > + /**< Packet classification type, defined in rte_ethdev.h */ > + uint8_t pctype; > + /**< Offset of the 1st field of the 1st couple to be swapped. */ > + uint8_t off0_src0; > + /**< Offset of the 2nd field of the 1st couple to be swapped. */ > + uint8_t off0_src1; > + /**< Field length of the first couple. */ > + uint8_t len0; > + /**< Offset of the 1st field of the 2nd couple to be swapped. */ > + uint8_t off1_src0; > + /**< Offset of the 2nd field of the 2nd couple to be swapped. */ > + uint8_t off1_src1; > + /**< Field length of the second couple. */ > + uint8_t len1; > +}; I guess it would be easier to understand if RTE_ETH_HASH_FILTER_INFO_TYPE_FILTER_SWAP was defined previously. -- Thomas