From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-f68.google.com (mail-lf1-f68.google.com [209.85.167.68]) by dpdk.org (Postfix) with ESMTP id 663C41B053 for ; Fri, 24 Aug 2018 20:30:30 +0200 (CEST) Received: by mail-lf1-f68.google.com with SMTP id h64-v6so5874881lfi.10 for ; Fri, 24 Aug 2018 11:30:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=DuNIJKs2ebfo80SbqgaSWcAxNGMIp5DumfTiALAK+uI=; b=WGHeCDGozTK8+2HtoGSWeHfuKO6ZgDb8MNMuPBoqCA7Nn7chOo26mtnRPuzf+m1h07 Xj/3ht74hZb3/uBQ43qnMV4qmCEqX0V7Wjs1r0IasdGkSokD5fC3LAEZumlZhGGR0shL 7ZVn+prIZESOQUd6Qbfr7AOcuCMS8X2Mt6edcvMu3Bm8A3uEiyngpw5wsxOM2Y1xWNuV +XEE0zxb3gdR3mwFRGqSsUtjJTUVUBrAICvue4npZ2OGOU45IO4MuqKquw13j8n6gMWq MyvVsf8NBzN+aiYDAcEdOgtlPRZHAnvh2DQcK1g8P80NpdNbeTtFJFhY4UmLRqSkF5dF QbWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=DuNIJKs2ebfo80SbqgaSWcAxNGMIp5DumfTiALAK+uI=; b=Dsx6YpFTk+q66RlgsbfYPnguqBmCplj8wseSg6wLlYQ1mrm2286ReLq21KeL58ZGlg b6lY/Qsu2cC8FKGdNGkA3BoesAQOZKtZ8i09xKTrIMMEJecAJg3HHIrfNxiyCBZmHA5s 9dO+Tdfvd4lOY70/DUGVR6xmIReGvc7rlufFvppkcqisFZqHl99Yj08x8qy3lk7PW72e OTxIXrvAWp+vHUP2qsm/jE6N3ShkVu4g6bfufYaKe8VykHE/tiZ1m711IM0kOm7P0EKH V/x9EbmnaVyqwceG3PMAeMR7sS2NxFpUdnD1f3b47mR636HwSOnzSp/VcCvlWt8Hu+tJ UCMg== X-Gm-Message-State: APzg51BAfa0l3prFZrwBdGwPK0FjRk/6rIS7nBFUAAXORvVCGLzhGPog BwlBD8LVKgsGv4xjH4/va/RHdNX7/Dc= X-Google-Smtp-Source: ANB0VdZ58Bt4eGptfynA8K5PjeR1gmA7rxl946TwZajh8+8yqHurmeTh4hl3tZFhoW7zZtIXk60AXQ== X-Received: by 2002:a19:a915:: with SMTP id s21-v6mr2158567lfe.92.1535135429883; Fri, 24 Aug 2018 11:30:29 -0700 (PDT) Received: from sh.semihalf.local (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173]) by smtp.gmail.com with ESMTPSA id g16-v6sm1420484lfb.5.2018.08.24.11.30.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 24 Aug 2018 11:30:29 -0700 (PDT) From: Tomasz Duszynski To: dev@dpdk.org Cc: nsamsono@marvell.com, mw@semihalf.com, tdu@semihalf.com Date: Fri, 24 Aug 2018 20:30:01 +0200 Message-Id: <1535135403-16115-5-git-send-email-tdu@semihalf.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1535135403-16115-1-git-send-email-tdu@semihalf.com> References: <1535122494-30249-1-git-send-email-tdu@semihalf.com> <1535135403-16115-1-git-send-email-tdu@semihalf.com> Subject: [dpdk-dev] [PATCH v3 4/6] net/mvpp2: fix comments and error messages X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Aug 2018 18:30:30 -0000 From: Natalie Samsonov Fix comments and error messages. Fixes: 7235341d7517 ("net/mrvl: support classifier") Cc: tdu@semihalf.com Signed-off-by: Natalie Samsonov Reviewed-by: Liron Himi --- drivers/net/mvpp2/mrvl_flow.c | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/drivers/net/mvpp2/mrvl_flow.c b/drivers/net/mvpp2/mrvl_flow.c index ecc3419..13295e6 100644 --- a/drivers/net/mvpp2/mrvl_flow.c +++ b/drivers/net/mvpp2/mrvl_flow.c @@ -394,7 +394,8 @@ mrvl_parse_init(const struct rte_flow_item *item, * * @param spec Pointer to the specific flow item. * @param mask Pointer to the specific flow item's mask. - * @param mask Pointer to the flow. + * @param parse_dst Parse either destination or source mac address. + * @param flow Pointer to the flow. * @return 0 in case of success, negative error value otherwise. */ static int @@ -613,6 +614,7 @@ mrvl_parse_ip4_dscp(const struct rte_flow_item_ipv4 *spec, * * @param spec Pointer to the specific flow item. * @param mask Pointer to the specific flow item's mask. + * @param parse_dst Parse either destination or source ip address. * @param flow Pointer to the flow. * @return 0 in case of success, negative error value otherwise. */ @@ -726,6 +728,7 @@ mrvl_parse_ip4_proto(const struct rte_flow_item_ipv4 *spec, * * @param spec Pointer to the specific flow item. * @param mask Pointer to the specific flow item's mask. + * @param parse_dst Parse either destination or source ipv6 address. * @param flow Pointer to the flow. * @return 0 in case of success, negative error value otherwise. */ @@ -874,6 +877,7 @@ mrvl_parse_ip6_next_hdr(const struct rte_flow_item_ipv6 *spec, * * @param spec Pointer to the specific flow item. * @param mask Pointer to the specific flow item's mask. + * @param parse_dst Parse either destination or source port. * @param flow Pointer to the flow. * @return 0 in case of success, negative error value otherwise. */ @@ -949,6 +953,7 @@ mrvl_parse_tcp_dport(const struct rte_flow_item_tcp *spec, * * @param spec Pointer to the specific flow item. * @param mask Pointer to the specific flow item's mask. + * @param parse_dst Parse either destination or source port. * @param flow Pointer to the flow. * @return 0 in case of success, negative error value otherwise. */ @@ -1022,7 +1027,6 @@ mrvl_parse_udp_dport(const struct rte_flow_item_udp *spec, * @param item Pointer to the flow item. * @param flow Pointer to the flow. * @param error Pointer to the flow error. - * @param fields Pointer to the parsed parsed fields enum. * @returns 0 on success, negative value otherwise. */ static int @@ -1073,7 +1077,6 @@ mrvl_parse_eth(const struct rte_flow_item *item, struct rte_flow *flow, * @param item Pointer to the flow item. * @param flow Pointer to the flow. * @param error Pointer to the flow error. - * @param fields Pointer to the parsed parsed fields enum. * @returns 0 on success, negative value otherwise. */ static int @@ -1139,7 +1142,6 @@ mrvl_parse_vlan(const struct rte_flow_item *item, * @param item Pointer to the flow item. * @param flow Pointer to the flow. * @param error Pointer to the flow error. - * @param fields Pointer to the parsed parsed fields enum. * @returns 0 on success, negative value otherwise. */ static int @@ -1205,7 +1207,6 @@ mrvl_parse_ip4(const struct rte_flow_item *item, * @param item Pointer to the flow item. * @param flow Pointer to the flow. * @param error Pointer to the flow error. - * @param fields Pointer to the parsed parsed fields enum. * @returns 0 on success, negative value otherwise. */ static int @@ -1276,7 +1277,6 @@ mrvl_parse_ip6(const struct rte_flow_item *item, * @param item Pointer to the flow item. * @param flow Pointer to the flow. * @param error Pointer to the flow error. - * @param fields Pointer to the parsed parsed fields enum. * @returns 0 on success, negative value otherwise. */ static int @@ -1332,7 +1332,6 @@ mrvl_parse_tcp(const struct rte_flow_item *item, * @param item Pointer to the flow item. * @param flow Pointer to the flow. * @param error Pointer to the flow error. - * @param fields Pointer to the parsed parsed fields enum. * @returns 0 on success, negative value otherwise. */ static int @@ -1981,6 +1980,7 @@ mrvl_parse_pattern_ip6_tcp(const struct rte_flow_item pattern[], * @param pattern Pointer to the flow pattern table. * @param flow Pointer to the flow. * @param error Pointer to the flow error. + * @param ip6 1 to parse ip6 item, 0 to parse ip4 item. * @returns 0 in case of success, negative value otherwise. */ static int @@ -2350,6 +2350,12 @@ mrvl_flow_parse(struct mrvl_priv *priv, const struct rte_flow_attr *attr, return mrvl_flow_parse_actions(priv, actions, flow, error); } +/** + * Get engine type for the given flow. + * + * @param field Pointer to the flow. + * @returns The type of the engine. + */ static inline enum pp2_cls_tbl_type mrvl_engine_type(const struct rte_flow *flow) { @@ -2369,6 +2375,13 @@ mrvl_engine_type(const struct rte_flow *flow) return PP2_CLS_TBL_MASKABLE; } +/** + * Create classifier table. + * + * @param dev Pointer to the device. + * @param flow Pointer to the very first flow. + * @returns 0 in case of success, negative value otherwise. + */ static int mrvl_create_cls_table(struct rte_eth_dev *dev, struct rte_flow *first_flow) { @@ -2655,7 +2668,7 @@ mrvl_flow_remove(struct mrvl_priv *priv, struct rte_flow *flow, /** * DPDK flow destroy callback called when flow is to be removed. * - * @param priv Pointer to the port's private data. + * @param dev Pointer to the device. * @param flow Pointer to the flow. * @param error Pointer to the flow error. * @returns 0 in case of success, negative value otherwise. -- 2.7.4