From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f169.google.com (mail-wr0-f169.google.com [209.85.128.169]) by dpdk.org (Postfix) with ESMTP id 888191B231 for ; Thu, 5 Oct 2017 14:50:47 +0200 (CEST) Received: by mail-wr0-f169.google.com with SMTP id b21so10766611wrg.7 for ; Thu, 05 Oct 2017 05:50: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=RwyokRSnCy9RaGDiLljtUMkY5ABunHxIGCP0uipiDSs=; b=s9PWnu3leFOJY/T3Su7oVvDsgMZ/rM/NfROpV9Ld9NGtObI6i+vBPsjJY43wIOPB6r Di+IlenYh05a6YWVIS7fUAaTTDHSvfOz3/mMEkl2R0lmsOOktA1Q0PqfBI8VSjttqkTB grrBfgteZNDktakcNjrpUyVGzzjIYHrzpEf6+ua3+ySGPGFA+pGmws5OXON2qnAg4Mzy UbtCU5uIxb43RYiztsDOoKzYaMLD0FXm2RC6GymrtQVUvHWqlEEN63Cg/4vJM2qbkY24 bZaINIzpYV0bRLVLLnopPW0quZ/9aBX51ytb9GbUSEKJ9QdEzD0p5ZyPlCrbA0cbDUEF 9Lqw== 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=RwyokRSnCy9RaGDiLljtUMkY5ABunHxIGCP0uipiDSs=; b=L3LZHdS2f1noD9mH6cmg/qVxu7v3YsYYiPKCHl+iMR3xFPRyXFBc5DZfld+luCyHPt ykdcrcbKFQmF1YmuB6lUGJnP83KQArqAAOBXMAszPuz7ijOvIzGZ3F1zDuLjcvR5qz1j G/4m+RDpmCXXIg4xz5kb3aUmAgPyyQRH8HhyAFoWiZl7tssuWlMHNEzLD4EeLKftO5jY v0h90ZnBGN9kl5L3w4gqsSDouS8ixZXXwSYJYCm3qT8oahPDudhYgKxxd56buvcI178u yk6JVlJchx3pM4TtK4huiT4JK+n1dW5ek8KGdkKpLk8McaoBLAGbnNOkkMNugUTaBc3Y 3SAQ== X-Gm-Message-State: AMCzsaUrzpKxVTbf+CpMHfiQ77c2/KNnHXsN5cWsDQdpu3prPtY08d2Z n41rmRRGauvZMBuisB93GWHN6ak3PA== X-Google-Smtp-Source: AOwi7QDD8FQyj2XNOLtI6WqsE9IPQK2BMvpTQ/c/ryhpH0slbtFg+c/mF6ElgaYDuofT3vGzEf5QPA== X-Received: by 10.223.128.3 with SMTP id 3mr14809657wrk.196.1507207847045; Thu, 05 Oct 2017 05:50: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 k9sm26405823wrk.27.2017.10.05.05.50.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 05 Oct 2017 05:50:46 -0700 (PDT) From: Nelio Laranjeiro To: dev@dpdk.org Cc: adrien.mazarguil@6wind.com, yskoh@mellanox.com, ferruh.yigit@intel.com Date: Thu, 5 Oct 2017 14:49:58 +0200 Message-Id: X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH v2 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: Thu, 05 Oct 2017 12:50:47 -0000 Move mlx5_flow_validate/create/flush/isolate() to the end of the file. Signed-off-by: Nelio Laranjeiro --- 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 454325c..2fb50b3 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