From owner-svn-src-head@freebsd.org Fri Jul 17 06:46:19 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB4DA9A4D51; Fri, 17 Jul 2015 06:46:19 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A8E0712A9; Fri, 17 Jul 2015 06:46:19 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6H6kJ20031542; Fri, 17 Jul 2015 06:46:19 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6H6kJDs031539; Fri, 17 Jul 2015 06:46:19 GMT (envelope-from np@FreeBSD.org) Message-Id: <201507170646.t6H6kJDs031539@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Fri, 17 Jul 2015 06:46:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285648 - in head/sys/dev/cxgbe: . common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2015 06:46:20 -0000 Author: np Date: Fri Jul 17 06:46:18 2015 New Revision: 285648 URL: https://svnweb.freebsd.org/changeset/base/285648 Log: 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). MFC after: 1 month Modified: head/sys/dev/cxgbe/adapter.h head/sys/dev/cxgbe/common/t4_hw.c Modified: head/sys/dev/cxgbe/adapter.h ============================================================================== --- head/sys/dev/cxgbe/adapter.h Fri Jul 17 06:34:46 2015 (r285647) +++ head/sys/dev/cxgbe/adapter.h Fri Jul 17 06:46:18 2015 (r285648) @@ -233,6 +233,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: head/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- head/sys/dev/cxgbe/common/t4_hw.c Fri Jul 17 06:34:46 2015 (r285647) +++ head/sys/dev/cxgbe/common/t4_hw.c Fri Jul 17 06:46:18 2015 (r285648) @@ -5699,6 +5699,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)); @@ -5737,6 +5738,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, ¶m, &val); + if (ret) + p->rss_base = 0xffff; + else { + /* MPASS((val >> 16) == rss_size); */ + p->rss_base = val & 0xffff; + } + return 0; }