From patchwork Fri Aug 28 11:30:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Balasubramanian Manoharan X-Patchwork-Id: 52790 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by patches.linaro.org (Postfix) with ESMTPS id 5AB7322E8B for ; Fri, 28 Aug 2015 11:30:18 +0000 (UTC) Received: by wibvo5 with SMTP id vo5sf1814642wib.0 for ; Fri, 28 Aug 2015 04:30:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:mime-version :in-reply-to:references:date:message-id:from:to:subject:precedence :list-id:list-unsubscribe:list-archive:list-post:list-help :list-subscribe:content-type:content-transfer-encoding:errors-to :sender:x-original-sender:x-original-authentication-results :mailing-list; bh=t9BiP4GZVrOaejoDJQ88SS97lawnvfv7nISiGgi0ZLQ=; b=INKHPu8rtwdWFwNXCLeZSeUimlr+vLUdkXhvldecmFd+8a9JZYhujGXqC9w44lmIht h6vOuNzuRNTC9Z/uPK3wXogC8c3VPUKKVjLWVmLErmI3DBRWsg35VGE5wh02OMdPo8fK bEPt/UmZXvczIcnUij5DEyjUpuoZDe23kzPBHxGc9SyZ+/uRd0Ogdn8r/a3VsKr5ppR6 lRT6G3tVknzXDltZMYuIOgsNm4JkKy91vVNt14NV/5XtSSBWmC7mUBsODyB9v8rY9+oS UIiTx+0nZpTp26SW/Cgd1HEylwsR4oYFJoB640VK0zwhVG8Nbpa7SG0R+LduHXWlPM8C JdFg== X-Gm-Message-State: ALoCoQlXuKK0sUI3HsATDJbRl+6EfiVvV9FoYZCtMM+v8oUoQlokycuVyB8/l4S1cX4Q/p3JBWlp X-Received: by 10.112.189.105 with SMTP id gh9mr2596178lbc.16.1440761417619; Fri, 28 Aug 2015 04:30:17 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.242.2 with SMTP id wm2ls188437lac.38.gmail; Fri, 28 Aug 2015 04:30:17 -0700 (PDT) X-Received: by 10.152.6.73 with SMTP id y9mr4609984lay.45.1440761417485; Fri, 28 Aug 2015 04:30:17 -0700 (PDT) Received: from mail-lb0-f180.google.com (mail-lb0-f180.google.com. [209.85.217.180]) by mx.google.com with ESMTPS id ci11si1361513lad.131.2015.08.28.04.30.17 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Aug 2015 04:30:17 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.180 as permitted sender) client-ip=209.85.217.180; Received: by lbbpu9 with SMTP id pu9so28309502lbb.3 for ; Fri, 28 Aug 2015 04:30:17 -0700 (PDT) X-Received: by 10.152.44.196 with SMTP id g4mr4643965lam.56.1440761417249; Fri, 28 Aug 2015 04:30:17 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.151.194 with SMTP id us2csp469299lbb; Fri, 28 Aug 2015 04:30:16 -0700 (PDT) X-Received: by 10.50.132.39 with SMTP id or7mr3003185igb.90.1440761416026; Fri, 28 Aug 2015 04:30:16 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id y80si4633989iod.160.2015.08.28.04.30.14; Fri, 28 Aug 2015 04:30:15 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Received: by lists.linaro.org (Postfix, from userid 109) id 8A05D619B4; Fri, 28 Aug 2015 11:30:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 93093619A6; Fri, 28 Aug 2015 11:30:09 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 730F5619AD; Fri, 28 Aug 2015 11:30:07 +0000 (UTC) Received: from mail-ob0-f170.google.com (mail-ob0-f170.google.com [209.85.214.170]) by lists.linaro.org (Postfix) with ESMTPS id 8516C61992 for ; Fri, 28 Aug 2015 11:30:03 +0000 (UTC) Received: by obbhe7 with SMTP id he7so44245344obb.0 for ; Fri, 28 Aug 2015 04:30:03 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.182.227.199 with SMTP id sc7mr729419obc.12.1440761403004; Fri, 28 Aug 2015 04:30:03 -0700 (PDT) Received: by 10.182.26.5 with HTTP; Fri, 28 Aug 2015 04:30:02 -0700 (PDT) In-Reply-To: <55D5C5A6.8010109@linaro.org> References: <55D5B5C7.5090702@kalray.eu> <55D5C5A6.8010109@linaro.org> Date: Fri, 28 Aug 2015 17:00:02 +0530 Message-ID: From: Bala Manoharan To: =?UTF-8?Q?Beno=C3=AEt_Ganne?= , LNG ODP Mailman List , Maxim Uvarov X-Topics: Classification patch Subject: [lng-odp] Fwd: [API-NEXT PATCHv3 2/4] api: classification: add ODP_PMR_CUSTOM_FRAME X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: bala.manoharan@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.180 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Hi, I have added the following comment on this patch 2/4 regarding the naming for this patch. Other than this I am fine with this patch. Regards, Bala ---------- Forwarded message ---------- From: Balasubramanian Manoharan Date: 20 August 2015 at 17:48 Subject: Re: [lng-odp] [API-NEXT PATCHv3 2/4] api: classification: add ODP_PMR_CUSTOM_FRAME To: lng-odp@lists.linaro.org My suggestion was to actually defer this movement patch after your existing patch series for including PMR_CUSTOM_FRAME gets applied. Also the naming of this patch should be "rename or move the header for better readability". These are required for tracking the changes in the header file. Regards, Bala On Thursday 20 August 2015 04:41 PM, Benoît Ganne wrote: This patch only moves definitions. It does not modify any structures, functions or comments. Move odp_pmr_match_t and odp_pmr_create() definitions before odp_pmr_detroy() for better readability. Signed-off-by: Benoît Ganne --- include/odp/api/classification.h | 46 ++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 23 deletions(-) unsigned odp_pmr_terms_avail(void); /** - * Following structure is used to define a packet matching rule - */ -typedef struct odp_pmr_match_t { - odp_pmr_term_e term; /**< PMR term value to be matched */ - const void *val; /**< Value to be matched */ - const void *mask; /**< Masked set of bits to be matched */ - uint32_t val_sz; /**< Size of the term value */ - uint32_t offset; /**< User-defined offset in packet - Used if term == ODP_PMR_CUSTOM_FRAME only, - otherwise must be 0 */ -} odp_pmr_match_t; - -/** - * Create a packet match rule with mask and value - * - * @param[in] match packet matching rule definition - * - * @return Handle of the matching rule - * @retval ODP_PMR_INVAL on failure - */ -odp_pmr_t odp_pmr_create(const odp_pmr_match_t *match); - -/** * @typedef odp_pmr_set_t * An opaque handle to a composite packet match rule-set */ diff --git a/include/odp/api/classification.h b/include/odp/api/classification.h index b63a6c8..d4e1330 100644 --- a/include/odp/api/classification.h +++ b/include/odp/api/classification.h @@ -226,6 +226,29 @@ typedef enum odp_pmr_term { } odp_pmr_term_e; /** + * Following structure is used to define a packet matching rule + */ +typedef struct odp_pmr_match_t { + odp_pmr_term_e term; /**< PMR term value to be matched */ + const void *val; /**< Value to be matched */ + const void *mask; /**< Masked set of bits to be matched */ + uint32_t val_sz; /**< Size of the term value */ + uint32_t offset; /**< User-defined offset in packet + Used if term == ODP_PMR_CUSTOM_FRAME only, + otherwise must be 0 */ +} odp_pmr_match_t; + +/** + * Create a packet match rule with mask and value + * + * @param[in] match packet matching rule definition + * + * @return Handle of the matching rule + * @retval ODP_PMR_INVAL on failure + */ +odp_pmr_t odp_pmr_create(const odp_pmr_match_t *match); + +/** * Invalidate a packet match rule and vacate its resources * * @param[in] pmr_id Identifier of the PMR to be destroyed @@ -276,29 +299,6 @@ unsigned long long odp_pmr_terms_cap(void);