* 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
| 1904 | * table has plenty of entries. |
| 1905 | */ |
| 1906 | int 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. |
no test coverage detected