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 25E9E429A5; Fri, 21 Apr 2023 07:03:41 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 09A1A410DD; Fri, 21 Apr 2023 07:03:41 +0200 (CEST) Received: from mail-vk1-f176.google.com (mail-vk1-f176.google.com [209.85.221.176]) by mails.dpdk.org (Postfix) with ESMTP id A8A8840E6E for ; Fri, 21 Apr 2023 07:03:39 +0200 (CEST) Received: by mail-vk1-f176.google.com with SMTP id 71dfb90a1353d-4436189d2a9so437201e0c.1 for ; Thu, 20 Apr 2023 22:03:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682053419; x=1684645419; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=EPk24jhTy4ZutLy5D6bVexNp1Fg8fydd3pMrNoHC488=; b=KsxC4V1ZVzLReIkOv9PuBRopHMZDDf8Wds7eI7JO9VwXrjvdZuILMNkYdxJ0hOayNJ Y0T4mb+shcD3XNvR5eCn7trgfLx0nRRZp8VahTjIeSvK8/DPeVYDzq3iI29ERd5JJpIB 0x876A4f6LnULznw/YlmXmC6Uf62S1WPu2gNUkPaJCS+0lLMujPVRB3a2bMwnyLfEqP4 rCLba4LAanUWO1cXkee/aKj7Sbi9Tz/fLrifyFesbn+2CiXyDgvx5NQ+Fhgat7UC5cEb vyFS2/XBjx6xOPo1Il3Es+J7hFNFqCmlV2omc99zOwoDEP22lFh4+nphX4Ot2cDRht1n uL2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682053419; x=1684645419; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EPk24jhTy4ZutLy5D6bVexNp1Fg8fydd3pMrNoHC488=; b=jj3w0QTOifz3ZAdgHQKWS7o/8WEvuh3dZ/Yhly3zPwVr9bmY5sj5lUVHWUuPvnKzQN 31nvesSRWvfObCAtL3L4MzOfv0RhlCqCpGDDDE7KgYOgLFVWnZB9swrOB4fILSTrONWv oBzXia9qoLChlZz38z45DjVnZiwzD823zW7wvawLMsDRJG5UR1WfinDCLQ5FzW1EJBFN 7IKnP7n9KsTvt8H9mzANNZKiyKlEAtr7JCdl34uvIV/rnqyWZIh+eIo/7jdeW1N/WpTJ G89NCTnNj0z562uRHPUOTcwtxqx2XEydbzlWJaLeY7QeJqerFRNeno7iVyBybTkVdiqQ b9ng== X-Gm-Message-State: AAQBX9dX47tLbA56KVFGm/vsbw+Vo0AVQ7TaERtWK8mpFl2bq8+ESrI1 rjtZ83hgFl0H37Sd0a+UxdUj2xQ8E442xcZO4Dw= X-Google-Smtp-Source: AKy350bhdu05FjiPtTS1wPvP58ViXfhk6E3Cls1KLLxIgXSRCY2uzvtMTtZFdWeorU+g5Sh/WqlMATF8/mI10VUohEk= X-Received: by 2002:a1f:5546:0:b0:440:4946:fa5 with SMTP id j67-20020a1f5546000000b0044049460fa5mr326187vkb.0.1682053418920; Thu, 20 Apr 2023 22:03:38 -0700 (PDT) MIME-Version: 1.0 References: <20230404141855.1025625-2-sedara@marvell.com> <20230405142537.1899973-1-sedara@marvell.com> <20230405142537.1899973-11-sedara@marvell.com> In-Reply-To: <20230405142537.1899973-11-sedara@marvell.com> From: Jerin Jacob Date: Fri, 21 Apr 2023 10:33:12 +0530 Message-ID: Subject: Re: [PATCH v2 10/10] net/octeon_ep: set secondary process dev ops To: Sathesh Edara Cc: sburla@marvell.com, jerinj@marvell.com, Radha Mohan Chintakuntla , Veerasenareddy Burru , Anatoly Burakov , dev@dpdk.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Wed, Apr 5, 2023 at 7:57=E2=80=AFPM Sathesh Edara w= rote: > > This patch sets the dev ops and transmit/receive > callbacks for secondary process. Change the message as "fix ..." and fixes: tag if it just bug fixes. BTW, "Multiprocess aware" is missing in doc/guides/nics/features/octeon_ep.= ini > > Signed-off-by: Sathesh Edara > --- > drivers/net/octeon_ep/otx_ep_ethdev.c | 22 +++++++++++++++++++--- > 1 file changed, 19 insertions(+), 3 deletions(-) > > diff --git a/drivers/net/octeon_ep/otx_ep_ethdev.c b/drivers/net/octeon_e= p/otx_ep_ethdev.c > index 885fbb475f..a9868909f8 100644 > --- a/drivers/net/octeon_ep/otx_ep_ethdev.c > +++ b/drivers/net/octeon_ep/otx_ep_ethdev.c > @@ -527,9 +527,17 @@ otx_ep_dev_stats_get(struct rte_eth_dev *eth_dev, > static int > otx_ep_dev_close(struct rte_eth_dev *eth_dev) > { > - struct otx_ep_device *otx_epvf =3D OTX_EP_DEV(eth_dev); > + struct otx_ep_device *otx_epvf; > uint32_t num_queues, q_no; > > + if (rte_eal_process_type() !=3D RTE_PROC_PRIMARY) { > + eth_dev->dev_ops =3D NULL; > + eth_dev->rx_pkt_burst =3D NULL; > + eth_dev->tx_pkt_burst =3D NULL; > + return 0; > + } > + > + otx_epvf =3D OTX_EP_DEV(eth_dev); > otx_ep_mbox_send_dev_exit(eth_dev); > otx_epvf->fn_list.disable_io_queues(otx_epvf); > num_queues =3D otx_epvf->nb_rx_queues; > @@ -593,8 +601,12 @@ static const struct eth_dev_ops otx_ep_eth_dev_ops = =3D { > static int > otx_ep_eth_dev_uninit(struct rte_eth_dev *eth_dev) > { > - if (rte_eal_process_type() !=3D RTE_PROC_PRIMARY) > + if (rte_eal_process_type() !=3D RTE_PROC_PRIMARY) { > + eth_dev->dev_ops =3D NULL; > + eth_dev->rx_pkt_burst =3D NULL; > + eth_dev->tx_pkt_burst =3D NULL; > return 0; > + } > > eth_dev->dev_ops =3D NULL; > eth_dev->rx_pkt_burst =3D NULL; > @@ -642,8 +654,12 @@ otx_ep_eth_dev_init(struct rte_eth_dev *eth_dev) > struct rte_ether_addr vf_mac_addr; > > /* Single process support */ > - if (rte_eal_process_type() !=3D RTE_PROC_PRIMARY) > + if (rte_eal_process_type() !=3D RTE_PROC_PRIMARY) { > + eth_dev->dev_ops =3D &otx_ep_eth_dev_ops; > + eth_dev->rx_pkt_burst =3D &otx_ep_recv_pkts; > + eth_dev->tx_pkt_burst =3D &otx2_ep_xmit_pkts; > return 0; > + } > > rte_eth_copy_pci_info(eth_dev, pdev); > otx_epvf->eth_dev =3D eth_dev; > -- > 2.31.1 >