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 ECE34A00BE; Tue, 28 Apr 2020 12:28:34 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 509191D55B; Tue, 28 Apr 2020 12:28:34 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 57B701D413 for ; Tue, 28 Apr 2020 12:28:32 +0200 (CEST) IronPort-SDR: iCJYrpRbDW9MX2Qsd9qsA2o69b48OrLR7FQMCrgBRxJR1C4aL0dXUdoSiyLhR0XSmP6/uXIrhH W9Z6OsDdT8/A== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Apr 2020 03:28:31 -0700 IronPort-SDR: q6T54HWhaHkZn/qPMwSrYcJF5kyqQT656FiqbPsl1jbxtR54LsE7nvSQfZ4dhfU45CKdghA+Db 52gExwV6stGA== X-IronPort-AV: E=Sophos;i="5.73,327,1583222400"; d="scan'208";a="459192037" Received: from bricha3-mobl.ger.corp.intel.com ([10.214.246.178]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 28 Apr 2020 03:28:29 -0700 Date: Tue, 28 Apr 2020 11:28:25 +0100 From: Bruce Richardson To: Stephen Hemminger Cc: dev@dpdk.org Message-ID: <20200428102825.GB1897@bricha3-MOBL.ger.corp.intel.com> References: <20200212230810.2837-1-stephen@networkplumber.org> <20200427231625.10135-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200427231625.10135-1-stephen@networkplumber.org> Subject: Re: [dpdk-dev] [PATCH v3 0/4] Enforce checking on flag values in API's 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" On Mon, Apr 27, 2020 at 04:16:21PM -0700, Stephen Hemminger wrote: > The DPDK API's are lax about checking for undefined flag values. > This makes it impossible to add new bits to existing API's > without causing ABI breakage. This means we end up doing unnecessary > symbol versioning just to work around applications that might > pass in naughty bits. > > This is the DPDK analog of the Linux kernel openat() problem. > Openat api was added but since kernel did not check flags it > ended up that another syscall openat2() was necessary before > the flags could be used. > > v3 - define mask based on existing defines for ring and hash > > Stephen Hemminger (4): > ring: future proof flag settings > hash: check flags on creation > stack: check flags on creation > cfgfile: check flags value > > lib/librte_cfgfile/rte_cfgfile.c | 4 ++++ > lib/librte_hash/rte_cuckoo_hash.c | 14 ++++++++++++++ > lib/librte_ring/rte_ring.c | 12 ++++++++++++ > lib/librte_stack/rte_stack.c | 5 +++++ > 4 files changed, 35 insertions(+) > I think this is a good idea to do in DPDK Series-acked-by: Bruce Richardson