Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/tcp_ratelimit.c
Show First 20 Lines • Show All 836 Lines • ▼ Show 20 Lines | |||||
static struct ifnet * | static struct ifnet * | ||||
rt_find_real_interface(struct ifnet *ifp, struct inpcb *inp, int *error) | rt_find_real_interface(struct ifnet *ifp, struct inpcb *inp, int *error) | ||||
{ | { | ||||
struct ifnet *tifp; | struct ifnet *tifp; | ||||
struct m_snd_tag *tag; | struct m_snd_tag *tag; | ||||
union if_snd_tag_alloc_params params = { | union if_snd_tag_alloc_params params = { | ||||
.rate_limit.hdr.type = IF_SND_TAG_TYPE_RATE_LIMIT, | .rate_limit.hdr.type = IF_SND_TAG_TYPE_RATE_LIMIT, | ||||
.rate_limit.hdr.flowid = 1, | .rate_limit.hdr.flowid = 1, | ||||
.rate_limit.hdr.numa_domain = inp->inp_numa_domain, | |||||
.rate_limit.max_rate = COMMON_RATE, | .rate_limit.max_rate = COMMON_RATE, | ||||
.rate_limit.flags = M_NOWAIT, | .rate_limit.flags = M_NOWAIT, | ||||
}; | }; | ||||
int err; | int err; | ||||
#ifdef RSS | #ifdef RSS | ||||
params.rate_limit.hdr.flowtype = ((inp->inp_vflag & INP_IPV6) ? | params.rate_limit.hdr.flowtype = ((inp->inp_vflag & INP_IPV6) ? | ||||
M_HASHTYPE_RSS_TCP_IPV6 : M_HASHTYPE_RSS_TCP_IPV4); | M_HASHTYPE_RSS_TCP_IPV6 : M_HASHTYPE_RSS_TCP_IPV4); | ||||
#else | #else | ||||
▲ Show 20 Lines • Show All 371 Lines • Show Last 20 Lines |