DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [Bug 93] crypto vdev create will reset the dev_started flag when one dpdk process has been up the crypto vdev
@ 2018-09-28  9:35 bugzilla
  0 siblings, 0 replies; only message in thread
From: bugzilla @ 2018-09-28  9:35 UTC (permalink / raw)
  To: dev

https://bugs.dpdk.org/show_bug.cgi?id=93

            Bug ID: 93
           Summary: crypto vdev create will reset the dev_started flag
                    when one dpdk process has been up the crypto vdev
           Product: DPDK
           Version: 17.05
          Hardware: All
                OS: All
            Status: CONFIRMED
          Severity: major
          Priority: Normal
         Component: cryptodev
          Assignee: dev@dpdk.org
          Reporter: wenjing.1.jin@nokia-sbell.com
  Target Milestone: ---

when use crypto vdev in one group primary/secondary processes, when one process
up the crypto vdev , if anther dpdk process startup with same dpdk crypto vdev
paramters, that will lead to the up vdev started flag set to 0.

from the code, if we want to use the vdev in secondary process , it must be
create in primary dpdk process first,and the secondary process which want use
the crypto vdev need startup with same dpdk vdev parameters(--vdev).but when
one dpdk process start after the crypto vdev up in one process , the vdev
started flag will reset to 0. this seem not an expected result,this will broke
the active cryptodev using.

test step:

         1: create one crypto vdev in primary dpdk process and then configured
and start the crypto vdev . 
         2: startup secondary dpdk process with same crypto vdev
parameters(crypto vdev will create in rte_eal_init())


        expected result: crypto vdev stats normal in first process  
        actual result:  crypto vdev dev_started set to 0

same issue with up crypto vdev in one secondary process and startup other
secondary process with same crypto parameters

this issue will result in different dpdk process can configured and start
crypto vdev independently in such scenario, it seem not an expected result. 

from the code we can see 
rte_cryptodev_pmd_allocate {
..............

if (cryptodev->data == NULL) {
                struct rte_cryptodev_data *cryptodev_data =
                                cryptodev_globals.data[dev_id];

                int retval = rte_cryptodev_data_alloc(dev_id, &cryptodev_data,
                                socket_id);

                cryptodev->data = cryptodev_data;

............................... 

                cryptodev->data->dev_id = dev_id;
                cryptodev->data->socket_id = socket_id;
                cryptodev->data->dev_started = 0;  

                cryptodev->attached = RTE_CRYPTODEV_ATTACHED;

                cryptodev_globals.nb_devs++;
        }
....................
}

in this function "cryptodev->data->dev_started = 0;" will executed in all dpdk
process which config with same dpdk crypto vdev, it's better add some condition
to set to zero, such as if the dev_started set to 1,dev_started not set here.


would you please help to check and fixed it?


thanks

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-09-28  9:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-28  9:35 [dpdk-dev] [Bug 93] crypto vdev create will reset the dev_started flag when one dpdk process has been up the crypto vdev bugzilla

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).