aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe
diff options
context:
space:
mode:
authorYi Zou <yi.zou@intel.com>2009-05-17 08:34:14 -0400
committerDavid S. Miller <davem@davemloft.net>2009-05-18 00:04:10 -0400
commit29ebf6f8c8a99bbda053f1fbdff0570cc5d866b3 (patch)
tree302a9150ebbbdef0b5d1d99cb67ad17a26f939ce /drivers/net/ixgbe
parent0331a832a88d4bf34baf289b82e2829763230143 (diff)
ixgbe: Enable FCoE redirection table feature in 82599
Enable using FCoE redirection table feature in 82599. The FCoE redirection table has maximum of eight entries, corresponding to maximum of eight receive queues to be used for distributing incoming FCoE packets. This patch sets up the FCoE redirection table when multiple receive queues are available for FCoE. Signed-off-by: Yi Zou <yi.zou@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ixgbe')
-rw-r--r--drivers/net/ixgbe/ixgbe_fcoe.c28
1 files changed, 24 insertions, 4 deletions
diff --git a/drivers/net/ixgbe/ixgbe_fcoe.c b/drivers/net/ixgbe/ixgbe_fcoe.c
index a11c6207b748..d5939de8ba28 100644
--- a/drivers/net/ixgbe/ixgbe_fcoe.c
+++ b/drivers/net/ixgbe/ixgbe_fcoe.c
@@ -482,8 +482,10 @@ int ixgbe_fso(struct ixgbe_adapter *adapter,
482 */ 482 */
483void ixgbe_configure_fcoe(struct ixgbe_adapter *adapter) 483void ixgbe_configure_fcoe(struct ixgbe_adapter *adapter)
484{ 484{
485 int i, fcoe_q, fcoe_i;
485 struct ixgbe_hw *hw = &adapter->hw; 486 struct ixgbe_hw *hw = &adapter->hw;
486 struct ixgbe_fcoe *fcoe = &adapter->fcoe; 487 struct ixgbe_fcoe *fcoe = &adapter->fcoe;
488 struct ixgbe_ring_feature *f = &adapter->ring_feature[RING_F_FCOE];
487 489
488 /* create the pool for ddp if not created yet */ 490 /* create the pool for ddp if not created yet */
489 if (!fcoe->pool) { 491 if (!fcoe->pool) {
@@ -497,12 +499,30 @@ void ixgbe_configure_fcoe(struct ixgbe_adapter *adapter)
497 499
498 spin_lock_init(&fcoe->lock); 500 spin_lock_init(&fcoe->lock);
499 } 501 }
500 /* L2 filter for FCoE: default to queue 0 */ 502
503 /* Enable L2 eth type filter for FCoE */
501 IXGBE_WRITE_REG(hw, IXGBE_ETQF(IXGBE_ETQF_FILTER_FCOE), 504 IXGBE_WRITE_REG(hw, IXGBE_ETQF(IXGBE_ETQF_FILTER_FCOE),
502 (ETH_P_FCOE | IXGBE_ETQF_FCOE | IXGBE_ETQF_FILTER_EN)); 505 (ETH_P_FCOE | IXGBE_ETQF_FCOE | IXGBE_ETQF_FILTER_EN));
503 IXGBE_WRITE_REG(hw, IXGBE_FCRECTL, 0); 506 if (adapter->ring_feature[RING_F_FCOE].indices) {
504 IXGBE_WRITE_REG(hw, IXGBE_ETQS(IXGBE_ETQF_FILTER_FCOE), 507 /* Use multiple rx queues for FCoE by redirection table */
505 IXGBE_ETQS_QUEUE_EN); 508 for (i = 0; i < IXGBE_FCRETA_SIZE; i++) {
509 fcoe_i = f->mask + i % f->indices;
510 fcoe_i &= IXGBE_FCRETA_ENTRY_MASK;
511 fcoe_q = adapter->rx_ring[fcoe_i].reg_idx;
512 IXGBE_WRITE_REG(hw, IXGBE_FCRETA(i), fcoe_q);
513 }
514 IXGBE_WRITE_REG(hw, IXGBE_FCRECTL, IXGBE_FCRECTL_ENA);
515 IXGBE_WRITE_REG(hw, IXGBE_ETQS(IXGBE_ETQF_FILTER_FCOE), 0);
516 } else {
517 /* Use single rx queue for FCoE */
518 fcoe_i = f->mask;
519 fcoe_q = adapter->rx_ring[fcoe_i].reg_idx;
520 IXGBE_WRITE_REG(hw, IXGBE_FCRECTL, 0);
521 IXGBE_WRITE_REG(hw, IXGBE_ETQS(IXGBE_ETQF_FILTER_FCOE),
522 IXGBE_ETQS_QUEUE_EN |
523 (fcoe_q << IXGBE_ETQS_RX_QUEUE_SHIFT));
524 }
525
506 IXGBE_WRITE_REG(hw, IXGBE_FCRXCTRL, 526 IXGBE_WRITE_REG(hw, IXGBE_FCRXCTRL,
507 IXGBE_FCRXCTRL_FCOELLI | 527 IXGBE_FCRXCTRL_FCOELLI |
508 IXGBE_FCRXCTRL_FCCRCBO | 528 IXGBE_FCRXCTRL_FCCRCBO |