From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f172.google.com (mail-wr0-f172.google.com [209.85.128.172]) by dpdk.org (Postfix) with ESMTP id A4CCE2BCD for ; Tue, 11 Apr 2017 12:01:46 +0200 (CEST) Received: by mail-wr0-f172.google.com with SMTP id z109so25353914wrb.1 for ; Tue, 11 Apr 2017 03:01:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=VzYBTzvpK+ds176ZwJjfFRNho82blEy9gbDEsQgDllY=; b=jOsFcswETBTf2Awi79SLR1DRvrCRLjfZSyQL5KPlfXsClMgcEGuCqCiYA9Gy8lnRp/ METqQWDQXI06RilJb66PC/cx+pcL/aeBfEuIRyCZ70RSFwv4bEvGgbbARYhFnRjxbx28 uNbe0QqQK0bPWlIBeBNo9kMMg3u9LaEZJTG25H9VTPu+60fK0UbgDkdUwPNTDIf8c+TN V6970XHhsHdjizNwmeopK0uJbIxSHbOEAKoqiq8+gBwqYbp7D984ZvS4/PB+L/wEV0o9 jTFImYCdr51S2bMrLw+R6j6R2whjPCgN3CxL7BqHUDJr8ojurrS+ORkzvKpXPU3TnJ9u oZgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=VzYBTzvpK+ds176ZwJjfFRNho82blEy9gbDEsQgDllY=; b=HrfL8U+qHlOuR1PEC+9LrVVLcCFhurHrYg5/Jyg5HWmy0rka9eXeUuCp9JygXjv+Cm 7kcqLnIqMuWxUZBdcAdUqdfTYCwrX/+J598JjnOScEDA5/RKvKntuAzT5aEYydz3jdtz aDosVfO0/+pb7wBI+caT5/66vcKKaPQwCUKuHrMucx2+DRoRh088OxqzGiP+2sgZvpo2 8BiMS/zNvyNxM1YP81rYC01h8BW6J8mYdE/AluPdlPxCJ0oZlxFoHJYQsVFLEoyP7NYj 3FI+QjDWtyL7r4oUWtqVLnl4eMRQQpA+XtHfMQUec5Q8b0w6CKgA1dKAln78LzLSLWXp g7zQ== X-Gm-Message-State: AFeK/H1Hcn4amLYVuvGGsjvtHjMkqdl5FTfzrumJ2WO9wajgDyxvhHPvNHs9OJVv4atKDM/z X-Received: by 10.223.141.214 with SMTP id o80mr32814651wrb.110.1491904906217; Tue, 11 Apr 2017 03:01:46 -0700 (PDT) Received: from 6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id d4sm20921637wrb.24.2017.04.11.03.01.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Apr 2017 03:01:45 -0700 (PDT) Date: Tue, 11 Apr 2017 12:01:37 +0200 From: Adrien Mazarguil To: John Daley Cc: dev@dpdk.org Message-ID: <20170411100137.GX3790@6wind.com> References: <20170406224126.30345-2-johndale@cisco.com> <20170407002300.14433-1-johndale@cisco.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170407002300.14433-1-johndale@cisco.com> Subject: Re: [dpdk-dev] [PATCH v3] 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: Tue, 11 Apr 2017 10:01:47 -0000 Hi John, On Thu, Apr 06, 2017 at 05:23:00PM -0700, John Daley wrote: > 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 > --- > v2: another crack at the comments > v3: fix typos, rewording, put back a sentence omitted in v2 This version is fine and it clarifies the original intent, it's only missing associated changes in doc/guides/prog_guide/rte_flow.rst (look for rte_flow_validate). Also the commit title could start with "doc:" as there is no API change. I also have one minor nit, see below. > lib/librte_ether/rte_flow.h | 16 +++++++++++----- > 1 file changed, 11 insertions(+), 5 deletions(-) > > diff --git a/lib/librte_ether/rte_flow.h b/lib/librte_ether/rte_flow.h > index 8013ecab2..85ce4ec90 100644 > --- a/lib/librte_ether/rte_flow.h > +++ b/lib/librte_ether/rte_flow.h > @@ -983,9 +983,11 @@ 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 also > + * optionally be validated against existing flow rules and device resources. > + * This function has no effect on the target device. > * > * 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 +1018,13 @@ 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 guarantee that creating > + * the rule will not fail due to a collision. > * > - * -ENOMEM: not enough resources. > + * -ENOMEM: Not enough memory to execute the function, or if the device "Not" should be lowercase (why, yes, that's all). > + * supports resource validation, resource limitation on the device. > * > * -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 > -- Adrien Mazarguil 6WIND