mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-11-07 04:36:52 -10:00
lio: use newly exposed RSS hash key API rather than ad-hoc hashing
Differential Revision: https://reviews.freebsd.org/D53101 Reviewed by: zlei Sponsored by: Netflix
This commit is contained in:
1 parent
96cde0b9e6
commit
5a94c2e89f
4 files changed
+4
-15
No files matched your search
@@ -64,10 +64,8 @@ static int num_queues_per_pf1;
|
||||
TUNABLE_INT("hw.lio.num_queues_per_pf0", &num_queues_per_pf0);
|
||||
TUNABLE_INT("hw.lio.num_queues_per_pf1", &num_queues_per_pf1);
|
||||
|
||||
#ifdef RSS
|
||||
static int lio_rss = 1;
|
||||
TUNABLE_INT("hw.lio.rss", &lio_rss);
|
||||
#endif /* RSS */
|
||||
|
||||
/* Hardware LRO */
|
||||
unsigned int lio_hwlro = 0;
|
||||
@@ -1437,13 +1435,10 @@ lio_setup_nic_devices(struct octeon_device *octeon_dev)
|
||||
lio_set_feature(ifp, LIO_CMD_TNL_TX_CSUM_CTL,
|
||||
LIO_CMD_TXCSUM_ENABLE);
|
||||
|
||||
#ifdef RSS
|
||||
if (lio_rss) {
|
||||
if (lio_send_rss_param(lio))
|
||||
goto setup_nic_dev_fail;
|
||||
} else
|
||||
#endif /* RSS */
|
||||
|
||||
lio_set_feature(ifp, LIO_CMD_SET_FNV,
|
||||
LIO_CMD_FNV_ENABLE);
|
||||
|
||||
|
||||
@@ -125,9 +125,7 @@ struct lio {
|
||||
/* VLAN Filtering related */
|
||||
eventhandler_tag vlan_attach;
|
||||
eventhandler_tag vlan_detach;
|
||||
#ifdef RSS
|
||||
struct lio_rss_params_set rss_set;
|
||||
#endif /* RSS */
|
||||
};
|
||||
|
||||
#define LIO_MAX_CORES 12
|
||||
|
||||
@@ -31,8 +31,6 @@
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifdef RSS
|
||||
|
||||
#include "lio_bsd.h"
|
||||
#include "lio_common.h"
|
||||
#include "lio_droq.h"
|
||||
@@ -69,7 +67,11 @@ lio_set_rss_info(struct lio *lio)
|
||||
uint8_t queue_id;
|
||||
|
||||
for (i = 0; i < LIO_RSS_TABLE_SZ; i++) {
|
||||
#ifdef RSS
|
||||
queue_id = rss_get_indirection_to_bucket(i);
|
||||
#else
|
||||
queue_id = i;
|
||||
#endif
|
||||
queue_id = queue_id % oct->num_oqs;
|
||||
rss_set->fw_itable[i] = queue_id;
|
||||
}
|
||||
@@ -168,5 +170,3 @@ lio_send_rss_param(struct lio *lio)
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
#endif /* RSS */
|
||||
@@ -34,8 +34,6 @@
|
||||
#ifndef __LIO_RSS_H__
|
||||
#define __LIO_RSS_H__
|
||||
|
||||
#ifdef RSS
|
||||
|
||||
#include <net/rss_config.h>
|
||||
#include <netinet/in_rss.h>
|
||||
|
||||
@@ -76,8 +74,6 @@ struct lio_rss_params_set {
|
||||
|
||||
};
|
||||
|
||||
#endif /* RSS */
|
||||
|
||||
#define LIO_RSS_HASH_IPV4 0x100
|
||||
#define LIO_RSS_HASH_TCP_IPV4 0x200
|
||||
#define LIO_RSS_HASH_IPV6 0x400
|
||||
|
||||
Reference in new issue
Block a user