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 E1B36A0A03; Mon, 18 Jan 2021 18:42:52 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 63B51140D3A; Mon, 18 Jan 2021 18:42:52 +0100 (CET) Received: from mail-qk1-f173.google.com (mail-qk1-f173.google.com [209.85.222.173]) by mails.dpdk.org (Postfix) with ESMTP id 441AB140D1D for ; Mon, 18 Jan 2021 18:42:51 +0100 (CET) Received: by mail-qk1-f173.google.com with SMTP id 186so19378943qkj.3 for ; Mon, 18 Jan 2021 09:42:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=udQZ3DhWqkcekfiEJUG4V9+AB+DxwnheKOgakHMhmc0=; b=Sfd4NM7YuyeZt5THPp8nU1b7p6wZ05SR7Clhpbmmyk3wbiFCVnAOCqbSIM3bbGByrq pYH16zuhaoFrVfSpeK0hZm/LNAuccnDCaIWi3+X6EPCtMupmWa9abgjVFER8dtrcWonW 2y0QnzGQFGkhf9bVt3EsR553JvM4j0RRLKC4M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=udQZ3DhWqkcekfiEJUG4V9+AB+DxwnheKOgakHMhmc0=; b=UeWaq4fPqQMPHrowr9zA9I8xaHRq//cGg4xxHXQrzntjKVv6FUHV8ESSba0e069a6i zh36wBWyfZFyTcVSSCqOvwWoevinrhZX7qKPtrB1fljDqgiqKAkqfi/4PQWuE4eMa4Lo rkP9UYDV0nTayOUmTpGad7ERCfNq+v8JLvhXbAoeVtsEnsRASFECHXjhqcPP9SSk3csj gW0XUNwhy/eLEJsptCbUe2Bl+tQSb3Lb5WpQ+FEqCwgO/T0D2DxfpXk4BTNgwvMW+DCX w/5fpIFgVhf6Sxy/MOKOm5GQnufY7wdtbka+pVUG+4E0q0l9l2W1vyOuMpCHNzwh1o31 8YKg== X-Gm-Message-State: AOAM5306QURcriW496t3/5kXg2NpPCQ/sPpEOcVO1RDLHIgXHH67IsZU 6dZjp2zt1KMA+cWLd9EQm8UDr1hkXUBPaD4IRYtpFg== X-Google-Smtp-Source: ABdhPJy1fMI5INAJF072qij9UdMApffvp+tH2Hkw1CT+ESt3h5axxm3n6DzX0qEW1kpW40jm3heKFrBtAmkEwpjiJfA= X-Received: by 2002:a05:620a:528:: with SMTP id h8mr737540qkh.40.1610991770406; Mon, 18 Jan 2021 09:42:50 -0800 (PST) MIME-Version: 1.0 References: <1608303356-13089-2-git-send-email-xuemingl@nvidia.com> <1610968623-31345-1-git-send-email-xuemingl@nvidia.com> <1610968623-31345-2-git-send-email-xuemingl@nvidia.com> In-Reply-To: <1610968623-31345-2-git-send-email-xuemingl@nvidia.com> From: Ajit Khaparde Date: Mon, 18 Jan 2021 09:42:34 -0800 Message-ID: To: Xueming Li Cc: Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko , Olivier Matz , dpdk-dev , Viacheslav Ovsiienko , Asaf Penso Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="0000000000003d7b8305b9304076" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [dpdk-dev] [PATCH v4 1/9] ethdev: introduce representor type 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" --0000000000003d7b8305b9304076 Content-Type: text/plain; charset="UTF-8" On Mon, Jan 18, 2021 at 3:17 AM Xueming Li wrote: > > To support more representor type, this patch introduces representor type > enum. The enum is subject to extend for new types upcoming. > > Signed-off-by: Xueming Li > Acked-by: Viacheslav Ovsiienko Acked-by: Ajit Khaparde > --- > drivers/net/bnxt/bnxt_ethdev.c | 7 +++++++ > drivers/net/enic/enic_ethdev.c | 7 +++++++ > drivers/net/i40e/i40e_ethdev.c | 8 ++++++++ > drivers/net/ixgbe/ixgbe_ethdev.c | 8 ++++++++ > drivers/net/mlx5/linux/mlx5_os.c | 11 +++++++++++ > lib/librte_ethdev/ethdev_private.c | 5 +++++ > lib/librte_ethdev/rte_ethdev_driver.h | 9 +++++++++ > 7 files changed, 55 insertions(+) > > diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c > index 74b0f3d1dc..d7c8b3ec07 100644 > --- a/drivers/net/bnxt/bnxt_ethdev.c > +++ b/drivers/net/bnxt/bnxt_ethdev.c > @@ -5586,6 +5586,13 @@ static int bnxt_rep_port_probe(struct rte_pci_device *pci_dev, > int i, ret = 0; > struct rte_kvargs *kvlist = NULL; > > + if (eth_da->type == RTE_ETH_REPRESENTOR_NONE) > + return 0; > + if (eth_da->type != RTE_ETH_REPRESENTOR_VF) { > + PMD_DRV_LOG(ERR, "unsupported representor type %d\n", > + eth_da->type); > + return -ENOTSUP; > + } > num_rep = eth_da->nb_representor_ports; > if (num_rep > BNXT_MAX_VF_REPS) { > PMD_DRV_LOG(ERR, "nb_representor_ports = %d > %d MAX VF REPS\n", Ack. Thanks :::: snip :::: > +/** Ethernet device representor type */ > +enum rte_eth_representor_type { > + RTE_ETH_REPRESENTOR_NONE, /**< not a representor. */ > + RTE_ETH_REPRESENTOR_VF, /**< representor of VF. */ > + RTE_ETH_REPRESENTOR_SF, /**< representor of SF. */ Till we get used to the terminology... Can we also have SF = "Sub Function" mentioned in the docs or comments? > + RTE_ETH_REPRESENTOR_PF, /**< representor of host PF. */ > +}; > + > /** Generic Ethernet device arguments */ > struct rte_eth_devargs { > uint16_t ports[RTE_MAX_ETHPORTS]; > @@ -1203,6 +1211,7 @@ struct rte_eth_devargs { > /** representor port/s identifier to enable on device */ > uint16_t nb_representor_ports; > /** number of ports in representor port field */ > + enum rte_eth_representor_type type; /* type of representor */ > }; > > /** > -- > 2.25.1 > --0000000000003d7b8305b9304076--