From patchwork Thu Sep 4 08:35:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Mironov X-Patchwork-Id: 4 Return-Path: Received: from mail-la0-f43.google.com (mail-la0-f43.google.com [209.85.215.43]) by dpdk.org (Postfix) with ESMTP id 72A79B373 for ; Thu, 4 Sep 2014 10:30:47 +0200 (CEST) Received: by mail-la0-f43.google.com with SMTP id gi9so604800lab.16 for ; Thu, 04 Sep 2014 01:35:27 -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=+5oMvqcqTXMCuwTWd2s2h1YlD4830k0OYwo9u23QcCE=; b=ME+rUKrcSSHdL2WiGLJAuIRzCk88WzcniiKeTxlfd7/YI6z/SpoZeqiq44f77Go0oE y0DLk0STGr9/dO8yXvCl6uwbvcB2nBI3FWrv2sliYprtxQ2Noa7LN712maX5JUjoOwng VLj1VoIpr6Yy36NOcxalE111HFj4OM+H7HSE1TVAKiPtrkU1zj1vHLIC9BVEFeK6g2Tw mYBiBEctXkbl8ZFnyRJQQ10GV9hAdVmH6r6lFPKrqt+NNZ9zVMCdqzfC2RFFXmf3lfr6 Ke89SMzzVYg703VHRTCLG0TjL1GxykIDhncew8L/31V/E//EVmKcBNJp2RpFfAtXNb7f 3lzA== X-Received: by 10.112.149.36 with SMTP id tx4mr2759252lbb.79.1409819727306; Thu, 04 Sep 2014 01:35:27 -0700 (PDT) Received: from ww.ecotelecom.ru ([91.224.132.27]) by mx.google.com with ESMTPSA id s7sm297882lby.45.2014.09.04.01.35.26 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Sep 2014 01:35:26 -0700 (PDT) From: Sergey Mironov To: dev@dpdk.org Date: Thu, 4 Sep 2014 12:35:11 +0400 Message-Id: <1409819711-18718-1-git-send-email-grrwlf@gmail.com> X-Mailer: git-send-email 1.8.4.3 Subject: [dpdk-dev] [PATCH] igb_ethdev.c: complete switches for i211 NC 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: Thu, 04 Sep 2014 08:30:47 -0000 Hi! I have got an update for my "i212 problem". First of all, I found that I have made a mistake. My controller is named i211, not i212 :) Next, i211 controller is controlled by the lib_pmd_e1000 driver. Unfortunately, looks like it's support is pure. For example, igb_ethdev.c contains function eth_igb_infos_get() which should set number of tx/rx queues supported by the hardware. It contains huge [switch] but there is no i211 case! That is why I see zeros every time I try to start this NC. Also, there are few other places which mention i210, but not mention i211. I've attached a patch which adds necessary i211 support, but I didn't check it enough to say it is totally correct. For now I see that it just able to send and receive some packets. Could you please review/correct it? Reviewed-by: Helin Zhang --- lib/librte_pmd_e1000/igb_ethdev.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/librte_pmd_e1000/igb_ethdev.c b/lib/librte_pmd_e1000/igb_ethdev.c index f93a460..23e638d 100644 --- a/lib/librte_pmd_e1000/igb_ethdev.c +++ b/lib/librte_pmd_e1000/igb_ethdev.c @@ -689,7 +689,8 @@ eth_igb_start(struct rte_eth_dev *dev) * value of Write-Back Threshold registers. */ if ((hw->mac.type == e1000_82576) || (hw->mac.type == e1000_82580) || - (hw->mac.type == e1000_i350) || (hw->mac.type == e1000_i210)) { + (hw->mac.type == e1000_i350) || (hw->mac.type == e1000_i210) || + (hw->mac.type == e1000_i211)) { uint32_t ivar; /* Enable all RX & TX queues in the IVAR registers */ @@ -837,7 +838,7 @@ igb_get_rx_buffer_size(struct e1000_hw *hw) rx_buf_size = (E1000_READ_REG(hw, E1000_RXPBS) & 0xf); rx_buf_size = (uint32_t) e1000_rxpbs_adjust_82580(rx_buf_size); rx_buf_size = (rx_buf_size << 10); - } else if (hw->mac.type == e1000_i210) { + } else if (hw->mac.type == e1000_i210 || hw->mac.type == e1000_i211) { rx_buf_size = (E1000_READ_REG(hw, E1000_RXPBS) & 0x3f) << 10; } else { rx_buf_size = (E1000_READ_REG(hw, E1000_PBA) & 0xffff) << 10; @@ -1179,6 +1180,12 @@ eth_igb_infos_get(struct rte_eth_dev *dev, dev_info->max_vmdq_pools = 0; break; + case e1000_i211: + dev_info->max_rx_queues = 2; + dev_info->max_tx_queues = 2; + dev_info->max_vmdq_pools = 0; + break; + case e1000_vfadapt: dev_info->max_rx_queues = 2; dev_info->max_tx_queues = 2;