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 9196DA052F; Wed, 29 Jan 2020 17:30:08 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 861641BFEC; Wed, 29 Jan 2020 17:30:07 +0100 (CET) Received: from mx0a-00103a01.pphosted.com (mx0b-00103a01.pphosted.com [67.231.152.227]) by dpdk.org (Postfix) with ESMTP id 062DF1BFE1 for ; Wed, 29 Jan 2020 17:30:05 +0100 (CET) Received: from pps.filterd (m0002317.ppops.net [127.0.0.1]) by mx0b-00103a01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 00TGSOXi010726; Wed, 29 Jan 2020 11:30:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ciena.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=06252019; bh=2H1yLPd5Oo72hgEgu1y+PzK0H8/Hte9znLCiTxHIhxk=; b=q5LS2ArxvW8wrcoZQnWIGhTtg+27MUH9jVCbDtTPXKSqZsoYDamVXFKxu3hagzigjGKv sXsqPPYYh/ekxATFQORkIve6YXGSfDvDKTugtfXl3hTzf1NpXYGSAuxr39ly/foj6FGx z6NASCcrSE6YV1074PDYyALTz5/FgL6nOxolCJQvhF1x6HJ+g/bTHcBvuIcLDyYIdrZ3 kDkxnGwejUBN0/dHMCwt8e1+YZZv/umqbJ4tKwMQKehvKQQwAdavs2O62aSBS6R8Ohfp +G6jO6ssekO6mCqwlpUQNyxjeOAChPfmFZXPPRw6n2ZIGB4cme5bvaB2cw6paYWulDof mQ== Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2171.outbound.protection.outlook.com [104.47.58.171]) by mx0b-00103a01.pphosted.com with ESMTP id 2xrjsu3afs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 29 Jan 2020 11:30:05 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=R6K7yw8BppRq1O2p5LCDE98Ge8RPp7BwW83xt4IvSMCc7j09TDrd2r5RLzuSw76S9xOfslpb0Lt7czK1rjXvQLK6VIsc7PayiIvU2Hxw1EyE1XOHiZhcRFMQvZwI9pk+CooFp8tIhi4futYsTzwllMNvOIEYf7+h7bHYOsda8sTt3a9Weaw8DY+LUwl1be6yufVjMg+nc4DqtyMdT4QkJh/0f+PB8CkxvHmujLHPxlmo3+GPRVst4GEC4Zlmk3iW402sLJFLoRWAFhXTb552KvLDVua/OlWnr903yFlQLIEnniKpR0nS6aeT+Gl3MH7q7dB5hWr4i6gZsSD6gvdQJg== 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=2H1yLPd5Oo72hgEgu1y+PzK0H8/Hte9znLCiTxHIhxk=; b=gRspjWcjAefb8z04Ans15Z29wiray540CohIVXf/GdzLf7bkLGifCfsXOJwNY2+Zb4YojL2SgWZQ/yDDTU3JBnGvB8YEHt8qSGt0OvQWf9/E0Tw5P9cE0ieWpjhYiRWqZ4Wvgvpeut/cgRLKegXLW8zTVg1r04f+nLVqlVuThz5i7BJR0IuiCUAXldKTMllXAVg6P0/0ixmo/fRxAUT03g71rfCzLZvBQIG3Vmb5FS2ht/+FPmG22jcLX3n/7in4w2fTuhkZ10A2shrQZktpgahfVHsNOar3+DMmznZ4RsTm4ZrnxWRDIluQtcciRV6f9ZIHMbj6UL6R3iEUtY36BA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ciena.com; dmarc=pass action=none header.from=ciena.com; dkim=pass header.d=ciena.com; arc=none Received: from MWHPR04MB0592.namprd04.prod.outlook.com (10.173.49.145) by MWHPR04MB0846.namprd04.prod.outlook.com (10.172.168.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2665.22; Wed, 29 Jan 2020 16:30:03 +0000 Received: from MWHPR04MB0592.namprd04.prod.outlook.com ([fe80::c72:50ec:9049:df0d]) by MWHPR04MB0592.namprd04.prod.outlook.com ([fe80::c72:50ec:9049:df0d%3]) with mapi id 15.20.2665.027; Wed, 29 Jan 2020 16:30:02 +0000 From: "Bly, Mike" To: "Ananyev, Konstantin" , "dev@dpdk.org" CC: "Dumitrescu, Cristian" Thread-Topic: ACL priority field Thread-Index: AdXVWK18NJsY+xsUSBaSgfX6ktWjMABUx9CgAARsWoA= Date: Wed, 29 Jan 2020 16:30:02 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [165.225.50.165] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 7dde9609-6ecb-47d3-4dc0-08d7a4d87dfc x-ms-traffictypediagnostic: MWHPR04MB0846: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 02973C87BC x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(39860400002)(376002)(366004)(136003)(396003)(346002)(199004)(189003)(2906002)(110136005)(33656002)(316002)(66556008)(64756008)(66446008)(66476007)(76116006)(8676002)(66946007)(81166006)(8936002)(81156014)(3480700007)(86362001)(4326008)(52536014)(26005)(7116003)(55236004)(966005)(6506007)(7696005)(71200400001)(186003)(478600001)(55016002)(9686003)(5660300002); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR04MB0846; H:MWHPR04MB0592.namprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: ciena.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 42wDmXC7BNFwf7xRax2+HtsYW08RHVTffaaE+Tw5l6HSh/sPEF6eZdgsweUHrOwauYp6qO+AZCGJa9HNJcLMehLUZuSd9NkY0b1lGdQfjclF7HbFe3kJnELv8hIzCzpGxxbSelbDcZK4WbTPC78+9jwJz9atP56R3n97pD/noboCJx6YDM1wlJ/rY6GT5/hmlACBiDFIMNBgCbySJqHp+mq5TFmOtORMQyff1ZnG8cXLr43IpqE2VLPHLL6t7DR8R1TLV63wPu7Wt+O2jfNH7cDCq4g0WhFGUEhZcAGza+onJ9YeR1cVPE3L29Qi+io2ihEMDU/E43v12fM1lvbzVyN3txt4ZsUXJljx890AYj/gD7fXokk+mka7uFhM3JNd24uCyD7ahFupv6Fhk16UvC7WLdmDZySW0alDcwmHPgGoJ2Y52kiNnUAJdflG4rmqeQ9sQ07HFFjq/m1wy8b1NYgqgapKDo0NNimLbfhnqOYoPlk5B82xm10wCs+xRAXwx141r7bE5a0mYVhm1v2AWA== x-ms-exchange-antispam-messagedata: kZDH3x/OEg9NiXVY0FO9a5GDJZA4CeGzJwPTIr4WMmVzfwQCjh4D/Hka9e6oqXvwl9YxMM7hMgD7wkTX6lhaiYkeekYkNgx95Jn5fLsomstZo/UmV5Rhm0twHtN+WGyqf6HAunVX+bhNW4JObEWT3A== x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: ciena.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7dde9609-6ecb-47d3-4dc0-08d7a4d87dfc X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Jan 2020 16:30:02.9332 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 457a2b01-0019-42ba-a449-45f99e96b60a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: zj3g/tRA2Wh8oMTpXAFRKcxi+XiDEArobmFRgk3h81jv+ZpQ0bpDliLznZ7IoNn7 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR04MB0846 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.572 definitions=2020-01-29_04:2020-01-28, 2020-01-29 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 bulkscore=0 lowpriorityscore=0 mlxlogscore=999 mlxscore=0 clxscore=1011 malwarescore=0 impostorscore=0 priorityscore=1501 suspectscore=0 phishscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1911200001 definitions=main-2001290134 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" Konstantin, Ah, I see now. Yes, we are using rte_table_acl. Is there a reason these two= differ in precedence selection? Regards, Mike ******************************** 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=20 > comment says 0 is highest priority. Based on my testing with=20 > conflicting entries, I would like ask if we can/should update the documen= tation/descriptions to state "the lowest non-negative integer priority valu= e 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:=20 > https://doc.dpdk.org/guides/prog_guide/packet_classif_access_ctrl.html >=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=20 > matches more than one rule and these rules have equal priority, it is und= efined which rule is returned as a match. It is recommended to assign a uni= que priority for each rule. > From:=20 > http://doc.dpdk.org/api/structrte__table__acl__rule__add__params.html >=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 f= or 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;