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 3D6D4A0C3F; Thu, 15 Apr 2021 18:21:44 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 995D21623D0; Thu, 15 Apr 2021 18:21:43 +0200 (CEST) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by mails.dpdk.org (Postfix) with ESMTP id 380881623CF for ; Thu, 15 Apr 2021 18:21:42 +0200 (CEST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id C7D395C0078; Thu, 15 Apr 2021 12:21:39 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Thu, 15 Apr 2021 12:21:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm3; bh= IIWsPGNR7rJpDmsI3bz7WbYD7CuBHFNP/cSRT8C6soQ=; b=LHNuUrF+gPU/7gMU 7HIBU9nwBFnotihhYKiaVuAM1Z1n4mw2zJH08aC32l9mJiWTqH6hET+GXYxcXx8i Z8D0JPuZa/dcsZF7CQ8efsP3V9m3CVtbxzJCekkgSMl05h1BfeTjZfGeAHXrDJlt KdfWhAoYtjtK+5wEqMpMKjsFys/VyePSyofTwaQxAEpgqyqsLowuG3VGL2LyK8Mc lEOZYJpuH9AF9P2C672JDq3M/PVZwucKaiqnide4G/XCDaNIF8cboRiQBY3Yg/jz Sjy7QKp5LtFUHKPCHCh1qxfvojAVwXKmbcn22tbt4lf/rk2SraGLyU2Tql/K1tnl Qkd4tA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=IIWsPGNR7rJpDmsI3bz7WbYD7CuBHFNP/cSRT8C6s oQ=; b=H5JsYSMPzz1RV7Vew3LeiQA8WDd4bnoIwGINPMl+grpN+J4x5iOGzuXmh 0Yg7Otxg4wOQAU3D7otKrVZ1B+Isr5HTEYMrJipxhQpjT7vGsRWpReIHkAxZV/Q+ Ad/bSYJWckaymcJQz49TiTkFpxBoSdFLpFU3d4nEdSggu1esPSCTe8HoVLmk5dO6 AgiKGrOo/D8DdhFGw9SsOKiRbqAYGoScKi22D/7qzco/xJlMrzXC6gDgI+4wt3Tq 9gdN05wE0rxPI+m0EZuxqa1M0diXn0H021qJvNxZRV1a/IoXwNOgy72pNFZztdp9 tKxBUHpYx9DasYbaPfRiyJXtfQwMg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudelfedguddtgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdej ueeiiedvffegheenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrh fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgr lhhonhdrnhgvth X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 4F8FB1080057; Thu, 15 Apr 2021 12:21:38 -0400 (EDT) From: Thomas Monjalon To: "Min Hu (Connor)" , andrew.rybchenko@oktetlabs.ru, Ferruh Yigit Cc: dev@dpdk.org Date: Thu, 15 Apr 2021 18:21:36 +0200 Message-ID: <3206149.aRkFrSdduT@thomas> In-Reply-To: References: <1618046334-39857-1-git-send-email-humin29@huawei.com> <1618484959-4360-1-git-send-email-humin29@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v5] 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" 15/04/2021 17:45, Ferruh Yigit: > Not exactly related to this patch, but related to the API input, some input that > is filled by API is memset first before passing it to the PMD, which makes > sense. And for this we have two different ordering with dev_ops check: > > 1. > memset(input) > check dev_ops, return error if not supported > call dev_ops > > 2. > check dev_ops, return error if not supported > memset(input) > call dev_ops > > Connor, Thomas, Andrew, > Do you think does it have any benifit to unify it, and is one better than other? Yes good catch. It deserves a separate patch to not memset if not needed. We must check if supported before memset.