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 DA344A00C2; Mon, 8 Aug 2022 16:45:46 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 98CF64067B; Mon, 8 Aug 2022 16:45:46 +0200 (CEST) Received: from mail-pj1-f51.google.com (mail-pj1-f51.google.com [209.85.216.51]) by mails.dpdk.org (Postfix) with ESMTP id C0F2F4014F for ; Mon, 8 Aug 2022 16:45:45 +0200 (CEST) Received: by mail-pj1-f51.google.com with SMTP id t22so9008832pjy.1 for ; Mon, 08 Aug 2022 07:45:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=eS5GZslYzf/oerljbFKPztrce46q1ubPti5jT49P2TI=; b=RQT9P/wlBPH9sMU6a4SAPESvBzdQJHW3sXnRwDDKc5T4PtGHMPkGJ/vJJVArV3YBxT 34jPSEXYqWlansMtuRQubHD+/dVHKuUkWNjC80tN5ELjsw9swQk1Llt8rzB8D9Ihly/B xRvIwL/7oHRLIaUUXsfXfaqQvKDNSewElJDcTQj7AH1Aigw2lCpk/h2QDSb3+zsezR28 4qcd8UeXXDwo/cuxH256kXrW4YIWku8dgV4LqaEvag0QVSR94W9oa6WYSvTdhtHdpNuQ kpIy+kk7NqLgmKQnlUvu/3a4LwOuZBgMQNdYN0MRZ2CV1tsy3YYMDUwAKcwnl/7i4nWx cl1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=eS5GZslYzf/oerljbFKPztrce46q1ubPti5jT49P2TI=; b=MXoXy9Sm8cnl+Mi+cw+z/R7B51Tf3/PJ0PgVCvgSkSynDAzH1XA37clhyqjOjiKzY4 21mJgVgghO1V0sDgi7Q9AMwYZsNXUSe2486/z1jEAUIVdgfy/pA80Sf/ER2N+FIOCL+E 6rDw8PgR1At6cUL7q5mRe777KDTpEnmXP4toZ6nF55Yavntb7SA3HGd4MGKQB0CzrtAH 0nMlu0DI3I+a3qfX2wqFpuif+h6QUSKhDS2BHs4XGb2gCSkR68FUJo9ZJIdfVfRwd/SD yqnsPItDC3j9aoZ9rA+Uyv5HrHCEa0Kv2nvM2ritJO3gXiaVWC959ND0bI/+jZNpRuan 7O6w== X-Gm-Message-State: ACgBeo3uwOMwPWT4V/z9TCrj5e/ci6ngMyZb14gkrJDcN76LUv2RUv4I PSIj3p5HJpFSJcWbDqa7FnXctg== X-Google-Smtp-Source: AA6agR5t3+m3PSE7m/mzau8BDBkejaOPQzmNGnZl8ppFBq6Q/Rd5QYEongV3wi5pUtKxQS0quxeqWA== X-Received: by 2002:a17:90b:3a81:b0:1f7:2103:a8d6 with SMTP id om1-20020a17090b3a8100b001f72103a8d6mr12651987pjb.105.1659969944926; Mon, 08 Aug 2022 07:45:44 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id f4-20020a170902ce8400b0016cd74dae66sm9060620plg.28.2022.08.08.07.45.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Aug 2022 07:45:44 -0700 (PDT) Date: Mon, 8 Aug 2022 07:45:42 -0700 From: Stephen Hemminger To: Chaoyong He Cc: Andrew Rybchenko , Niklas Soderlund , "dev@dpdk.org" Subject: Re: [PATCH v5 07/12] net/nfp: add flower ctrl VNIC related logics Message-ID: <20220808074542.31b7185c@hermes.local> In-Reply-To: References: <1659681155-16525-1-git-send-email-chaoyong.he@corigine.com> <1659681155-16525-8-git-send-email-chaoyong.he@corigine.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 Mon, 8 Aug 2022 11:32:30 +0000 Chaoyong He wrote: > > > + goto done; > > > + > > > + /* Allocate memory for the eth_dev of the vNIC */ > > > + hw->eth_dev = rte_zmalloc("ctrl_vnic_eth_dev", > > > > Why not rte_eth_dev_allocate()? Isn't an ethdev? > > Why do you bypsss ethdev layer in this case completely and do everything > > yourself? > > Here we created an ethdev locally to nfp PMD, we want the user totally won't be aware of it. > If we use rte_eth_dev_allocate() to create it, it will be in array 'rte_ethdev_devices[]', that's not we want. Having a floating ethdev does open the code and users up to a number of potential bugs. What is the value of port_id on that ethdev? What is the mechanism to ensure it doesn't conflict with other ones in the system.