DPDK patches and discussions
 help / color / mirror / Atom feed
From: kumaraparameshwaran rathinavel <kumaraparamesh92@gmail.com>
To: dev@dpdk.org
Cc: qi.z.zhang@intel.com
Subject: [dpdk-dev] Failsafe Secondary Process
Date: Wed, 11 Aug 2021 18:24:24 +0530	[thread overview]
Message-ID: <CANxNyauRpj453KLAq5Ki28qbgm6OvsxtoWyM5TwYjNsMAcAJaQ@mail.gmail.com> (raw)

Hi All,
In the commit ee27edbe0c10ec8337c4cc4d2935a751d0da605f I see that for the
probe from the secondary process the below check was made, for vdev devices
like tap, af_packet.

+ if (rte_eal_process_type() == RTE_PROC_SECONDARY &&
+           strlen(rte_vdev_device_args(dev)) == 0) {
+               eth_dev = rte_eth_dev_attach_secondary(name);
+               if (!eth_dev) {
+                       RTE_LOG(ERR, PMD, "Failed to probe %s\n", name);
+                       return -1;
+               }
+               /* TODO: request info from primary to set up Rx and Tx */
+               eth_dev->dev_ops = &ops;
+               return 0;
+       }

After that in the commit 4852aa8f6e2125664698afc43b820bd787b02756 the
strlen(rte_vdev_device_args(dev)) check for the secondary was removed so
that the secondary process could attach to the devices created by the
primary and work on it.
-       if (rte_eal_process_type() == RTE_PROC_SECONDARY &&
-           strlen(rte_vdev_device_args(dev)) == 0) {
+       if (rte_eal_process_type() == RTE_PROC_SECONDARY) {


But I see in the rte_pmd_failsafe_probe looks like the strlen check was not
removed. Because of this when i try to use initialise the failsafe device
from secondary which was created by primary, rather than attaching to the
existing device, a new failsafe device is created. Looks like this is a
miss for the failsafe driver or is it intentionally retained?


commit ee27edbe0c10ec8337c4cc4d2935a751d0da605f
Date:   Tue Apr 24 05:51:24 2018 +0000

    drivers/net: share vdev data to secondary process

    dpdk-procinfo, as a secondary process, cannot fetch stats for vdev.

    This patch enables that by attaching the port from the shared data.
    We also fill the eth dev ops, with only some ops works in secondary
    process, for example, stats_get().


commit 4852aa8f6e2125664698afc43b820bd787b02756
Date:   Tue Oct 16 08:16:30 2018 +0800

    drivers/net: enable hotplug on secondary process

    Attach port from secondary should ignore devargs since the private
    device is not necessary to support. Also previously, detach port on
    a secondary process will mess primary process and cause the same
    device can't be attached back again. A secondary process should use
    rte_eth_dev_release_port_secondary to release a port.

Thanks,
Param.

                 reply	other threads:[~2021-08-11 12:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=CANxNyauRpj453KLAq5Ki28qbgm6OvsxtoWyM5TwYjNsMAcAJaQ@mail.gmail.com \
    --to=kumaraparamesh92@gmail.com \
    --cc=dev@dpdk.org \
    --cc=qi.z.zhang@intel.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).