DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ophir Munk <ophirmu@mellanox.com>
To: dev@dpdk.org
Cc: Raslan Darawsheh <rasland@mellanox.com>,
	Ophir Munk <ophirmu@mellanox.com>,
	Matan Azrad <matan@mellanox.com>
Subject: [dpdk-dev] [PATCH v1 08/13] net/mlx5: call meter detach only if DR is supported
Date: Thu, 20 Aug 2020 14:28:29 +0000
Message-ID: <20200820142834.2984-8-ophirmu@mellanox.com> (raw)
In-Reply-To: <20200820142834.2984-1-ophirmu@mellanox.com>

Flow metering is supported only in direct rules (DR). Currently the APIs
of meter actions create and modify are under #ifdef
HAVE_MLX5_DR_CREATE_ACTION_FLOW_METER, while detaching the meter action
is executed unconditionally. This commit adds the same ifdef to API
This commit avoids compilation failure of non-Linux operating systems
which do not support DR.

Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
 drivers/net/mlx5/mlx5_flow_meter.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_flow_meter.c b/drivers/net/mlx5/mlx5_flow_meter.c
index bf34687..b36bc7b 100644
--- a/drivers/net/mlx5/mlx5_flow_meter.c
+++ b/drivers/net/mlx5/mlx5_flow_meter.c
@@ -1221,6 +1221,7 @@ mlx5_flow_meter_attach(struct mlx5_priv *priv, uint32_t meter_id,
 mlx5_flow_meter_detach(struct mlx5_flow_meter *fm)
 	if (--fm->ref_cnt)
@@ -1230,6 +1231,9 @@ mlx5_flow_meter_detach(struct mlx5_flow_meter *fm)
 	fm->ingress = 0;
 	fm->egress = 0;
 	fm->transfer = 0;
+	(void)fm;

       reply	other threads:[~2020-08-24  7:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200820142834.2984-1-ophirmu@mellanox.com>
2020-08-20 14:28 ` Ophir Munk [this message]
2020-08-20 14:28 ` [dpdk-dev] [PATCH v1 10/13] net/mlx5: remove more DV dependencies Ophir Munk
2020-08-20 14:28 ` [dpdk-dev] [PATCH v1 12/13] net/mlx5: separate vlan strip modification Ophir Munk
2020-08-20 14:50 [dpdk-dev] [PATCH v1 01/13] common/mlx5: replace strsep with strtok_r Ophir Munk
2020-08-20 14:50 ` [dpdk-dev] [PATCH v1 08/13] net/mlx5: call meter detach only if DR is supported Ophir Munk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200820142834.2984-8-ophirmu@mellanox.com \
    --to=ophirmu@mellanox.com \
    --cc=dev@dpdk.org \
    --cc=matan@mellanox.com \
    --cc=rasland@mellanox.com \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git