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 2650F42F9B; Tue, 1 Aug 2023 18:19:47 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EE2C540F16; Tue, 1 Aug 2023 18:19:46 +0200 (CEST) Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) by mails.dpdk.org (Postfix) with ESMTP id A486640A89 for ; Tue, 1 Aug 2023 18:19:45 +0200 (CEST) Received: by mail-pf1-f173.google.com with SMTP id d2e1a72fcca58-686b91c2744so4227841b3a.0 for ; Tue, 01 Aug 2023 09:19:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1690906785; x=1691511585; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=l1teC6GhnhTrIIZhpFPZ/bVdgW8+abbpGprQIIIsxKo=; b=Sbx16IUQPja/pHzViwcmrYTPwhSJAVn6NIjBtr1WdQU/t6NLnzJV8kzghKwSMVNktl nIVxBjFXJf/62/FKE3l1ve6mQlbf/+/RX/dKZDyoNtzUhkdVtqmTH288NN4zrZTzpKbV bhZOxrLxMJzZ+Igm3JXdpAVAd+QulAGYIyijrHnr7p3wD6wXiWi6XgixpDOcezOg4+mm 2hCRvW00Cd1yox7sZotMEW/H+KsdpQgjY9ZYQ6u7GaQNz+ojIeofpdnJbX1aV0KqW467 FVTLAd/yVxmVRJyhBXmS+ic/Og69Pu1Oq8gGulvA1hmPxqJ46ZQ+40TDRJI3qx5HSySo 4pzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690906785; x=1691511585; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=l1teC6GhnhTrIIZhpFPZ/bVdgW8+abbpGprQIIIsxKo=; b=XPvmH9blw/h2T0F+1eQuFxYr9Mn/CeOPFaXm40dIbG6ds3vHsfG2c3VW+eS4B9iUDM 49uJuMAmjCSQBJYe46+uhdie7b2uaSfqCygfSozfKOyKpngWpIYzaSKkFlhm8qgHxn3F dKq6eUpCiYyadM9NC0HIt78rnA1z1XbqXsRuWdl4mDNvBuFAv7LLtdVY8Vy/cd8ByVBt qbAwOMlDues9nGbDnUF4v2ZmhV5yP54kx4Gw1oSPMxxm7hcfUI8ao6jbrtuHKAuILHsy YTv52wlO8XVIb5JXmJsJTwtDl6CVqJsu2BNEZRohswzj1ThIz+h0/4/StxSNmiTua584 7KLA== X-Gm-Message-State: ABy/qLZ9pF4ZCyO/OSjHH8J9UMhiiLOxBAsu5vgbQnAAQVnZbXOFMWyT YzGlgb5ZkmQH3W6eClBijbRztQ== X-Google-Smtp-Source: APBJJlEw1L/ha26qVLam/u2sb77xz67NFCYdZPWQDsvJvkxGezy6ZPwXN/M2OsvzT8D3t7Nbd0IC4g== X-Received: by 2002:a05:6a00:1687:b0:687:14df:51a9 with SMTP id k7-20020a056a00168700b0068714df51a9mr15574239pfc.12.1690906784872; Tue, 01 Aug 2023 09:19:44 -0700 (PDT) Received: from hermes.local (204-195-127-207.wavecable.com. [204.195.127.207]) by smtp.gmail.com with ESMTPSA id m26-20020a056a00165a00b006874a6e74b4sm2676939pfc.151.2023.08.01.09.19.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Aug 2023 09:19:44 -0700 (PDT) Date: Tue, 1 Aug 2023 09:19:42 -0700 From: Stephen Hemminger To: Kaiyu Zhang Cc: thomas@monjalon.net, ferruh.yigit@amd.com, andrew.rybchenko@oktetlabs.ru, dev@dpdk.org Subject: Re: [PATCH] lib/ethdev: sanity check on callback before resource allocation Message-ID: <20230801091942.1727e6bb@hermes.local> In-Reply-To: <20230711011809.96677-1-squirrel.prog@gmail.com> References: <20230711011809.96677-1-squirrel.prog@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Tue, 11 Jul 2023 01:18:09 +0000 Kaiyu Zhang wrote: > sanity check is performed after a rte_eth_dev object is allocated. > The object is not freed if the check fails, though in the current > reality this never happens, but it's better programming paradigm > to move the quick check up front to the start of > rte_eth_dev_pci_generic_probe. > > Signed-off-by: Kaiyu Zhang The term sanity check is on the non-inclusive naming word list. Please don't use that term in DPDK. There is an outstanding patchset to remove all use of the term.