Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/in_rss.h
Show First 20 Lines • Show All 110 Lines • ▼ Show 20 Lines | |||||
* Network stack interface to query desired CPU affinity of a packet. | * Network stack interface to query desired CPU affinity of a packet. | ||||
*/ | */ | ||||
struct mbuf *rss_m2cpuid(struct mbuf *m, uintptr_t source, u_int *cpuid); | struct mbuf *rss_m2cpuid(struct mbuf *m, uintptr_t source, u_int *cpuid); | ||||
u_int rss_hash2cpuid(uint32_t hash_val, uint32_t hash_type); | u_int rss_hash2cpuid(uint32_t hash_val, uint32_t hash_type); | ||||
int rss_hash2bucket(uint32_t hash_val, uint32_t hash_type, | int rss_hash2bucket(uint32_t hash_val, uint32_t hash_type, | ||||
uint32_t *bucket_id); | uint32_t *bucket_id); | ||||
int rss_m2bucket(struct mbuf *m, uint32_t *bucket_id); | int rss_m2bucket(struct mbuf *m, uint32_t *bucket_id); | ||||
/* | |||||
* Functions to calculate a software RSS hash for a given mbuf or | |||||
* packet detail. | |||||
*/ | |||||
int rss_mbuf_software_hash_v4(const struct mbuf *m, int dir, | |||||
grehan: The naming seems redundant: rss_hash_v4 would seem sufficient. | |||||
adrianAuthorUnsubmitted Not Done Inline ActionsThe reason I have a verbose name is so stack/driver writers realise the function is actually doing a software hash if required, rather than just checking the hash value in the mbuf. For example, rss_m2cpuid() doesn't do a software hash calculation at the moment. adrian: The reason I have a verbose name is so stack/driver writers realise the function is actually… | |||||
uint32_t *hashval, uint32_t *hashtype); | |||||
int rss_software_hash_proto_v4(struct in_addr src, | |||||
grehanUnsubmitted Not Done Inline ActionsDitto with naming. grehan: Ditto with naming. | |||||
struct in_addr dst, u_short src_port, u_short dst_port, | |||||
int proto, int dir, uint32_t *hashval, | |||||
uint32_t *hashtype); | |||||
#endif /* !_NETINET_IN_RSS_H_ */ | #endif /* !_NETINET_IN_RSS_H_ */ |
The naming seems redundant: rss_hash_v4 would seem sufficient.