From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f68.google.com (mail-pa0-f68.google.com [209.85.220.68]) by dpdk.org (Postfix) with ESMTP id 413FF6C9E for ; Tue, 6 Sep 2016 14:05:24 +0200 (CEST) Received: by mail-pa0-f68.google.com with SMTP id ez1so10875722pab.3 for ; Tue, 06 Sep 2016 05:05:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=vSag1TDosYP1ZcvmWYT9PDn2HgGMl8rklYBjUC+zNl0=; b=qf69xNi+QhThtjAZ8s11iiqVPFHccu881wDr52xcxfE/cwcrUMdgV1ZJWrcuYXfUtE 55cPCmUvdPNhonazNc97W3dzhI2jCsgy1ri+/i/crN36I+4gB8DO/zNo3L3ZIVQqyA5D 8mhFlvC65uaUQvoHKarqPQiKao1dWiyyv0bjpKYx0NyMlyTRRrk6QVSC2GJCyrmCjrCM SdSVyS3oNksS10xNw8YmCPthd6RFv6NPfZcp7ygBl74fhH6QYR744Xze1ELouSjRVzTd vXvVvQq2V38cn22/AeX6peYZfQ2cx1J2zPDazFUvUIlGaT8K/I3hvk04n6Wha8jiYU07 /++g== 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; bh=vSag1TDosYP1ZcvmWYT9PDn2HgGMl8rklYBjUC+zNl0=; b=KRWg8zD8olCv02LaWOnTagijCyhZ8+5zQq5EIt0TL62HFCDQstiuwJyaSUs0dlr8r9 CZrqTSEqnzKYIFoijDhsNe2r9sESlDbSPQryluz2Jwvq4nQdAoTU9wb10om9CUqXORGO g7CGjtHlQaD33OE+4jYzQ7vlLfalZ+sZxNkxaamDTy82d/iME6LYiWwLaTOctmFIsQXC 3pPNtKVenGNhyO4wZ8mLZzDlEnUTJf/DSp6hiYTFGYpfOTfcHm+P1t9rFc3EWRtFaz7W xCy2906Ssf8R5UHR1fGMrgH0sjMr4cUMEACILM7RyqNXmitIBbvmouWBoqfeV9x8JInD DWYA== X-Gm-Message-State: AE9vXwOpX8h+iXzkxB+LtAG/BzaGPx3qDNK7xelUgsJoEZSMuXipgGyMvotbX95hds9l1Q== X-Received: by 10.66.135.175 with SMTP id pt15mr8614189pab.134.1473163523450; Tue, 06 Sep 2016 05:05:23 -0700 (PDT) Received: from wangweideMacBook-Pro-2.local.info ([103.29.140.58]) by smtp.gmail.com with ESMTPSA id az10sm36141715pab.5.2016.09.06.05.05.21 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 06 Sep 2016 05:05:22 -0700 (PDT) From: wang wei To: thomas.monjalon@6wind.com Cc: dev@dpdk.org Date: Tue, 6 Sep 2016 20:05:17 +0800 Message-Id: <1473163517-19404-1-git-send-email-lnykww@gmail.com> X-Mailer: git-send-email 2.7.4 (Apple Git-66) Subject: [dpdk-dev] [RFC] net/ixgbe: start rxtx after all nic config done. 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, 06 Sep 2016 12:05:24 -0000 if start rxtx before flow director config, will cause driver can't receive packets from nic. Signed-off-by: wang wei --- drivers/net/ixgbe/ixgbe_ethdev.c | 60 ++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index fb618ef..5ee51d5 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -2291,6 +2291,36 @@ ixgbe_dev_start(struct rte_eth_dev *dev) goto error; } + mask = ETH_VLAN_STRIP_MASK | ETH_VLAN_FILTER_MASK | + ETH_VLAN_EXTEND_MASK; + ixgbe_vlan_offload_set(dev, mask); + + if (dev->data->dev_conf.rxmode.mq_mode == ETH_MQ_RX_VMDQ_ONLY) { + /* Enable vlan filtering for VMDq */ + ixgbe_vmdq_vlan_hw_filter_enable(dev); + } + + /* Configure DCB hw */ + ixgbe_configure_dcb(dev); + + if (dev->data->dev_conf.fdir_conf.mode != RTE_FDIR_MODE_NONE) { + err = ixgbe_fdir_configure(dev); + if (err) + goto error; + } + + /* Restore vf rate limit */ + if (vfinfo != NULL) { + for (vf = 0; vf < dev->pci_dev->max_vfs; vf++) + for (idx = 0; idx < IXGBE_MAX_QUEUE_NUM_PER_VF; idx++) + if (vfinfo[vf].tx_rate[idx] != 0) + ixgbe_set_vf_rate_limit(dev, vf, + vfinfo[vf].tx_rate[idx], + 1 << idx); + } + + ixgbe_restore_statistics_mapping(dev); + err = ixgbe_dev_rxtx_start(dev); if (err < 0) { PMD_INIT_LOG(ERR, "Unable to start rxtx queues"); @@ -2376,36 +2406,6 @@ skip_link_setup: /* resume enabled intr since hw reset */ ixgbe_enable_intr(dev); - mask = ETH_VLAN_STRIP_MASK | ETH_VLAN_FILTER_MASK | - ETH_VLAN_EXTEND_MASK; - ixgbe_vlan_offload_set(dev, mask); - - if (dev->data->dev_conf.rxmode.mq_mode == ETH_MQ_RX_VMDQ_ONLY) { - /* Enable vlan filtering for VMDq */ - ixgbe_vmdq_vlan_hw_filter_enable(dev); - } - - /* Configure DCB hw */ - ixgbe_configure_dcb(dev); - - if (dev->data->dev_conf.fdir_conf.mode != RTE_FDIR_MODE_NONE) { - err = ixgbe_fdir_configure(dev); - if (err) - goto error; - } - - /* Restore vf rate limit */ - if (vfinfo != NULL) { - for (vf = 0; vf < dev->pci_dev->max_vfs; vf++) - for (idx = 0; idx < IXGBE_MAX_QUEUE_NUM_PER_VF; idx++) - if (vfinfo[vf].tx_rate[idx] != 0) - ixgbe_set_vf_rate_limit(dev, vf, - vfinfo[vf].tx_rate[idx], - 1 << idx); - } - - ixgbe_restore_statistics_mapping(dev); - return 0; error: -- 2.7.4 (Apple Git-66)