DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerinjacobk@gmail.com>
To: Sathesh Edara <sedara@marvell.com>
Cc: sburla@marvell.com, jerinj@marvell.com,
	 Radha Mohan Chintakuntla <radhac@marvell.com>,
	Veerasenareddy Burru <vburru@marvell.com>,
	 Anatoly Burakov <anatoly.burakov@intel.com>,
	dev@dpdk.org
Subject: Re: [PATCH v2 10/10] net/octeon_ep: set secondary process dev ops
Date: Fri, 21 Apr 2023 10:33:12 +0530	[thread overview]
Message-ID: <CALBAE1PSsxTp0ozsNh-GX=n38c=3_RJXe4iO6n5XS2exM1Vu1Q@mail.gmail.com> (raw)
In-Reply-To: <20230405142537.1899973-11-sedara@marvell.com>

On Wed, Apr 5, 2023 at 7:57 PM Sathesh Edara <sedara@marvell.com> wrote:
>
> 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 <sedara@marvell.com>
> ---
>  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_ep/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 = OTX_EP_DEV(eth_dev);
> +       struct otx_ep_device *otx_epvf;
>         uint32_t num_queues, q_no;
>
> +       if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
> +               eth_dev->dev_ops = NULL;
> +               eth_dev->rx_pkt_burst = NULL;
> +               eth_dev->tx_pkt_burst = NULL;
> +               return 0;
> +       }
> +
> +       otx_epvf = OTX_EP_DEV(eth_dev);
>         otx_ep_mbox_send_dev_exit(eth_dev);
>         otx_epvf->fn_list.disable_io_queues(otx_epvf);
>         num_queues = otx_epvf->nb_rx_queues;
> @@ -593,8 +601,12 @@ static const struct eth_dev_ops otx_ep_eth_dev_ops = {
>  static int
>  otx_ep_eth_dev_uninit(struct rte_eth_dev *eth_dev)
>  {
> -       if (rte_eal_process_type() != RTE_PROC_PRIMARY)
> +       if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
> +               eth_dev->dev_ops = NULL;
> +               eth_dev->rx_pkt_burst = NULL;
> +               eth_dev->tx_pkt_burst = NULL;
>                 return 0;
> +       }
>
>         eth_dev->dev_ops = NULL;
>         eth_dev->rx_pkt_burst = 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() != RTE_PROC_PRIMARY)
> +       if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
> +               eth_dev->dev_ops = &otx_ep_eth_dev_ops;
> +               eth_dev->rx_pkt_burst = &otx_ep_recv_pkts;
> +               eth_dev->tx_pkt_burst = &otx2_ep_xmit_pkts;
>                 return 0;
> +       }
>
>         rte_eth_copy_pci_info(eth_dev, pdev);
>         otx_epvf->eth_dev = eth_dev;
> --
> 2.31.1
>

  reply	other threads:[~2023-04-21  5:03 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-04 14:18 [PATCH v1 0/9] extend octeon ep driver functionality Sathesh Edara
2023-04-04 14:18 ` [PATCH v1 1/9] net/octeon_ep: support cnf95n and cnf95o SoC Sathesh Edara
2023-04-05 14:25   ` [PATCH v2 00/10] extend octeon ep driver functionality Sathesh Edara
2023-04-05 14:25     ` [PATCH v2 01/10] net/octeon_ep: support cnf95n and cnf95o SoC Sathesh Edara
2023-04-24 12:28       ` [PATCH v3 00/11] extend octeon ep driver functionality Sathesh Edara
2023-04-24 12:28         ` [PATCH v3 01/11] net/octeon_ep: support cnf95n and cnf95o SoC Sathesh Edara
2023-04-24 12:28         ` [PATCH v3 02/11] net/octeon_ep: support CNX10K series SoC Sathesh Edara
2023-04-24 12:28         ` [PATCH v3 03/11] net/octeon_ep: support error propagation Sathesh Edara
2023-04-24 12:28         ` [PATCH v3 04/11] net/octeon_ep: support IQ/OQ reset Sathesh Edara
2023-04-24 12:28         ` [PATCH v3 05/11] devtools: add acronym in dictionary for commit checks Sathesh Edara
2023-04-24 12:28         ` [PATCH v3 06/11] net/octeon_ep: support ISM Sathesh Edara
2023-04-24 12:28         ` [PATCH v3 07/11] net/octeon_ep: flush pending DMA operations Sathesh Edara
2023-04-24 12:28         ` [PATCH v3 08/11] net/octeon_ep: update queue size checks Sathesh Edara
2023-04-24 12:28         ` [PATCH v3 09/11] net/octeon_ep: support mailbox between VF and PF Sathesh Edara
2023-04-24 12:28         ` [PATCH v3 10/11] net/octeon_ep: set watermark for output queues Sathesh Edara
2023-04-24 12:28         ` [PATCH v3 11/11] net/octeon_ep: set secondary process dev ops Sathesh Edara
2023-04-05 14:25     ` [PATCH v2 02/10] net/octeon_ep: support CNX10K series SoC Sathesh Edara
2023-04-05 14:25     ` [PATCH v2 03/10] net/octeon_ep: support error propagation Sathesh Edara
2023-04-05 14:25     ` [PATCH v2 04/10] net/octeon_ep: support IQ/OQ reset Sathesh Edara
2023-04-05 14:25     ` [PATCH v2 05/10] net/octeon_ep: support ISM Sathesh Edara
2023-04-21  4:56       ` Jerin Jacob
2023-04-05 14:25     ` [PATCH v2 06/10] net/octeon_ep: fix DMA incompletion Sathesh Edara
2023-04-21  4:51       ` Jerin Jacob
2023-04-05 14:25     ` [PATCH v2 07/10] net/octeon_ep: update queue size checks Sathesh Edara
2023-04-05 14:25     ` [PATCH v2 08/10] net/octeon_ep: support Mailbox between VF and PF Sathesh Edara
2023-04-21  5:00       ` Jerin Jacob
2023-04-05 14:25     ` [PATCH v2 09/10] net/octeon_ep: set watermark for output queues Sathesh Edara
2023-04-05 14:25     ` [PATCH v2 10/10] net/octeon_ep: set secondary process dev ops Sathesh Edara
2023-04-21  5:03       ` Jerin Jacob [this message]
2023-04-24 12:55     ` [PATCH v3 00/11] extend octeon ep driver functionality Sathesh Edara
2023-04-24 12:55       ` [PATCH v3 01/11] net/octeon_ep: support cnf95n and cnf95o SoC Sathesh Edara
2023-04-24 12:55       ` [PATCH v3 02/11] net/octeon_ep: support CNX10K series SoC Sathesh Edara
2023-04-24 12:55       ` [PATCH v3 03/11] net/octeon_ep: support error propagation Sathesh Edara
2023-04-24 12:55       ` [PATCH v3 04/11] net/octeon_ep: support IQ/OQ reset Sathesh Edara
2023-04-24 12:55       ` [PATCH v3 05/11] devtools: add acronym in dictionary for commit checks Sathesh Edara
2023-05-03  7:16         ` Jerin Jacob
2023-04-24 12:55       ` [PATCH v3 06/11] net/octeon_ep: support ISM Sathesh Edara
2023-04-24 12:55       ` [PATCH v3 07/11] net/octeon_ep: flush pending DMA operations Sathesh Edara
2023-04-24 12:55       ` [PATCH v3 08/11] net/octeon_ep: update queue size checks Sathesh Edara
2023-04-24 12:55       ` [PATCH v3 09/11] net/octeon_ep: support mailbox between VF and PF Sathesh Edara
2023-04-24 12:55       ` [PATCH v3 10/11] net/octeon_ep: set watermark for output queues Sathesh Edara
2023-04-24 12:55       ` [PATCH v3 11/11] net/octeon_ep: set secondary process dev ops Sathesh Edara
2023-04-04 14:18 ` [PATCH v1 2/9] net/octeon_ep: support CNX10K series SoC Sathesh Edara
2023-04-04 14:18 ` [PATCH v1 3/9] net/octeon_ep: support error propagation Sathesh Edara
2023-04-04 14:18 ` [PATCH v1 4/9] net/octeon_ep: support IQ/OQ reset Sathesh Edara
2023-04-04 14:18 ` [PATCH v1 5/9] net/octeon_ep: support ISM Sathesh Edara
2023-04-04 14:18 ` [PATCH v1 6/9] net/octeon_ep: fix DMA incompletion Sathesh Edara
2023-04-04 14:18 ` [PATCH v1 7/9] net/octeon_ep: update queue size checks Sathesh Edara
2023-04-04 14:18 ` [PATCH v1 8/9] net/octeon_ep: support Mailbox between VF and PF Sathesh Edara
2023-04-04 14:18 ` [PATCH v1 9/9] net/octeon_ep: set watermark for output queues Sathesh Edara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALBAE1PSsxTp0ozsNh-GX=n38c=3_RJXe4iO6n5XS2exM1Vu1Q@mail.gmail.com' \
    --to=jerinjacobk@gmail.com \
    --cc=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=radhac@marvell.com \
    --cc=sburla@marvell.com \
    --cc=sedara@marvell.com \
    --cc=vburru@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).