DPDK patches and discussions
 help / color / mirror / Atom feed
From: Li Zhang <lizh@nvidia.com>
To: dekelp@nvidia.com, orika@nvidia.com, viacheslavo@nvidia.com,
	matan@nvidia.com, shahafs@nvidia.com,
	cristian.dumitrescu@intel.com, lironh@marvell.com
Cc: dev@dpdk.org, thomas@monjalon.net, rasland@nvidia.com, roniba@nvidia.com
Subject: [dpdk-dev] [PATCH 2/2] net/mvpp2: check meter packet mode
Date: Thu,  1 Apr 2021 09:16:17 +0300	[thread overview]
Message-ID: <20210401061618.1478961-3-lizh@nvidia.com> (raw)
In-Reply-To: <20210401061618.1478961-1-lizh@nvidia.com>

Currently meter algorithms only supports bytes per second(BPS).
Check packet_mode set to TRUE are rejected.

Signed-off-by: Li Zhang <lizh@nvidia.com>
---
 drivers/net/mvpp2/mrvl_mtr.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/mvpp2/mrvl_mtr.c b/drivers/net/mvpp2/mrvl_mtr.c
index 2fa5cb43ad..055be6f6b1 100644
--- a/drivers/net/mvpp2/mrvl_mtr.c
+++ b/drivers/net/mvpp2/mrvl_mtr.c
@@ -88,6 +88,12 @@ mrvl_meter_profile_add(struct rte_eth_dev *dev, uint32_t meter_profile_id,
 					  NULL,
 					  "Only srTCM RFC 2697 is supported\n");
 
+	if (profile->packet_mode)
+		return -rte_mtr_error_set(error, EINVAL,
+					  RTE_MTR_ERROR_TYPE_UNSPECIFIED,
+					  NULL,
+					  "Packet mode is not supported\n");
+
 	prof = mrvl_mtr_profile_from_id(priv, meter_profile_id);
 	if (prof)
 		return -rte_mtr_error_set(error, EEXIST,
-- 
2.27.0


  parent reply	other threads:[~2021-04-01  6:16 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-01  6:16 [dpdk-dev] [PATCH 0/2] Check meter packet mode in PMD Li Zhang
2021-04-01  6:16 ` [dpdk-dev] [PATCH 1/2] net/softnic: check meter packet mode Li Zhang
2021-04-07 20:13   ` Dumitrescu, Cristian
2021-04-08  2:31     ` Li Zhang
2021-04-01  6:16 ` Li Zhang [this message]
2021-04-07 20:13   ` [dpdk-dev] [PATCH 2/2] net/mvpp2: " Dumitrescu, Cristian
2021-04-08  2:32     ` Li Zhang
2021-04-01  6:31 ` [dpdk-dev] [PATCH 0/2] Check meter packet mode in PMD Thomas Monjalon
2021-04-01  6:52   ` Li Zhang
2021-04-01  7:04     ` Thomas Monjalon
2021-04-01  7:37       ` Li Zhang
2021-04-01  7:44         ` Thomas Monjalon
2021-04-01  8:50           ` Li Zhang

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=20210401061618.1478961-3-lizh@nvidia.com \
    --to=lizh@nvidia.com \
    --cc=cristian.dumitrescu@intel.com \
    --cc=dekelp@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=lironh@marvell.com \
    --cc=matan@nvidia.com \
    --cc=orika@nvidia.com \
    --cc=rasland@nvidia.com \
    --cc=roniba@nvidia.com \
    --cc=shahafs@nvidia.com \
    --cc=thomas@monjalon.net \
    --cc=viacheslavo@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).