From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3862AA0547; Thu, 29 Apr 2021 20:18:48 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A698C410DF; Thu, 29 Apr 2021 20:18:47 +0200 (CEST) Received: from mail-pg1-f177.google.com (mail-pg1-f177.google.com [209.85.215.177]) by mails.dpdk.org (Postfix) with ESMTP id 77FCA410DD for ; Thu, 29 Apr 2021 20:18:45 +0200 (CEST) Received: by mail-pg1-f177.google.com with SMTP id z16so6818587pga.1 for ; Thu, 29 Apr 2021 11:18:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=05kiFPwonESoQJto12nhNZzfabVLJc2VgDaRAZeZqMw=; b=BdM0DKWtc+1NVnNTU5up+29zORpPGd798sRkFTy1ow0ROlUIkrbAYH6a/r0fa/fFB+ FPiTmXhTX+zjaqKBYS/FEKvJLMklcAllmmuOPK8cV9iEXiQB3XczLsO2j3wPiv/GE001 UwpeqToVdVgjG02TkOodIa6PVy5+rcBuuHvv0fM/rtmhJQVbq+aOaJmop8os8vCkacdS xpD/NPJEJLHCMl2ijwDbkgPiESbSa9Fe01MOhu9xYLv3g5HP4F3ME+GuwF+Xg6+CHUfD EepulrZVi1CEssNlA1y0Uo+L3iawKVeM0Grm+5vKhuaUFh5OXh1319pz7EhPnWcyIAb+ kVfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=05kiFPwonESoQJto12nhNZzfabVLJc2VgDaRAZeZqMw=; b=drI7N0Xjpht/K2jeYM1HwzEUzIED/2J4QfD4JfkpiQ1GgCJl/91DmrF7+J5ZiEL5X+ hj/lLQnBoKLkRKXg+jOJoDDF4sqqeGk3K41ch1xF02lZ45d3ExK51m60TH/pcRe4l21R oGRiWrEGbBC6TsWEBTia3KoWqhgZp2wHoHkWpoPpSbQ6aEISG2yGPMy4cjKudKCKBmzw RPQTOqIR+BVhTas9rcgFOqdtlyjfZLoIvYQUegcfZmgxYOtfjrF02RrENHEAKwOf2Fgn W3C3GSLqjf2+sXBBHN500dwOI90+ki1K634nOt2phN07xFWd2etF5ak2TOGZT4mzKhP2 XuUA== X-Gm-Message-State: AOAM533gKVGoE67b4IA3UTKoHkqT2IyyW3qPTND33Q8WGBGtWZfqCEfB qj+bf7UEEiVzNKQMcZd1ob1Hrw== X-Google-Smtp-Source: ABdhPJxmg981WfBmyfe9b0RRwveK65EwJ2aCMeQ7jgbcD9f6Cmzvojg7i9WK/q5ca7wFhrKT0XFf0A== X-Received: by 2002:a62:dd41:0:b029:24c:27a4:48f1 with SMTP id w62-20020a62dd410000b029024c27a448f1mr1011692pff.42.1619720324256; Thu, 29 Apr 2021 11:18:44 -0700 (PDT) Received: from hermes.local (76-14-218-44.or.wavecable.com. [76.14.218.44]) by smtp.gmail.com with ESMTPSA id i20sm2845262pjz.48.2021.04.29.11.18.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Apr 2021 11:18:43 -0700 (PDT) Date: Thu, 29 Apr 2021 11:18:40 -0700 From: Stephen Hemminger To: Tyler Retzlaff Cc: "Min Hu (Connor)" , dev@dpdk.org, ferruh.yigit@intel.com, thomas@monjalon.net, andrew.rybchenko@oktetlabs.ru Message-ID: <20210429111840.05fc4abf@hermes.local> In-Reply-To: <20210429174834.GE21799@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <1618046334-39857-1-git-send-email-humin29@huawei.com> <1618284134-26152-1-git-send-email-humin29@huawei.com> <20210429174834.GE21799@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2] ethdev: add sanity checks in control APIs X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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 Thu, 29 Apr 2021 10:48:34 -0700 Tyler Retzlaff wrote: > On Tue, Apr 13, 2021 at 11:22:14AM +0800, Min Hu (Connor) wrote: > > This patch adds more sanity checks in control path APIs. > > > > Fixes: 214ed1acd125 ("ethdev: add iterator to match devargs input") > > Fixes: 3d98f921fbe9 ("ethdev: unify prefix for static functions and variables") > > Fixes: 0366137722a0 ("ethdev: check for invalid device name") > > Fixes: d948f596fee2 ("ethdev: fix port data mismatched in multiple process model") > > Fixes: 5b7ba31148a8 ("ethdev: add port ownership") > > Fixes: f8244c6399d9 ("ethdev: increase port id range") > > Cc: stable@dpdk.org > > > > Signed-off-by: Min Hu (Connor) > > --- > > this whole patch breaks abi since it returns new errno that were not > previously documented or returned. even if it is accepted it probably > should not be backported to stable. > > it is entirely conceivable that you can have code that was calling these > functions and checking for specific return values where the new return > values will not be handled at all or improperly handled. > > you can't just start emitting brand new errors or different errors for > the same input parameters. In practice, checking for passing a NULL doesn't add a lot of value. No program should ever do that, and if it did the crash that happens when it dereferenced is as good as an assert() or an error return.