MCPcopy Create free account
hub / github.com/F-Stack/f-stack / cxgbe_setup_rss

Function cxgbe_setup_rss

dpdk/drivers/net/cxgbe/cxgbe_main.c:1906–1931  ·  view source on GitHub ↗

* 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 mapp

Source from the content-addressed store, hash-verified

1904 * table has plenty of entries.
1905 */
1906int cxgbe_setup_rss(struct port_info *pi)
1907{
1908 int j, err;
1909 struct adapter *adapter = pi->adapter;
1910
1911 dev_debug(adapter, "%s: pi->rss_size = %u; pi->n_rx_qsets = %u\n",
1912 __func__, pi->rss_size, pi->n_rx_qsets);
1913
1914 if (!(pi->flags & PORT_RSS_DONE)) {
1915 if (adapter->flags & FULL_INIT_DONE) {
1916 /* Fill default values with equal distribution */
1917 for (j = 0; j < pi->rss_size; j++)
1918 pi->rss[j] = j % pi->n_rx_qsets;
1919
1920 err = cxgbe_write_rss(pi, pi->rss);
1921 if (err)
1922 return err;
1923
1924 err = cxgbe_write_rss_conf(pi, pi->rss_hf);
1925 if (err)
1926 return err;
1927 pi->flags |= PORT_RSS_DONE;
1928 }
1929 }
1930 return 0;
1931}
1932
1933/*
1934 * Enable NAPI scheduling and interrupt generation for all Rx queues.

Callers 1

cxgbe_dev_startFunction · 0.85

Calls 2

cxgbe_write_rssFunction · 0.85
cxgbe_write_rss_confFunction · 0.85

Tested by

no test coverage detected