Add another RSS method to query the indirection table entries.
There's 128 indirection table entries which correspond to the low 7 bits of the 32 bit RSS hash. Each value will correspond to an RSS bucket. (Then each RSS bucket currently will map to a CPU.) This is a more explicit way of figuring out which RSS bucket is in each RSS indirection slot. It can be inferred by the other methods but I'd rather drivers use something more simplified and explicit.
This commit is contained in:
parent
60e5655540
commit
a6c88ec4fb
@ -399,6 +399,26 @@ rss_getbucket(u_int hash)
|
||||
return (hash & rss_mask);
|
||||
}
|
||||
|
||||
/*
|
||||
* Query the RSS layer bucket associated with the given
|
||||
* entry in the RSS hash space.
|
||||
*
|
||||
* The RSS indirection table is 0 .. rss_buckets-1,
|
||||
* covering the low 'rss_bits' of the total 128 slot
|
||||
* RSS indirection table. So just mask off rss_bits and
|
||||
* return that.
|
||||
*
|
||||
* NIC drivers can then iterate over the 128 slot RSS
|
||||
* indirection table and fetch which RSS bucket to
|
||||
* map it to. This will typically be a CPU queue
|
||||
*/
|
||||
u_int
|
||||
rss_get_indirection_to_bucket(u_int index)
|
||||
{
|
||||
|
||||
return (index & rss_mask);
|
||||
}
|
||||
|
||||
/*
|
||||
* Query the RSS CPU associated with an RSS bucket.
|
||||
*/
|
||||
|
@ -69,6 +69,7 @@
|
||||
*/
|
||||
u_int rss_getbits(void);
|
||||
u_int rss_getbucket(u_int hash);
|
||||
u_int rss_get_indirection_to_bucket(u_int index);
|
||||
u_int rss_getcpu(u_int bucket);
|
||||
void rss_getkey(uint8_t *key);
|
||||
u_int rss_gethashalgo(void);
|
||||
|
Loading…
x
Reference in New Issue
Block a user