From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f44.google.com (mail-pg0-f44.google.com [74.125.83.44]) by dpdk.org (Postfix) with ESMTP id D1B6056A1 for ; Fri, 1 Sep 2017 14:31:14 +0200 (CEST) Received: by mail-pg0-f44.google.com with SMTP id b8so160291pgn.5 for ; Fri, 01 Sep 2017 05:31:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=bi5mdyFuSg8LMTuW8NjLOggYBfb5Dg3kJl6weO9F20E=; b=D6h2IAzbNZLJltDPYu3KozUm6pVsy714z/eGK2b7K0yghs6TZMWLJ+dzewsL89ran1 jf4sQFMdA0TfvyBYAWeGsL74N79n6Ct4Q/y2r1ZTYExAeHAnA4CuCxmGICWR8PhRtZ4r 9dueElBrwMmF8B/5oL4BTavYN8DcSaihojWq9DJ07bKhhyG3h6KIH1OzrRqPUzE3niPm uQTUJGo9PeuZ+ZHrHXQdndTlsLL+EsdTfLMv9M0g12TeOUjxTX9/j1N9B/rTX31btbdX r/J6BrDDuyywYY0O7lY1CwqjEGWtYk2I5AYSgs5N2bgNSj4YxFayD0vLX0yhKnSarGzl uo0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=bi5mdyFuSg8LMTuW8NjLOggYBfb5Dg3kJl6weO9F20E=; b=UYBGDqa7ixSAgym/v8WhiGsZqIGIqrl9Mft4FY9QafzqNqIpsuB1fjBmBmyaZ+G5vK K7eZJuiKEoDlkKOEaji4yeHTQIFH03ilzoA+EkIcpdbHd/oI9JdHWSDII9bzFtcY0C5T c/ZFNHvt/ca3IP+flQ9b5dbW3s1RSQQy1Ua99zVG4YZrcg+nA7IeVx5EUzYkKVB7454J +Nx1OV8xUyqykVJRCTdBhs6TA0nw1VkYEnkNRw3DEGH4DdZDdo9E82EwvF7wCUBSlA6A f/4cGVSCSQZLGiQry+0ZPqGqUNcjrX7L+NqpS3f9TyCIZaEPO171/VW4Qkn3It4AN46c 1quA== X-Gm-Message-State: AHPjjUjAMQELZheJ4qZt8iDnVGQ59U8P2Va4ElQWAXtvessNPK0Q0AEU POpTQluznJhnHDej X-Google-Smtp-Source: ADKCNb4kYDfgFHvJLq9eAHwuauX20krsPyCzJkofabmX2rhe4mDkb6wdoFZIODUdGaav9b0mA2ESsA== X-Received: by 10.84.194.228 with SMTP id h91mr2247711pld.437.1504269073839; Fri, 01 Sep 2017 05:31:13 -0700 (PDT) Received: from yliu-home ([45.63.61.64]) by smtp.gmail.com with ESMTPSA id q85sm44024pfa.177.2017.09.01.05.31.11 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 01 Sep 2017 05:31:12 -0700 (PDT) Date: Fri, 1 Sep 2017 20:31:06 +0800 From: Yuanhan Liu To: Olivier MATZ Cc: dev@dpdk.org, maxime.coquelin@redhat.com, stephen@networkplumber.org, stable@dpdk.org Message-ID: <20170901123106.GW9736@yliu-home> References: <20170831134015.1383-1-olivier.matz@6wind.com> <20170831134015.1383-8-olivier.matz@6wind.com> <20170901091916.GT9736@yliu-home> <20170901095216.kqx7lwdiktq7y5zs@neon> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170901095216.kqx7lwdiktq7y5zs@neon> User-Agent: Mutt/1.5.24 (2015-08-30) Subject: Re: [dpdk-dev] [PATCH 7/9] net/virtio: rationalize setting of Rx/Tx handlers X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Sep 2017 12:31:15 -0000 On Fri, Sep 01, 2017 at 11:52:17AM +0200, Olivier MATZ wrote: > > > @@ -1534,7 +1554,6 @@ eth_virtio_dev_init(struct rte_eth_dev *eth_dev) > > > RTE_BUILD_BUG_ON(RTE_PKTMBUF_HEADROOM < sizeof(struct virtio_net_hdr_mrg_rxbuf)); > > > > > > eth_dev->dev_ops = &virtio_eth_dev_ops; > > > - eth_dev->tx_pkt_burst = &virtio_xmit_pkts; > > > > > > if (rte_eal_process_type() == RTE_PROC_SECONDARY) { > > > if (!hw->virtio_user_dev) { > > > @@ -1544,12 +1563,8 @@ eth_virtio_dev_init(struct rte_eth_dev *eth_dev) > > > } > > > > > > virtio_set_vtpci_ops(hw); > > > - if (hw->use_simple_rxtx) { > > > - eth_dev->tx_pkt_burst = virtio_xmit_pkts_simple; > > > - eth_dev->rx_pkt_burst = virtio_recv_pkts_vec; > > > - } else { > > > - rx_func_get(eth_dev); > > > - } > > > + set_rxtx_funcs(eth_dev); > > > > No need to invoke it here? > > I wanted to stay consistent with previous code. > > I'm not very used to work with secondary processes, so I'm not 100% it > is ok, but in my understanding, in that case the configuration is done > first by the primary process, and the secondary the pointers to the > rx/tx funcs. I suppose their value can be different than primary ones. It probably needs some testing, but I think it should be okay, because the rx/tx funcs will always be updated at dev_start in this patch. --yliu