From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com [74.125.82.44]) by dpdk.org (Postfix) with ESMTP id 8EAAE1B1FF for ; Mon, 9 Oct 2017 16:45:47 +0200 (CEST) Received: by mail-wm0-f44.google.com with SMTP id u138so24261665wmu.4 for ; Mon, 09 Oct 2017 07:45:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=IVzXEjN43EIn8gmNh3tXvIdE2ycfWYIl2Bl6WSovjJo=; b=dx9PkBNCPXdId3F+He5ukcSa9XJ/QreHjUMysYPyd41OkUVSWX2A1Ytg++AyP5HpeC 0PJEQQxz5sN3TSGFcFbq9DQCdcKxYvup6IXkKODu5lZduU7qwz0yu5hM1KgrwH2tJhco LPJ1ALZv9+4u1ApNnQiP8tvhVs/ezANBPulA7b8PZykZihLA9Tff3yfduomTu8Gq8Pez q0uzvqpT4z0cEIJyMf1Omf57nlXIIdy/WxXKh87Ng52JSyRXRqLRsnFNw7csT1GyHcOJ P+wPMPKb1BBHoMLuqcC0anZt9UmuwM1KTitSTsmAHOAuDJoBbfLUKsmqQQZjLgEA/8aA JD7A== 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:in-reply-to:references; bh=IVzXEjN43EIn8gmNh3tXvIdE2ycfWYIl2Bl6WSovjJo=; b=mNX+jTwhXlVUnuRVAO6IzQm5aGrJasc35dg1wEaE8829ANo1pndjYhjRXP8WBP54ls ez49pZ6IOHDQC/8RAqAKmtXY+afsTRlvh/jmVrKhY6kJhzPPSQJRbq+juhgUmwCJhQ/x FpFTUWn7rg2TH9W42PsJEGKd1i8wGe1EChtG/mOVThfF/NmTWK1esM9S/oBpZMampbLm lo2pMkok1XzDemdHlY/LcRsTOa5AAZwhwwUgcWYEaHWWlZjaikg3RyJ5lAmrbV64FquI nX1Tgd/FodHxYQGWTzlOG3nYbbjhB9uX7rONjigjAU2nv12Uc8lhofmcr/S+hQCyHm+n 7ujg== X-Gm-Message-State: AMCzsaVHTkFORkMlXECzA7mFQNGmAscYHXpgQ+9cpehruFxpqoyLpyXX H+6qDRAyrVtkhvamqQvvrykpibAysg== X-Google-Smtp-Source: AOwi7QB2+y+r3VQML04lfE0GRwP+s8UMANA1HMDpXJnd2Xhl9PgweLHiCEPZpwLvWbcrG6JKRte6QQ== X-Received: by 10.28.211.69 with SMTP id k66mr8178058wmg.1.1507560347100; Mon, 09 Oct 2017 07:45:47 -0700 (PDT) Received: from ping.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id x15sm6791495wma.32.2017.10.09.07.45.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 09 Oct 2017 07:45:46 -0700 (PDT) From: Nelio Laranjeiro To: dev@dpdk.org Cc: adrien.mazarguil@6wind.com, yskoh@mellanox.com, ferruh.yigit@intel.com Date: Mon, 9 Oct 2017 16:45:02 +0200 Message-Id: X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH v3 26/30] net/mlx5: reorganise functions in the file 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: Mon, 09 Oct 2017 14:45:47 -0000 Move mlx5_flow_validate/create/flush/isolate() to the end of the file. Signed-off-by: Nelio Laranjeiro Acked-by: Yongseok Koh --- drivers/net/mlx5/mlx5_flow.c | 132 +++++++++++++++++++++---------------------- 1 file changed, 66 insertions(+), 66 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 6d7a29e..f809ed5 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -1347,26 +1347,6 @@ priv_flow_destroy(struct priv *priv, } /** - * Destroy a flow. - * - * @see rte_flow_destroy() - * @see rte_flow_ops - */ -int -mlx5_flow_destroy(struct rte_eth_dev *dev, - struct rte_flow *flow, - struct rte_flow_error *error) -{ - struct priv *priv = dev->data->dev_private; - - (void)error; - priv_lock(priv); - priv_flow_destroy(priv, &priv->flows, flow); - priv_unlock(priv); - return 0; -} - -/** * Destroy all flows. * * @param priv @@ -1386,25 +1366,6 @@ priv_flow_flush(struct priv *priv, struct mlx5_flows *list) } /** - * Destroy all flows. - * - * @see rte_flow_flush() - * @see rte_flow_ops - */ -int -mlx5_flow_flush(struct rte_eth_dev *dev, - struct rte_flow_error *error) -{ - struct priv *priv = dev->data->dev_private; - - (void)error; - priv_lock(priv); - priv_flow_flush(priv, &priv->flows); - priv_unlock(priv); - return 0; -} - -/** * Create drop queue. * * @param priv @@ -1609,33 +1570,6 @@ priv_flow_start(struct priv *priv, struct mlx5_flows *list) } /** - * Isolated mode. - * - * @see rte_flow_isolate() - * @see rte_flow_ops - */ -int -mlx5_flow_isolate(struct rte_eth_dev *dev, - int enable, - struct rte_flow_error *error) -{ - struct priv *priv = dev->data->dev_private; - - priv_lock(priv); - if (dev->data->dev_started) { - rte_flow_error_set(error, EBUSY, - RTE_FLOW_ERROR_TYPE_UNSPECIFIED, - NULL, - "port must be stopped first"); - priv_unlock(priv); - return -rte_errno; - } - priv->isolated = !!enable; - priv_unlock(priv); - return 0; -} - -/** * Verify the flow list is empty * * @param priv @@ -1745,3 +1679,69 @@ mlx5_ctrl_flow(struct rte_eth_dev *dev, { return mlx5_ctrl_flow_vlan(dev, eth_spec, eth_mask, NULL, NULL); } + +/** + * Destroy a flow. + * + * @see rte_flow_destroy() + * @see rte_flow_ops + */ +int +mlx5_flow_destroy(struct rte_eth_dev *dev, + struct rte_flow *flow, + struct rte_flow_error *error) +{ + struct priv *priv = dev->data->dev_private; + + (void)error; + priv_lock(priv); + priv_flow_destroy(priv, &priv->flows, flow); + priv_unlock(priv); + return 0; +} + +/** + * Destroy all flows. + * + * @see rte_flow_flush() + * @see rte_flow_ops + */ +int +mlx5_flow_flush(struct rte_eth_dev *dev, + struct rte_flow_error *error) +{ + struct priv *priv = dev->data->dev_private; + + (void)error; + priv_lock(priv); + priv_flow_flush(priv, &priv->flows); + priv_unlock(priv); + return 0; +} + +/** + * Isolated mode. + * + * @see rte_flow_isolate() + * @see rte_flow_ops + */ +int +mlx5_flow_isolate(struct rte_eth_dev *dev, + int enable, + struct rte_flow_error *error) +{ + struct priv *priv = dev->data->dev_private; + + priv_lock(priv); + if (dev->data->dev_started) { + rte_flow_error_set(error, EBUSY, + RTE_FLOW_ERROR_TYPE_UNSPECIFIED, + NULL, + "port must be stopped first"); + priv_unlock(priv); + return -rte_errno; + } + priv->isolated = !!enable; + priv_unlock(priv); + return 0; +} -- 2.1.4