diff options
| -rw-r--r-- | sys/netinet/tcp_syncache.c | 4 | ||||
| -rw-r--r-- | sys/sys/mbuf.h | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index 4b501b221bcb..1d628bce0d80 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -1173,7 +1173,7 @@ syncache_expand(struct in_conninfo *inc, struct tcpopt *to, struct tcphdr *th, return (-1); /* Do not send RST */ } #endif /* TCP_SIGNATURE */ - if (m != NULL && M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) { + if (m != NULL && M_HASHTYPE_ISHASH_TCP(m)) { sc->sc_flowid = m->m_pkthdr.flowid; sc->sc_flowtype = M_HASHTYPE_GET(m); } @@ -1771,7 +1771,7 @@ syncache_add(struct in_conninfo *inc, struct tcpopt *to, struct tcphdr *th, sc->sc_flowlabel = htonl(sc->sc_flowlabel) & IPV6_FLOWLABEL_MASK; } #endif - if (m != NULL && M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) { + if (m != NULL && M_HASHTYPE_ISHASH_TCP(m)) { sc->sc_flowid = m->m_pkthdr.flowid; sc->sc_flowtype = M_HASHTYPE_GET(m); } diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h index 1f1b05857ebf..1e09891d259f 100644 --- a/sys/sys/mbuf.h +++ b/sys/sys/mbuf.h @@ -579,6 +579,10 @@ m_epg_pagelen(const struct mbuf *m, int pidx, int pgoff) #define M_HASHTYPE_TEST(m, v) (M_HASHTYPE_GET(m) == (v)) #define M_HASHTYPE_ISHASH(m) \ (((m)->m_pkthdr.rsstype & M_HASHTYPE_HASHPROP) != 0) +#define M_HASHTYPE_ISHASH_TCP(m) \ + (((m)->m_pkthdr.rsstype & (M_HASHTYPE_RSS_TCP_IPV4 | \ + M_HASHTYPE_RSS_TCP_IPV6 | \ + M_HASHTYPE_RSS_TCP_IPV6_EX)) != 0) #define M_HASHTYPE_SETINNER(m) do { \ (m)->m_pkthdr.rsstype |= M_HASHTYPE_INNER; \ } while (0) |
