src/dpdk/drivers/net/cxgbe/cxgbe_main.c
int cxgbe_setup_rss(struct port_info *pi)
{
	int j, err;
	struct adapter *adapter = pi->adapter;

	dev_debug(adapter, "%s:  pi->rss_size = %u; pi->n_rx_qsets = %u\n",
		  __func__, pi->rss_size, pi->n_rx_qsets);

	if (!(pi->flags & PORT_RSS_DONE)) {
		if (adapter->flags & FULL_INIT_DONE) {
			/* Fill default values with equal distribution */
			for (j = 0; j < pi->rss_size; j++)
				pi->rss[j] = j % pi->n_rx_qsets;

			err = cxgbe_write_rss(pi, pi->rss);
			if (err)
				return err;

			err = cxgbe_write_rss_conf(pi, pi->rss_hf);
			if (err)
				return err;
			pi->flags |= PORT_RSS_DONE;
		}
	}
	return 0;
}
/**
 * setup_rss - configure RSS
 * @adapter: the adapter
 *
 * Sets up RSS to distribute packets to multiple receive queues.  We
 * configure the RSS CPU lookup table to distribute to the number of HW
 * receive queues, and the response queue lookup table to narrow that
 * down to the response queues actually configured for each port.
 * We always configure the RSS mapping for all ports since the mapping
 * table has plenty of entries.
 */
configure RSS
@adapter: the adapter

Sets up RSS to distribute packets to multiple receive queues.  We
configure the RSS CPU lookup table to distribute to the number of HW
receive queues, and the response queue lookup table to narrow that
down to the response queues actually configured for each port.
We always configure the RSS mapping for all ports since the mapping
table has plenty of entries.
configure RSS @adapter : the adapter Sets up RSS to distribute packets to multiple receive queues . We configure the RSS CPU lookup table to distribute to the number of HW receive queues and the response queue lookup table to narrow that down to the response queues actually configured for each port . We always configure the RSS mapping for all ports since the mapping table has plenty of entries .
int cxgbe_setup_rss(struct port_info *pi)
{
	int j, err;
	struct adapter *adapter = pi->adapter;
	dev_debug(adapter, "%s:  pi->rss_size = %u; pi->n_rx_qsets = %u\n",
		  __func__, pi->rss_size, pi->n_rx_qsets);
	if (!(pi->flags & PORT_RSS_DONE)) {
		if (adapter->flags & FULL_INIT_DONE) {
			for (j = 0; j < pi->rss_size; j++)
				pi->rss[j] = j % pi->n_rx_qsets;
			err = cxgbe_write_rss(pi, pi->rss);
			if (err)
				return err;
			err = cxgbe_write_rss_conf(pi, pi->rss_hf);
			if (err)
				return err;
			pi->flags |= PORT_RSS_DONE;
		}
	}
	return 0;
}
int cxgbe_setup_rss ( struct port_info * pi ) { int j , err ; struct adapter * adapter = pi -> adapter ; dev_debug ( adapter , " \n " , __func__ , pi -> rss_size , pi -> n_rx_qsets ) ; if ( ! ( pi -> flags & PORT_RSS_DONE ) ) { if ( adapter -> flags & FULL_INIT_DONE ) { for ( j = 0 ; j < pi -> rss_size ; j ++ ) pi -> rss [ j ] = j % pi -> n_rx_qsets ; err = cxgbe_write_rss ( pi , pi -> rss ) ; if ( err ) return err ; err = cxgbe_write_rss_conf ( pi , pi -> rss_hf ) ; if ( err ) return err ; pi -> flags |= PORT_RSS_DONE ; } } return 0 ; }
setup_rss - configure RSS
 @adapter: the adapter
setup_rss - configure RSS @adapter : the adapter
/* Fill default values with equal distribution */