Author: np
Date: Tue Aug 18 19:04:55 2015
New Revision: 286897
URL: https://svnweb.freebsd.org/changeset/base/286897

Log:
  MFC r285648:
  
  cxgbe(4): Ask the firmware for the start of the RSS slice for a port and
  save it for later.  This enables direct manipulation of the indirection
  tables (although the stock driver doesn't do that right now).

Modified:
  stable/10/sys/dev/cxgbe/adapter.h
  stable/10/sys/dev/cxgbe/common/t4_hw.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/cxgbe/adapter.h
==============================================================================
--- stable/10/sys/dev/cxgbe/adapter.h   Tue Aug 18 19:03:59 2015        
(r286896)
+++ stable/10/sys/dev/cxgbe/adapter.h   Tue Aug 18 19:04:55 2015        
(r286897)
@@ -227,6 +227,7 @@ struct port_info {
        uint16_t viid;
        int16_t  xact_addr_filt;/* index of exact MAC address filter */
        uint16_t rss_size;      /* size of VI's RSS table slice */
+       uint16_t rss_base;      /* start of VI's RSS table slice */
        uint8_t  lport;         /* associated offload logical port */
        int8_t   mdio_addr;
        uint8_t  port_type;

Modified: stable/10/sys/dev/cxgbe/common/t4_hw.c
==============================================================================
--- stable/10/sys/dev/cxgbe/common/t4_hw.c      Tue Aug 18 19:03:59 2015        
(r286896)
+++ stable/10/sys/dev/cxgbe/common/t4_hw.c      Tue Aug 18 19:04:55 2015        
(r286897)
@@ -5696,6 +5696,7 @@ int __devinit t4_port_init(struct port_i
        struct fw_port_cmd c;
        u16 rss_size;
        adapter_t *adap = p->adapter;
+       u32 param, val;
 
        memset(&c, 0, sizeof(c));
 
@@ -5734,6 +5735,17 @@ int __devinit t4_port_init(struct port_i
 
        init_link_config(&p->link_cfg, ntohs(c.u.info.pcap));
 
+       param = V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DEV) |
+           V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DEV_RSSINFO) |
+           V_FW_PARAMS_PARAM_YZ(p->viid);
+       ret = t4_query_params(adap, mbox, pf, vf, 1, &param, &val);
+       if (ret)
+               p->rss_base = 0xffff;
+       else {
+               /* MPASS((val >> 16) == rss_size); */
+               p->rss_base = val & 0xffff;
+       }
+
        return 0;
 }
 
_______________________________________________
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"

Reply via email to