From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rcdn-iport-7.cisco.com (rcdn-iport-7.cisco.com [173.37.86.78]) by dpdk.org (Postfix) with ESMTP id 8EFB92C35 for ; Fri, 7 Apr 2017 00:41:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=2264; q=dns/txt; s=iport; t=1491518489; x=1492728089; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=JIdBn6KDDV9zf7DVuJkN5rRXSraugY7rnrx16c5//YM=; b=I74Ckt0NcreT+fcU9PtqFkSPOl96XkZjwdxsjc3WJ6YJVHDaYpighPxD edqGUV8RP8C7AGjyT08ZS/aaeV0keqL3+FC5Q6eMS4Q0y25Pcz0LIGWyh 1LoIEbaLKvstdQfbdgBDUiGKszD8oTJ15owmE1+gaaimR7KiwshZ+27HY Q=; X-IronPort-AV: E=Sophos;i="5.37,161,1488844800"; d="scan'208";a="228010330" Received: from rcdn-core-8.cisco.com ([173.37.93.144]) by rcdn-iport-7.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Apr 2017 22:41:28 +0000 Received: from cisco.com (savbu-usnic-a.cisco.com [10.193.184.48]) by rcdn-core-8.cisco.com (8.14.5/8.14.5) with ESMTP id v36MfSEZ013582; Thu, 6 Apr 2017 22:41:28 GMT Received: by cisco.com (Postfix, from userid 392789) id 4B2B420F2002; Thu, 6 Apr 2017 15:41:28 -0700 (PDT) From: John Daley To: adrien.mazarguil@6wind.com Cc: thomas.monjalon@6wind.com, dev@dpdk.org, John Daley Date: Thu, 6 Apr 2017 15:41:26 -0700 Message-Id: <20170406224126.30345-2-johndale@cisco.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170406224126.30345-1-johndale@cisco.com> References: <20170324023659.28099-2-johndale@cisco.com> <20170406224126.30345-1-johndale@cisco.com> Subject: [dpdk-dev] [PATCH v2 1/1] ethdev: fix flow validate comments 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, 06 Apr 2017 22:41:30 -0000 Change comments for rte_flow_validate() function to indicate that flow rule collision and resource validation is optional for PMD and therefore the return codes may have different meanings. Fixes: b1a4b4cbc0a8 ("ethdev: introduce generic flow API") Signed-off-by: John Daley --- lib/librte_ether/rte_flow.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/lib/librte_ether/rte_flow.h b/lib/librte_ether/rte_flow.h index 8013ecab2..bbc5ec2e3 100644 --- a/lib/librte_ether/rte_flow.h +++ b/lib/librte_ether/rte_flow.h @@ -983,9 +983,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 flow rule is validated for correctness and whether it could be accepted + * by the device given sufficient resources. The rule is checked against the + * current device mode and queue configuration. The flow rule may optionally + * be validated against existing flow rules and resources. * * 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 @@ -1016,9 +1017,15 @@ struct rte_flow_error { * -ENOTSUP: valid but unsupported rule specification (e.g. partial * bit-masks are unsupported). * - * -EEXIST: collision with an existing rule. + * -EEXIST: collision with an existing rule. Only returned if device + * supports flow rule collision checking and there was a flow rule + * collision. Not receiving this return code is no gaurantee that creating + * the rule will not fail due to a collision. + * + * -ENOMEM: If the device supports resource checking: device resouce + * limitation. If not supported: not enough resouces to execute the validate + * command. * - * -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 -- 2.12.0