From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 298E6A052F; Wed, 29 Jan 2020 15:04:13 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 825331BFF0; Wed, 29 Jan 2020 15:04:12 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 94F7B1BFED for ; Wed, 29 Jan 2020 15:04:10 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Jan 2020 06:04:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,378,1574150400"; d="scan'208";a="223051663" Received: from orsmsx101.amr.corp.intel.com ([10.22.225.128]) by fmsmga007.fm.intel.com with ESMTP; 29 Jan 2020 06:04:04 -0800 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX101.amr.corp.intel.com (10.22.225.128) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 29 Jan 2020 06:04:04 -0800 Received: from orsmsx609.amr.corp.intel.com (10.22.229.22) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 29 Jan 2020 06:04:03 -0800 Received: from ORSEDG002.ED.cps.intel.com (10.7.248.5) by orsmsx609.amr.corp.intel.com (10.22.229.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Wed, 29 Jan 2020 06:04:03 -0800 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.172) by edgegateway.intel.com (134.134.137.101) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 29 Jan 2020 06:03:59 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Uas1DESbW3K3vyEAmN5DS1eBbfX3sWDAvd79cgfQwMxtXX+tJDZFg63MX0iEKO1p8bINhkObVIGAEQNmpfRFimFe5IH/rP63oi888tHV3BFTHum03SIIh4zR74T6Dk2dW3iX+K/WEOJFP/yRPZa1kkAeTMZtQa1/0+kWghGcDiQv7C+OOb1wtMTIlbQ5fDQ/9WJdLoMEaP4awRAxYP7fzLC7D8PR3Qz3S/+IsjQUKjTGXEygBFyS64LS8hswcjWebxlRfciPojFpvPw0iw9aywS5574qhkRi9jt/iKWJsBz5i7L0pIBzuK6hEDHGOxbiXvLgFMuneLmt6WBqzUgfKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=p9YrSaGDJuSs1QSKcIRRQQrhD/B0DOz+R7NffV4eLdg=; b=ZgB2jM2SVlIElpg/uUSHDN3RWOwgC92oO3N+oNaIyia+KOghOm8hNcm+JukWkz+DeRWe2UztwMa42xOz8FzAv/65nmnscVRmBG3qY6U30kgRx0IlqctIhVkv2mdpImMwtbppmutDH6ha9MBlz7IFt48eypF8tjk7UQw8ff0uGTgSRHlJ/8ghbJR9R/p0yZ+8CXTrZzjIQ5Fg7hCYKpNaqHQ6dfKQx7MPTTLsB8LHKttaL5YV0u/qkW6X5B/8Ubob83HVIIOXHU6NVOejKgeJUVTWfrPU3XbbtVC018EIl9N9aDmheVujKfUC+Cf13ExKac8gv24DUZb0eoTOKfVgAg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=p9YrSaGDJuSs1QSKcIRRQQrhD/B0DOz+R7NffV4eLdg=; b=hJ4oAqqD5O9HJ3mPHX8EYxQ6TC/DeB5I3Dm2rhp538HcpAne0P98z6noi1dS73mQQgzcf5nDaNZvOX9+fPJZ+Xu8To9zFqY22hovR92BoLhy/Znr4tc2xvyBC2zlKd5KfR4Bc4BRM80rzn6oYn4NTlMGEqO2emRihz+HIN1yVe4= Received: from SN6PR11MB2558.namprd11.prod.outlook.com (52.135.94.19) by SN6PR11MB3071.namprd11.prod.outlook.com (52.135.126.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2665.24; Wed, 29 Jan 2020 14:03:54 +0000 Received: from SN6PR11MB2558.namprd11.prod.outlook.com ([fe80::4d86:362a:13c3:8386]) by SN6PR11MB2558.namprd11.prod.outlook.com ([fe80::4d86:362a:13c3:8386%7]) with mapi id 15.20.2665.027; Wed, 29 Jan 2020 14:03:54 +0000 From: "Ananyev, Konstantin" To: "Bly, Mike" , "dev@dpdk.org" CC: "Dumitrescu, Cristian" Thread-Topic: ACL priority field Thread-Index: AdXVWK18NJsY+xsUSBaSgfX6ktWjMABUx9Cg Date: Wed, 29 Jan 2020 14:03:54 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMzU0YWUyZmUtZDUyMi00YWFkLTkxOTEtMTEyYTQ5ODUyYTJjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoibTFHYkVsdnJERTNcL3BWU0pZVlwvVGxNUlFhUEtkcVFXbCtKRDAyVVo5VmZvOUgzZ2xydk5JcE1KZWZ3ektva2FXIn0= dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.2.0.6 x-ctpclassification: CTP_NT authentication-results: spf=none (sender IP is ) smtp.mailfrom=konstantin.ananyev@intel.com; x-originating-ip: [192.198.151.187] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 7072d4ff-879e-4eac-bd08-08d7a4c413a0 x-ms-traffictypediagnostic: SN6PR11MB3071: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 02973C87BC x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(366004)(136003)(396003)(39860400002)(346002)(376002)(199004)(189003)(5660300002)(66476007)(3480700007)(107886003)(52536014)(55016002)(9686003)(66946007)(66556008)(64756008)(7116003)(76116006)(66446008)(2906002)(86362001)(7696005)(4326008)(33656002)(81166006)(8936002)(966005)(478600001)(8676002)(81156014)(26005)(71200400001)(296002)(110136005)(6506007)(316002)(186003); DIR:OUT; SFP:1102; SCL:1; SRVR:SN6PR11MB3071; H:SN6PR11MB2558.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Qzmy8cNiMF3I1DOFiZWPIR8PYdSC3aNF98GhEO9dA4VWuTud+G7LZMUPQfAnby8ttog4faJY+QgsHCdlXD/DmTSg9J6aY28wfGpqBHbqHJUZf6eRX+NKNi8ki8qmw0wt3NhCZ8yWwg/BzJvQyr1NgV6yd4bs1iL/enmOjKN921K3Ptof6lspc6dW/tK32Fgtt7PUi2fskRBLbwLfHtBQSwI6dbmvokLtUptXv3SIz9hvwehGNYloOWbC9VRmaRTjpDKzZJbwY/fQ8i2XcvyTzRMPKxiAhDlc+thDBFKCy7IMKTCUy5Pnyymhdece9yTNPmHHtJGlQn9bXOP8NybfHTcsxr4HYcSg7CA5vEshG+VOqksPhywSZu5SG3Nz3QKXrKKb4kPLXwwDQ5E7QNkuhfl/sanuu+2B7pZZuiEWkqWDkN2xj4/LAoEGcHa2j0qgmatQG+lC28zovP41i/X60iOPf++mLMubboRLJ7pnHI5vT32IY+W3JKgobucQ7lBEKaqT6Kl7eCZfOTHr3fHPDA== x-ms-exchange-antispam-messagedata: LzgseNhqa1ztuDfRxDqaKq0/ne0TcVS3oZCg+9fCNG9+JV4pJNzQkyhM5Ac9jqtjraG1gPanTDNAAAdghVyx0TDQPZShc67Tt4ZFZird9hTGdEpE8jvbliS90QxkJX6Bkpb8/AG89ARL0/srVcchTw== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 7072d4ff-879e-4eac-bd08-08d7a4c413a0 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Jan 2020 14:03:54.5311 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: MkTcMaqDzT65IdWk3cwDhP0nlMlG88jXG1iKZRS4wOD2MWv+4Alzw1BLnLJllWUUMvzPeRVlLEnDWPQcjoCP5yBplwyadHncmMsr0JJKB8s= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3071 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] ACL priority field 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi, >=20 > Hello, >=20 > Can someone clarify what I am interpreting as a documentation conflict r= egarding the "priority" field for rte_table_acl_rule_add_params? > Below documentation says "highest priority wins", but the header file com= ment says 0 is highest priority. Based on my testing with > conflicting entries, I would like ask if we can/should update the documen= tation/descriptions to state "the lowest non-negative integer > priority value will be selected". Highest priority implies select X, when= X > Y >=3D 0. However, based on my testing, that is not the case. > Instead, Y is selected. >=20 > From: https://doc.dpdk.org/guides/prog_guide/packet_classif_access_ctrl.h= tml >=20 > When creating a set of rules, for each rule, additional information must = be supplied also: > * priority: A weight to measure the priority of the rules (higher= is better)... If the input tuple matches more than one rule, then the rule > with the higher priority is returned. Note that if the input tuple matche= s more than one rule and these rules have equal priority, it is > undefined which rule is returned as a match. It is recommended to assign = a unique priority for each rule. > From: http://doc.dpdk.org/api/structrte__table__acl__rule__add__params.ht= ml >=20 > int32_t priority > ACL rule priority, with 0 as the highest priority I think you are mixing 2 different entities here: librte_acl and librte_table. For librte_acl - higher priority wins.=20 librte_table_acl.c uses librte_acl inside, but AFAIK has reverse ordering for priority: 'lesser priority wins'. Inside it reverts rules priority before adding it into the ACL lib ctx.=20 static int rte_table_acl_entry_add( void *table, void *key, void *entry, int *key_found, void **entry_ptr) { ... if (rule->priority > RTE_ACL_MAX_PRIORITY) { RTE_LOG(ERR, TABLE, "%s: Priority is too high\n", __func__)= ; return -EINVAL; } /* Setup rule data structure */ memset(&acl_rule, 0, sizeof(acl_rule)); ... acl_rule.data.priority =3D RTE_ACL_MAX_PRIORITY - rule->priority;