From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 39F115F28 for ; Thu, 8 Mar 2018 14:34:34 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Mar 2018 05:34:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,441,1515484800"; d="scan'208";a="180993142" Received: from fyigit-mobl.ger.corp.intel.com (HELO [10.237.221.62]) ([10.237.221.62]) by orsmga004.jf.intel.com with ESMTP; 08 Mar 2018 05:34:32 -0800 To: Rahul Lakkireddy , dev@dpdk.org Cc: kumaras@chelsio.com, surendra@chelsio.com, nirranjan@chelsio.com, indranil@chelsio.com References: From: Ferruh Yigit Message-ID: <53646d44-eed1-e3f5-648a-cdd4fd48412b@intel.com> Date: Thu, 8 Mar 2018 13:34:31 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v2 3/7] cxgbe: add support to update RSS hash configuration and key X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 13:34:35 -0000 On 2/28/2018 6:04 PM, Rahul Lakkireddy wrote: > From: Kumar Sanghvi > > Add firmware API for updating RSS hash configuration and key. Move > RSS hash configuration from cxgb4_write_rss() to a separate function > cxgbe_write_rss_conf(). > > Also, rename cxgb4_write_rss() to cxgbe_write_rss() for consistency. > > Original work by Surendra Mobiya > > Signed-off-by: Kumar Sanghvi > Signed-off-by: Rahul Lakkireddy <...> > @@ -985,6 +1016,7 @@ static const struct eth_dev_ops cxgbe_eth_dev_ops = { > .get_eeprom = cxgbe_get_eeprom, > .set_eeprom = cxgbe_set_eeprom, > .get_reg = cxgbe_get_regs, > + .rss_hash_update = cxgbe_dev_rss_hash_update, Also in cxgbe_dev_info_get(), rte_eth_dev_info->flow_type_rss_offloads should be updated with supported RSS hash functions. I don't see any usage of "flow_type_rss_offloads" in sample apps except testpmd is using it to print the log, but that is the way to notify applications about support. You don't need to send a new version of patchset for this, please send an incremental patch and I can squash it into this set. <...> > +int cxgbe_write_rss_conf(const struct port_info *pi, uint64_t rss_hf) > +{ > + struct adapter *adapter = pi->adapter; > + const struct sge_eth_rxq *rxq; > + u64 flags = 0; > + u16 rss; > + int err; > + > + /* Should never be called before setting up sge eth rx queues */ > + if (!(adapter->flags & FULL_INIT_DONE)) { > + dev_err(adap, "%s No RXQs available on port %d\n", > + __func__, pi->port_id); > + return -EINVAL; > + } > + > + if (rss_hf & ETH_RSS_IPV4) > + flags |= F_FW_RSS_VI_CONFIG_CMD_IP4TWOTUPEN; > + > + if (rss_hf & ETH_RSS_NONFRAG_IPV4_TCP) > + flags |= F_FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN; > + > + if (rss_hf & ETH_RSS_NONFRAG_IPV4_UDP) > + flags |= F_FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN | > + F_FW_RSS_VI_CONFIG_CMD_UDPEN; > + > + if (rss_hf & ETH_RSS_IPV6) > + flags |= F_FW_RSS_VI_CONFIG_CMD_IP6TWOTUPEN; > + > + if (rss_hf & ETH_RSS_NONFRAG_IPV6_TCP) > + flags |= F_FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN; > + > + if (rss_hf & ETH_RSS_NONFRAG_IPV6_UDP) > + flags |= F_FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN | > + F_FW_RSS_VI_CONFIG_CMD_UDPEN; > + > + rxq = &adapter->sge.ethrxq[pi->first_qset]; > + rss = rxq[0].rspq.abs_id; What if driver gets a rss_hf that is not supported, will the API report back an error to the application?