Add a flag to ip_output() - IP_NODEFAULTFLOWID - which prevents it from
overriding an existing flowid/flowtype field in the outbound mbuf with the inp_flowid/inp_flowtype details. The upcoming RSS UDP support calculates a valid RSS value for outbound mbufs and since it may change per send, it doesn't cache it in the inpcb. So overriding it here would be wrong. Differential Revision: https://reviews.freebsd.org/D527 Reviewed by: grehan
This commit is contained in:
parent
ac25e23856
commit
061a4b4c36
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=271291
@ -145,7 +145,8 @@ ip_output(struct mbuf *m, struct mbuf *opt, struct route *ro, int flags,
|
||||
if (inp != NULL) {
|
||||
INP_LOCK_ASSERT(inp);
|
||||
M_SETFIB(m, inp->inp_inc.inc_fibnum);
|
||||
if (inp->inp_flags & (INP_HW_FLOWID|INP_SW_FLOWID)) {
|
||||
if (((flags & IP_NODEFAULTFLOWID) == 0) &&
|
||||
inp->inp_flags & (INP_HW_FLOWID|INP_SW_FLOWID)) {
|
||||
m->m_pkthdr.flowid = inp->inp_flowid;
|
||||
M_HASHTYPE_SET(m, inp->inp_flowtype);
|
||||
m->m_flags |= M_FLOWID;
|
||||
|
@ -161,6 +161,7 @@ void kmod_ipstat_dec(int statnum);
|
||||
#define IP_SENDTOIF 0x8 /* send on specific ifnet */
|
||||
#define IP_ROUTETOIF SO_DONTROUTE /* 0x10 bypass routing tables */
|
||||
#define IP_ALLOWBROADCAST SO_BROADCAST /* 0x20 can send broadcast packets */
|
||||
#define IP_NODEFAULTFLOWID 0x40 /* Don't set the flowid from inp */
|
||||
|
||||
#ifdef __NO_STRICT_ALIGNMENT
|
||||
#define IP_HDR_ALIGNED_P(ip) 1
|
||||
|
Loading…
Reference in New Issue
Block a user