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 38323A00C2; Fri, 24 Apr 2020 19:15:48 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CDC781C43C; Fri, 24 Apr 2020 19:15:46 +0200 (CEST) Received: from mail-pg1-f196.google.com (mail-pg1-f196.google.com [209.85.215.196]) by dpdk.org (Postfix) with ESMTP id 8589D1C2EF for ; Fri, 24 Apr 2020 19:15:45 +0200 (CEST) Received: by mail-pg1-f196.google.com with SMTP id o185so4926575pgo.3 for ; Fri, 24 Apr 2020 10:15:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9Ov4g68NmVOPmDfAHBr12sDq2CrC5WKUM4xhs/pwCyE=; b=v22iKQTNwnUUp/tfFxONTEXAv1WxR0RIaJWXgpxtL0E6RZQSDfRpDgl1VzjC00mooK 1khFRjGN5XWsRBXli8kgW4oCZsi6JRvxqU98cLK3cBh94E6/+vFaIrs9rBvmH6C91XHF oE+SBRYtpxFly2WGjtlxgXYVsksZ0FEw7Hhr7U+YEShZimDFIfWoX8Bqli7OCkW26vjX QvdPVDK2aBKx3sC/PlKZaBTEdIm83MBKgI2UExPr6QBEdbUzBM3tOcN039DBetaqSF1i BqIZ+7cdzWcagzK0nPpdgo8Bx49TUVfT7WQiWYgrzeAhIkYXZGdRRThWO0zqZqm/sYF7 rkMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9Ov4g68NmVOPmDfAHBr12sDq2CrC5WKUM4xhs/pwCyE=; b=psAvo9n+0f1n7edtmzV5gTwlL40JBTy5N/Z9HQh2cCWtsrdvBc5X6a6EAOmOl1AlGx cgs3IAs0KlcP+2qs2+c90XN2dYJ0GYGMOw2smTS1fqlARSzUrF8fgtD3qIxFXgtUoK+P Bd+uJOYWKAL6+2wCt3RQEYImixmCFw3PSkbwfJ3kLFODSuOumczXLWRT2gINtpCjaiep +Q8DhBdYbvxDRNcSE8QiZu5rwqeCtAkMNVCWhQ6eojBOKlYcHOeWoIM9+laGllL994HC 2w5z/6KNVaAUx2CGwY6jnQjllTEOm0vA29lWqoiDXh+yaSeuGl+rl/9wixV5wNiFmLbk xpDA== X-Gm-Message-State: AGi0PuYuM3IPGyPTW7OB+OVvqNlVpFPnCZDp2sqBLr5kIP+Jp8Tf8iLW OnT5Wap6EvXVT9M6a5YEzOn0qC9nKtQ= X-Google-Smtp-Source: APiQypKe7hYsvLDQFEplmCgar6Whjp8F9qLSxvfYIxwgx5nVOv2dgMezR3+RqtCXdE4XYOL6wQu0MA== X-Received: by 2002:a63:df42:: with SMTP id h2mr10399191pgj.216.1587748544042; Fri, 24 Apr 2020 10:15:44 -0700 (PDT) Received: from hermes.corp.microsoft.com (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id w3sm6153245pfn.115.2020.04.24.10.15.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Apr 2020 10:15:43 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Fri, 24 Apr 2020 10:15:32 -0700 Message-Id: <20200424171536.11535-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200212230810.2837-1-stephen@networkplumber.org> References: <20200212230810.2837-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 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" Since the DPDK api's are lazy about checking for flag values it means the flags can never be extended in future releases 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. v2 - rebase and fix checkpatch warnings from RFC 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 | 9 +++++++++ lib/librte_ring/rte_ring.c | 10 ++++++++++ lib/librte_stack/rte_stack.c | 5 +++++ 4 files changed, 28 insertions(+) -- 2.20.1