DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] igb_ethdev.c: complete switches for i211 NC
@ 2014-09-04  8:35 Sergey Mironov
  2014-09-10  1:28 ` Zhang, Helin
  0 siblings, 1 reply; 3+ messages in thread
From: Sergey Mironov @ 2014-09-04  8:35 UTC (permalink / raw)
  To: dev

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?
---
 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;
-- 
1.8.4.3

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] igb_ethdev.c: complete switches for i211 NC
  2014-09-04  8:35 [dpdk-dev] [PATCH] igb_ethdev.c: complete switches for i211 NC Sergey Mironov
@ 2014-09-10  1:28 ` Zhang, Helin
  2014-09-24 17:38   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Zhang, Helin @ 2014-09-10  1:28 UTC (permalink / raw)
  To: Sergey Mironov, dev



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Sergey Mironov
> Sent: Thursday, September 4, 2014 4:35 PM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH] igb_ethdev.c: complete switches for i211 NC
> 
> 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?
> ---
>  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;
> --
> 1.8.4.3


Reviewed-by: Helin Zhang <helin.zhang@intel.com>

Really good to have this patch of supporting i211! Thank you very much!

Regards,
Helin

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] igb_ethdev.c: complete switches for i211 NC
  2014-09-10  1:28 ` Zhang, Helin
@ 2014-09-24 17:38   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2014-09-24 17:38 UTC (permalink / raw)
  To: Sergey Mironov; +Cc: dev

2014-09-10 01:28, Zhang, Helin:
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Sergey Mironov
> > 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?

The funny thing is that the file igb_rxtx.c seems to already support i211,
but not igb_ethdev.c. Thanks for fixing that.

> >  	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)) {

Wrong indent here.

> Reviewed-by: Helin Zhang <helin.zhang@intel.com>
> 
> Really good to have this patch of supporting i211! Thank you very much!

Acked and applied with indent fix.

Thanks
-- 
Thomas

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-09-24 17:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-04  8:35 [dpdk-dev] [PATCH] igb_ethdev.c: complete switches for i211 NC Sergey Mironov
2014-09-10  1:28 ` Zhang, Helin
2014-09-24 17:38   ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).