From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) by dpdk.org (Postfix) with ESMTP id C232A99C5 for ; Fri, 1 Sep 2017 10:08:21 +0200 (CEST) Received: by mail-wm0-f48.google.com with SMTP id u26so3752354wma.0 for ; Fri, 01 Sep 2017 01:08:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references; bh=HlZjhSUYfqc90U/+Ulm7dP9DweO28vGQ1bKm3jcd0WQ=; b=dGBbEgermb6l1F1OSaHt4YdFdfvo4Ay/KUkAlrkY8WkG6I6aHkDw1IvDWqx2rb0fyy pOpkwBxtjHDVO12j7FSJDpP4Xx8ieYNOJz+mzg71bT34w0JK/OmClhhbiIAx89zwCU3m x5fEiTbPzest5upU6J0GRPpCRoeMToBr8Pdo7/Q9l7VLL8UorU/yjQh8Hbuq1mya8SbQ /xltp2JMEQfQZAHmWupWFWFx8t2rH5uMjXuDGYz46urWMbNLFDPNiu3z5dXxTxriPfGJ KOCeCu6o3D9gY0tpWYc/w/6NwA9CleRC6HJfgv+QBywLKJ80b8QqiSSd+//9zA42/PXz ZOhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=HlZjhSUYfqc90U/+Ulm7dP9DweO28vGQ1bKm3jcd0WQ=; b=bxTEQ99bfBxR4EexIxQbsql1v66kLLfkQ63/IwLcZsRBAm54rHVCrpOW8rfLfNlZ1m yI8/1Jhs62hGuf5L0vOj0/r0EEubMNkMCAwWQYE2l3UpoI00G8z8mH/OjmEZtaOi0CcN nJ/P6SmmeRv/+5nXTiEihaFIAl9Dk6lrcVuVdAELn0FBRVWe/eckqUMK+skNR6cLf5gv +OL4X+t5MBCHTEHXgQ2OPiQRS8ppLjWhD+Qu7zpY09CMCRBCZQCARoH5uhTk3DXOGcMU npFsVUgtR0pmNZ195qxq42eUc/R068jtD/pF0rzdzvWAQgryQN4jfeag+e3cr54Bbkg8 awwg== X-Gm-Message-State: AHPjjUizz3qqeAL8pSG4cXVrr/B2tYNT7dzTb+FlxUCEj8gTAvhx14ll Ggm9Woz37F0rviZ9Igo= X-Google-Smtp-Source: ADKCNb40MjQVVb873B3yOew6JWGRGVGvGqaPAYD0vpyLgNPpqIHxwiXrdDY3AEr2TJPD6DRo4xMunA== X-Received: by 10.28.32.14 with SMTP id g14mr698040wmg.24.1504253301281; Fri, 01 Sep 2017 01:08:21 -0700 (PDT) Received: from 6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id n13sm1490731wmg.2.2017.09.01.01.08.20 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Sep 2017 01:08:20 -0700 (PDT) From: Adrien Mazarguil To: dev@dpdk.org Date: Fri, 1 Sep 2017 10:07:02 +0200 Message-Id: <97572f56fa1dcd29c70904cc43c6c77671181d4b.1504252977.git.adrien.mazarguil@6wind.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: Subject: [dpdk-dev] [PATCH v2 47/51] net/mlx4: rename private functions in flow API 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, 01 Sep 2017 08:08:22 -0000 While internal static functions do not cause link time conflicts, this differentiates them from their mlx5 PMD counterparts while debugging. No impact on functionality. Signed-off-by: Adrien Mazarguil --- drivers/net/mlx4/mlx4.c | 4 ++-- drivers/net/mlx4/mlx4_flow.c | 30 +++++++++++++++--------------- drivers/net/mlx4/mlx4_flow.h | 4 ++-- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c index e095a9f..ed1081b 100644 --- a/drivers/net/mlx4/mlx4.c +++ b/drivers/net/mlx4/mlx4.c @@ -253,7 +253,7 @@ mlx4_dev_start(struct rte_eth_dev *dev) (void *)dev); goto err; } - ret = mlx4_priv_flow_start(priv); + ret = mlx4_flow_start(priv); if (ret) { ERROR("%p: flow start failed: %s", (void *)dev, strerror(ret)); @@ -284,7 +284,7 @@ mlx4_dev_stop(struct rte_eth_dev *dev) return; DEBUG("%p: detaching flows from all RX queues", (void *)dev); priv->started = 0; - mlx4_priv_flow_stop(priv); + mlx4_flow_stop(priv); mlx4_intr_uninstall(priv); mlx4_mac_addr_del(priv); } diff --git a/drivers/net/mlx4/mlx4_flow.c b/drivers/net/mlx4/mlx4_flow.c index 6401a83..5616b83 100644 --- a/drivers/net/mlx4/mlx4_flow.c +++ b/drivers/net/mlx4/mlx4_flow.c @@ -561,7 +561,7 @@ static const struct mlx4_flow_items mlx4_flow_items[] = { }; /** - * Validate a flow supported by the NIC. + * Make sure a flow rule is supported and initialize associated structure. * * @param priv * Pointer to private structure. @@ -580,12 +580,12 @@ static const struct mlx4_flow_items mlx4_flow_items[] = { * 0 on success, a negative errno value otherwise and rte_errno is set. */ static int -priv_flow_validate(struct priv *priv, - const struct rte_flow_attr *attr, - const struct rte_flow_item items[], - const struct rte_flow_action actions[], - struct rte_flow_error *error, - struct mlx4_flow *flow) +mlx4_flow_prepare(struct priv *priv, + const struct rte_flow_attr *attr, + const struct rte_flow_item items[], + const struct rte_flow_action actions[], + struct rte_flow_error *error, + struct mlx4_flow *flow) { const struct mlx4_flow_items *cur_item = mlx4_flow_items; struct mlx4_flow_action action = { @@ -725,7 +725,7 @@ mlx4_flow_validate(struct rte_eth_dev *dev, struct priv *priv = dev->data->dev_private; struct mlx4_flow flow = { .offset = sizeof(struct ibv_flow_attr) }; - return priv_flow_validate(priv, attr, items, actions, error, &flow); + return mlx4_flow_prepare(priv, attr, items, actions, error, &flow); } /** @@ -817,7 +817,7 @@ mlx4_flow_create_drop_queue(struct priv *priv) * A flow if the rule could be created. */ static struct rte_flow * -priv_flow_create_action_queue(struct priv *priv, +mlx4_flow_create_action_queue(struct priv *priv, struct ibv_flow_attr *ibv_attr, struct mlx4_flow_action *action, struct rte_flow_error *error) @@ -875,7 +875,7 @@ mlx4_flow_create(struct rte_eth_dev *dev, struct mlx4_flow flow = { .offset = sizeof(struct ibv_flow_attr), }; int err; - err = priv_flow_validate(priv, attr, items, actions, error, &flow); + err = mlx4_flow_prepare(priv, attr, items, actions, error, &flow); if (err) return NULL; flow.ibv_attr = rte_malloc(__func__, flow.offset, 0); @@ -894,8 +894,8 @@ mlx4_flow_create(struct rte_eth_dev *dev, .port = priv->port, .flags = 0, }; - claim_zero(priv_flow_validate(priv, attr, items, actions, - error, &flow)); + claim_zero(mlx4_flow_prepare(priv, attr, items, actions, + error, &flow)); action = (struct mlx4_flow_action){ .queue = 0, .drop = 0, @@ -917,7 +917,7 @@ mlx4_flow_create(struct rte_eth_dev *dev, goto exit; } } - rte_flow = priv_flow_create_action_queue(priv, flow.ibv_attr, + rte_flow = mlx4_flow_create_action_queue(priv, flow.ibv_attr, &action, error); if (rte_flow) { LIST_INSERT_HEAD(&priv->flows, rte_flow, next); @@ -1015,7 +1015,7 @@ mlx4_flow_flush(struct rte_eth_dev *dev, * Pointer to private structure. */ void -mlx4_priv_flow_stop(struct priv *priv) +mlx4_flow_stop(struct priv *priv) { struct rte_flow *flow; @@ -1039,7 +1039,7 @@ mlx4_priv_flow_stop(struct priv *priv) * 0 on success, a errno value otherwise and rte_errno is set. */ int -mlx4_priv_flow_start(struct priv *priv) +mlx4_flow_start(struct priv *priv) { int ret; struct ibv_qp *qp; diff --git a/drivers/net/mlx4/mlx4_flow.h b/drivers/net/mlx4/mlx4_flow.h index 8bd659c..a24ae31 100644 --- a/drivers/net/mlx4/mlx4_flow.h +++ b/drivers/net/mlx4/mlx4_flow.h @@ -74,8 +74,8 @@ struct mlx4_flow_action { /* mlx4_flow.c */ -int mlx4_priv_flow_start(struct priv *priv); -void mlx4_priv_flow_stop(struct priv *priv); +int mlx4_flow_start(struct priv *priv); +void mlx4_flow_stop(struct priv *priv); int mlx4_filter_ctrl(struct rte_eth_dev *dev, enum rte_filter_type filter_type, enum rte_filter_op filter_op, -- 2.1.4