From: John Daley <johndale@cisco.com>
To: adrien.mazarguil@6wind.com
Cc: dev@dpdk.org, John Daley <johndale@cisco.com>
Subject: [dpdk-dev] [PATCH 1/1] ethdev: don't consider device state when validating flows
Date: Thu, 23 Mar 2017 19:36:59 -0700 [thread overview]
Message-ID: <20170324023659.28099-2-johndale@cisco.com> (raw)
In-Reply-To: <20170324023659.28099-1-johndale@cisco.com>
PMDs only consider if a flow would be accepted or not the assuming the
device had all it's resources available to it. Since state is not
considered, -EEXIST and -EBUSY return codes no longer make sense and
are removed. Also clarify the -ENOMEM has nothig to do with device
resouces, only host resources needed rte_flow_validate().
Signed-off-by: John Daley <johndale@cisco.com>
---
lib/librte_ether/rte_flow.h | 21 +++++----------------
1 file changed, 5 insertions(+), 16 deletions(-)
diff --git a/lib/librte_ether/rte_flow.h b/lib/librte_ether/rte_flow.h
index 171a5698e..16846449d 100644
--- a/lib/librte_ether/rte_flow.h
+++ b/lib/librte_ether/rte_flow.h
@@ -932,15 +932,10 @@ struct rte_flow_error {
/**
* Check whether a flow rule can be created on a given port.
*
- * While this function has no effect on the target device, the flow rule is
- * validated against its current configuration state and the returned value
- * should be considered valid by the caller for that state only.
- *
- * The returned value is guaranteed to remain valid only as long as no
- * successful calls to rte_flow_create() or rte_flow_destroy() are made in
- * the meantime and no device parameter affecting flow rules in any way are
- * modified, due to possible collisions or resource limitations (although in
- * such cases EINVAL should not be returned).
+ * The flow rule is validated against the target device. There is no check
+ * against the current state of the device- creating the flow could still
+ * fail due to a lack of resources on the device. This function has no effect
+ * on the target device.
*
* @param port_id
* Port identifier of Ethernet device.
@@ -965,13 +960,7 @@ struct rte_flow_error {
* -ENOTSUP: valid but unsupported rule specification (e.g. partial
* bit-masks are unsupported).
*
- * -EEXIST: collision with an existing rule.
- *
- * -ENOMEM: not enough resources.
- *
- * -EBUSY: action cannot be performed due to busy device resources, may
- * succeed if the affected queues or even the entire port are in a stopped
- * state (see rte_eth_dev_rx_queue_stop() and rte_eth_dev_stop()).
+ * -ENOMEM: not enough host resources to execute this funtion.
*/
int
rte_flow_validate(uint8_t port_id,
--
2.12.0
next prev parent reply other threads:[~2017-03-24 2:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-24 2:36 [dpdk-dev] [PATCH 0/1] proposed minor change in rte_flow_validate semantics John Daley
2017-03-24 2:36 ` John Daley [this message]
2017-04-06 20:50 ` [dpdk-dev] [PATCH 1/1] ethdev: don't consider device state when validating flows Thomas Monjalon
2017-04-06 22:41 ` [dpdk-dev] [PATCH v2 0/1] fix flow validate comments John Daley
2017-04-06 22:41 ` [dpdk-dev] [PATCH v2 1/1] ethdev: " John Daley
2017-04-07 0:23 ` [dpdk-dev] [PATCH v3] " John Daley
2017-04-11 10:01 ` Adrien Mazarguil
2017-04-20 18:49 ` [dpdk-dev] [PATCH v4] doc: " John Daley
2017-04-21 8:11 ` Adrien Mazarguil
2017-04-21 8:42 ` Thomas Monjalon
2017-03-24 9:46 ` [dpdk-dev] [PATCH 0/1] proposed minor change in rte_flow_validate semantics Adrien Mazarguil
2017-03-24 17:23 ` John Daley (johndale)
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=20170324023659.28099-2-johndale@cisco.com \
--to=johndale@cisco.com \
--cc=adrien.mazarguil@6wind.com \
--cc=dev@dpdk.org \
/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).