From patchwork Fri Aug 24 12:16:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Duszynski X-Patchwork-Id: 43851 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CAA3C4CC3; Fri, 24 Aug 2018 14:17:10 +0200 (CEST) Received: from mail-lf1-f67.google.com (mail-lf1-f67.google.com [209.85.167.67]) by dpdk.org (Postfix) with ESMTP id 8D4764CA1 for ; Fri, 24 Aug 2018 14:17:05 +0200 (CEST) Received: by mail-lf1-f67.google.com with SMTP id q13-v6so6552134lfc.2 for ; Fri, 24 Aug 2018 05:17:05 -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=uJY5kGQyXqocihMq/IZlrGHlls1nZpVpbreSaiLxw+DCzRuV/ayapKD0t7SzSjAikh 8TiHmJ7hVwSRlr5mHOsBmOd26di+dBTG9mF53/j/4uUZ647qz0JYhuklpbGyuubYQXSO H2qChE6iKfCbQA+daN5AyTIijsF5rwbayFkSJ5JN3fmr3tV7CI9ar9lWYl2Ut95UfONJ 8O+v4vxqZIbABjs1baSR8s3BYlgSklpPdADebLkgEGRuu2AjabDIny2wL9fwXtLowWku GeLLj4HLrkGNsUffvi++AQuAM51LP1f67PdyAKCqcfeDDjwTCXJtWifPVC2wB/XeA7Bj 8SOw== 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=uZppmkkECOTxo2faFLuXrqEPhfWDuAgVDJ/lNvJAq3enpC2/5MJycbBkVppJFxsmW4 Xo8n4jTl7yWp8Tms7T6ToanWDd6d28TkgkxrGncc5ZcSOMjDWZ8H2jYiT2ciOeROJtBS b/5/KPt/hLHPvRvWmq9sCdFBF4T6Qyq/j+YxUT2EpDP+u0hmaXkPiQWDOHWwoyOuN8aP j3ZtPyS9qWQr6pfp3k3igSjHchJNHLWVmzYeQO3SJe9vw1CDYF5Qjhj27W7hVl19nE1q nMVKzuZr2DecDftLsxoLioft0QBsVdlpdBvEuziZvPHOI3rwtFiugxa/SeTn6895lc0P EY8g== X-Gm-Message-State: APzg51B6RiQBud1Gnm1En2PF6cSW6fQYvrA5Yjskpt0lQFBxe5mK70DD RXikWrl5muMhV/gakSAqG8tcgR+cKr8= X-Google-Smtp-Source: ANB0VdZj8hzREZ56Bt4Kq+UEUWzD3s0JJubBKkYIpjead0XPoVpSrDLnQOX8JbVQReMhpCAZAK3bYw== X-Received: by 2002:a19:1a05:: with SMTP id a5-v6mr1198939lfa.54.1535113024947; Fri, 24 Aug 2018 05:17:04 -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 a18-v6sm1177672ljk.47.2018.08.24.05.17.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 24 Aug 2018 05:17:03 -0700 (PDT) From: Tomasz Duszynski To: dev@dpdk.org Cc: nsamsono@marvell.com, mw@semihalf.com, tdu@semihalf.com Date: Fri, 24 Aug 2018 14:16:44 +0200 Message-Id: <1535113006-9393-5-git-send-email-tdu@semihalf.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1535113006-9393-1-git-send-email-tdu@semihalf.com> References: <1535113006-9393-1-git-send-email-tdu@semihalf.com> Subject: [dpdk-dev] [PATCH 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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.