From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-we0-f171.google.com (mail-we0-f171.google.com [74.125.82.171]) by dpdk.org (Postfix) with ESMTP id 5CB86568F for ; Fri, 20 Mar 2015 22:58:43 +0100 (CET) Received: by wetk59 with SMTP id k59so92017692wet.3 for ; Fri, 20 Mar 2015 14:58:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=QzkP8YQTCd56ySlKC7IYI/Wq0w+3Sb7c2gU3CkVW79Q=; b=Nfcvp6wq0z3G19YkwIsNdDPb/7NTJCHZa3/mWTiX524Zi+6UPKLHlrlGga39k1Ya7o R5z/jCDfG1g5GBa3wmsA72/R2MQDx7P3/YwY+58qnLH2dgJsagpW9l9eQ1VhIzdjFj++ 3gojdJpi0YMV9kcFrjrF2vFiGCwlr2bV12ZMp6MnfQqcUVyEsGN7q1uHsHWdFOci5xk6 VTM3rNjw69jdqw7G/E/H8DIA0WHoe4d8xWK8nAGFx2WaOoOCyF5m1tI81VxbVSWuLKzT 3/UyprOQgztVEdPU/K7Yt8APt72Pgvyvncwk4aIhLT+8KDWr4a/yUnsR2IcdaZQjmYPd EVDA== X-Gm-Message-State: ALoCoQmP5eOVO0O4CeYEdGwijj3ahbi1MvZS6dqKmao+xjXt5qWX5jmIGTAGoPI4bIwxrCt2UvQ4 X-Received: by 10.195.12.167 with SMTP id er7mr167550827wjd.54.1426888723280; Fri, 20 Mar 2015 14:58:43 -0700 (PDT) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id hj10sm8036974wjc.48.2015.03.20.14.58.41 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Mar 2015 14:58:42 -0700 (PDT) From: Thomas Monjalon To: Ouyang Changchun Date: Fri, 20 Mar 2015 22:58:01 +0100 Message-ID: <2258736.A24vDFQUbz@xps13> Organization: 6WIND User-Agent: KMail/4.14.4 (Linux/3.18.4-1-ARCH; KDE/4.14.4; x86_64; ; ) In-Reply-To: <1426729537-24892-1-git-send-email-changchun.ouyang@intel.com> References: <1426729537-24892-1-git-send-email-changchun.ouyang@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH] virtio: Fix crash issue for secondary process X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Mar 2015 21:58:43 -0000 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 > --- > 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? > 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);