From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 4B1A3376E for ; Tue, 8 Mar 2016 09:49:51 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP; 08 Mar 2016 00:49:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,556,1449561600"; d="scan'208";a="760080466" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga003.jf.intel.com with ESMTP; 08 Mar 2016 00:49:49 -0800 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id u288nlMG006416; Tue, 8 Mar 2016 16:49:47 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id u288nhpN022695; Tue, 8 Mar 2016 16:49:45 +0800 Received: (from zhetao@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id u288nhme022691; Tue, 8 Mar 2016 16:49:43 +0800 From: Zhe Tao To: dev@dpdk.org Date: Tue, 8 Mar 2016 16:49:41 +0800 Message-Id: <1457426981-22571-1-git-send-email-zhe.tao@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1456672050-21115-1-git-send-email-zhe.tao@intel.com> References: <1456672050-21115-1-git-send-email-zhe.tao@intel.com> Subject: [dpdk-dev] [PATCH v2] ixgbe: fix ixgbevf RX/TX function assignment 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: Tue, 08 Mar 2016 08:49:51 -0000 For the secondary process of DPDK to initialize ixgbevf, it will always use the simple RX function or LRO RX function, and this behavior is not the same RX/TX function selection logic as it is for the primary process, so use the ixgbe_set_tx_function and ixgbe_set_rx_function to select the RX/TX function when secondary process call the init function for eth dev. Fixes: abf7275bbaa2918 (ixgbe: move to drivers/net/) V2:add fixes line Signed-off-by: Zhe Tao --- drivers/net/ixgbe/ixgbe_ethdev.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index 3e6fe86..0f9d048 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -1278,8 +1278,21 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev) * has already done this work. Only check we don't need a different * RX function */ if (rte_eal_process_type() != RTE_PROC_PRIMARY){ - if (eth_dev->data->scattered_rx) - eth_dev->rx_pkt_burst = ixgbe_recv_pkts_lro_single_alloc; + struct ixgbe_tx_queue *txq; + /* TX queue function in primary, set by last queue initialized + * Tx queue may not initialized by primary process + */ + if (eth_dev->data->tx_queues) { + txq = eth_dev->data->tx_queues[eth_dev->data->nb_tx_queues-1]; + ixgbe_set_tx_function(eth_dev, txq); + } else { + /* Use default TX function if we get here */ + PMD_INIT_LOG(NOTICE, "No TX queues configured yet. " + "Using default TX function."); + } + + ixgbe_set_rx_function(eth_dev); + return 0; } -- 2.1.4