DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Xie, Huawei" <huawei.xie@intel.com>
To: Thomas Monjalon <thomas.monjalon@6wind.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] virtio: Fix crash issue for secondary process
Date: Mon, 23 Mar 2015 14:33:13 +0000	[thread overview]
Message-ID: <C37D651A908B024F974696C65296B57B0F3F1EE6@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <2258736.A24vDFQUbz@xps13>

On 3/21/2015 5:59 AM, Thomas Monjalon wrote:

2015-03-19 09:45, Ouyang Changchun:


It definitely needs Rx function even in the case of secondary process, so put
the assignment a bit earlier to make sure of it.

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com><mailto:changchun.ouyang@intel.com>
---
 lib/librte_pmd_virtio/virtio_ethdev.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/lib/librte_pmd_virtio/virtio_ethdev.c b/lib/librte_pmd_virtio/virtio_ethdev.c
index 603be2d..ad24cf2 100644
--- a/lib/librte_pmd_virtio/virtio_ethdev.c
+++ b/lib/librte_pmd_virtio/virtio_ethdev.c
@@ -1113,6 +1113,7 @@ eth_virtio_dev_init(struct rte_eth_dev *eth_dev)
        RTE_BUILD_BUG_ON(RTE_PKTMBUF_HEADROOM < sizeof(struct virtio_net_hdr));

        eth_dev->dev_ops = &virtio_eth_dev_ops;
+       eth_dev->rx_pkt_burst = &virtio_recv_pkts;
        eth_dev->tx_pkt_burst = &virtio_xmit_pkts;

        if (rte_eal_process_type() == RTE_PROC_SECONDARY)
@@ -1148,10 +1149,8 @@ eth_virtio_dev_init(struct rte_eth_dev *eth_dev)
        if (vtpci_with_feature(hw, VIRTIO_NET_F_MRG_RXBUF)) {
                eth_dev->rx_pkt_burst = &virtio_recv_mergeable_pkts;



Why the mergeable buffers case is not handled for secondary processes?

Forgot to CC my comment to dpdk.org.
There are many parts of eth_dev for the secondary process still

uninitialized, even like eth_dev->data->mac_addrs isn't allocated., also

like mergeable, feature, etc.

Secondary process will not work unless they never touch those fields.



Prefer we have a clean fix. Customer could apply that one line of fix if

they need this urgently.

I am wondering whether other PMDS have the same issue for the second process.





                hw->vtnet_hdr_size = sizeof(struct virtio_net_hdr_mrg_rxbuf);
-       } else {
-               eth_dev->rx_pkt_burst = &virtio_recv_pkts;
+       } else
                hw->vtnet_hdr_size = sizeof(struct virtio_net_hdr);
-       }

        /* Copy the permanent MAC address to: virtio_hw */
        virtio_get_hwaddr(hw);

  reply	other threads:[~2015-03-23 14:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-19  1:45 Ouyang Changchun
2015-03-20 21:58 ` Thomas Monjalon
2015-03-23 14:33   ` Xie, Huawei [this message]
2015-03-26  1:27     ` Xie, Huawei
2015-03-27  6:35 ` [dpdk-dev] [PATCH v2] " Ouyang Changchun
2015-03-27  8:57   ` Thomas Monjalon
2015-03-27 13:23   ` [dpdk-dev] [PATCH v3] " Ouyang Changchun
2015-03-30 20:09     ` Thomas Monjalon

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=C37D651A908B024F974696C65296B57B0F3F1EE6@SHSMSX101.ccr.corp.intel.com \
    --to=huawei.xie@intel.com \
    --cc=dev@dpdk.org \
    --cc=thomas.monjalon@6wind.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).