Author: np
Date: Thu Feb  6 03:30:12 2014
New Revision: 261537
URL: http://svnweb.freebsd.org/changeset/base/261537

Log:
  cxgbe(4): Use the rx channel map (instead of the tx channel map) as the
  congestion channel map.
  
  MFC after:    1 week

Modified:
  head/sys/dev/cxgbe/adapter.h
  head/sys/dev/cxgbe/common/t4_hw.c
  head/sys/dev/cxgbe/t4_sge.c

Modified: head/sys/dev/cxgbe/adapter.h
==============================================================================
--- head/sys/dev/cxgbe/adapter.h        Thu Feb  6 03:21:43 2014        
(r261536)
+++ head/sys/dev/cxgbe/adapter.h        Thu Feb  6 03:30:12 2014        
(r261537)
@@ -210,6 +210,7 @@ struct port_info {
        uint8_t  mod_type;
        uint8_t  port_id;
        uint8_t  tx_chan;
+       uint8_t  rx_chan_map;   /* rx MPS channel bitmap */
 
        /* These need to be int as they are used in sysctl */
        int ntxq;       /* # of tx queues */

Modified: head/sys/dev/cxgbe/common/t4_hw.c
==============================================================================
--- head/sys/dev/cxgbe/common/t4_hw.c   Thu Feb  6 03:21:43 2014        
(r261536)
+++ head/sys/dev/cxgbe/common/t4_hw.c   Thu Feb  6 03:30:12 2014        
(r261537)
@@ -5650,6 +5650,7 @@ int __devinit t4_port_init(struct port_i
 
        p->viid = ret;
        p->tx_chan = j;
+       p->rx_chan_map = get_mps_bg_map(adap, j);
        p->lport = j;
        p->rss_size = rss_size;
        t4_os_set_hw_addr(adap, p->port_id, addr);

Modified: head/sys/dev/cxgbe/t4_sge.c
==============================================================================
--- head/sys/dev/cxgbe/t4_sge.c Thu Feb  6 03:21:43 2014        (r261536)
+++ head/sys/dev/cxgbe/t4_sge.c Thu Feb  6 03:30:12 2014        (r261537)
@@ -2474,7 +2474,7 @@ tnl_cong(struct port_info *pi)
        else if (cong_drop == 1)
                return (0);
        else
-               return (1 << pi->tx_chan);
+               return (pi->rx_chan_map);
 }
 
 static int
@@ -2581,7 +2581,7 @@ alloc_ofld_rxq(struct port_info *pi, str
        char name[16];
 
        rc = alloc_iq_fl(pi, &ofld_rxq->iq, &ofld_rxq->fl, intr_idx,
-           1 << pi->tx_chan);
+           pi->rx_chan_map);
        if (rc != 0)
                return (rc);
 
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to