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 0459BA0C41; Fri, 16 Apr 2021 09:04:04 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DEBA6141B44; Fri, 16 Apr 2021 09:04:03 +0200 (CEST) Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) by mails.dpdk.org (Postfix) with ESMTP id 06EFC40140 for ; Fri, 16 Apr 2021 09:04:02 +0200 (CEST) Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4FM6ZZ41qPz17Qgr; Fri, 16 Apr 2021 15:01:42 +0800 (CST) Received: from [10.67.103.128] (10.67.103.128) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.498.0; Fri, 16 Apr 2021 15:04:00 +0800 To: Thomas Monjalon , , Ferruh Yigit CC: References: <1618046334-39857-1-git-send-email-humin29@huawei.com> <1618484959-4360-1-git-send-email-humin29@huawei.com> <3206149.aRkFrSdduT@thomas> From: "Min Hu (Connor)" Message-ID: <984d5f34-ffc4-a4c3-fc89-e746d75cc67c@huawei.com> Date: Fri, 16 Apr 2021 15:04:00 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: <3206149.aRkFrSdduT@thomas> Content-Type: text/plain; charset="gbk"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.103.128] X-CFilter-Loop: Reflected 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" ÔÚ 2021/4/16 0:21, Thomas Monjalon дµÀ: > 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. > Agreed, I will send next patch to fix it. > > . >