git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
event/cnxk: support vectorized Rx event fast path
[dpdk.git]
/
drivers
/
net
/
mvpp2
/
mrvl_mtr.c
diff --git
a/drivers/net/mvpp2/mrvl_mtr.c
b/drivers/net/mvpp2/mrvl_mtr.c
index
9cd53be
..
c07ac95
100644
(file)
--- a/
drivers/net/mvpp2/mrvl_mtr.c
+++ b/
drivers/net/mvpp2/mrvl_mtr.c
@@
-1,5
+1,4
@@
-/*-
- * SPDX-License-Identifier: BSD-3-Clause
+/* SPDX-License-Identifier: BSD-3-Clause
* Copyright(c) 2018 Marvell International Ltd.
* Copyright(c) 2018 Semihalf.
* All rights reserved.
* Copyright(c) 2018 Marvell International Ltd.
* Copyright(c) 2018 Semihalf.
* All rights reserved.
@@
-89,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");
NULL,
"Only srTCM RFC 2697 is supported\n");
+ if (profile->packet_mode)
+ return -rte_mtr_error_set(error, EINVAL,
+ RTE_MTR_ERROR_TYPE_METER_PROFILE_PACKET_MODE,
+ 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,
prof = mrvl_mtr_profile_from_id(priv, meter_profile_id);
if (prof)
return -rte_mtr_error_set(error, EEXIST,
@@
-330,6
+335,12
@@
mrvl_create(struct rte_eth_dev *dev, uint32_t mtr_id,
struct mrvl_mtr_profile *profile;
struct mrvl_mtr *mtr;
struct mrvl_mtr_profile *profile;
struct mrvl_mtr *mtr;
+ profile = mrvl_mtr_profile_from_id(priv, params->meter_profile_id);
+ if (!profile)
+ return -rte_mtr_error_set(error, EINVAL,
+ RTE_MTR_ERROR_TYPE_METER_PROFILE_ID,
+ NULL, "Profile id does not exist\n");
+
mtr = mrvl_mtr_from_id(priv, mtr_id);
if (mtr)
return -rte_mtr_error_set(error, EEXIST,
mtr = mrvl_mtr_from_id(priv, mtr_id);
if (mtr)
return -rte_mtr_error_set(error, EEXIST,
@@
-342,12
+353,6
@@
mrvl_create(struct rte_eth_dev *dev, uint32_t mtr_id,
RTE_MTR_ERROR_TYPE_UNSPECIFIED,
NULL, NULL);
RTE_MTR_ERROR_TYPE_UNSPECIFIED,
NULL, NULL);
- profile = mrvl_mtr_profile_from_id(priv, params->meter_profile_id);
- if (!profile)
- return -rte_mtr_error_set(error, EINVAL,
- RTE_MTR_ERROR_TYPE_METER_PROFILE_ID,
- NULL, "Profile id does not exist\n");
-
mtr->shared = shared;
mtr->mtr_id = mtr_id;
mtr->plcr_bit = MRVL_PLCR_BIT_INVALID;
mtr->shared = shared;
mtr->mtr_id = mtr_id;
mtr->plcr_bit = MRVL_PLCR_BIT_INVALID;
@@
-422,7
+427,7
@@
mrvl_meter_profile_update(struct rte_eth_dev *dev, uint32_t mtr_id,
struct mrvl_priv *priv = dev->data->dev_private;
struct mrvl_mtr_profile *profile;
struct mrvl_mtr *mtr;
struct mrvl_priv *priv = dev->data->dev_private;
struct mrvl_mtr_profile *profile;
struct mrvl_mtr *mtr;
- int ret, enabled;
+ int ret, enabled
= 0
;
if (!priv->ppio)
return -rte_mtr_error_set(error, EPERM,
if (!priv->ppio)
return -rte_mtr_error_set(error, EPERM,