Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/in_rss.c
Context not available. | |||||
} | } | ||||
/* No configured available hashtypes! */ | /* No configured available hashtypes! */ | ||||
printf("%s: no available hashtypes!\n", __func__); | RSS_DEBUG("no available hashtypes!\n"); | ||||
return (-1); | return (-1); | ||||
} | } | ||||
Context not available. | |||||
* XXX For now this only handles hashing on incoming mbufs. | * XXX For now this only handles hashing on incoming mbufs. | ||||
*/ | */ | ||||
if (dir != RSS_HASH_PKT_INGRESS) { | if (dir != RSS_HASH_PKT_INGRESS) { | ||||
printf("%s: called on EGRESS packet!\n", __func__); | RSS_DEBUG("called on EGRESS packet!\n"); | ||||
return (-1); | return (-1); | ||||
} | } | ||||
Context not available. | |||||
* to have an IPv4 header in it. | * to have an IPv4 header in it. | ||||
*/ | */ | ||||
if (m->m_pkthdr.len < (sizeof(struct ip))) { | if (m->m_pkthdr.len < (sizeof(struct ip))) { | ||||
printf("%s: short mbuf pkthdr\n", __func__); | RSS_DEBUG("short mbuf pkthdr\n"); | ||||
return (-1); | return (-1); | ||||
} | } | ||||
if (m->m_len < (sizeof(struct ip))) { | if (m->m_len < (sizeof(struct ip))) { | ||||
printf("%s: short mbuf len\n", __func__); | RSS_DEBUG("short mbuf len\n"); | ||||
return (-1); | return (-1); | ||||
} | } | ||||
Context not available. | |||||
(proto == IPPROTO_TCP) && | (proto == IPPROTO_TCP) && | ||||
(is_frag == 0)) { | (is_frag == 0)) { | ||||
if (m->m_len < iphlen + sizeof(struct tcphdr)) { | if (m->m_len < iphlen + sizeof(struct tcphdr)) { | ||||
printf("%s: short TCP frame?\n", __func__); | RSS_DEBUG("short TCP frame?\n"); | ||||
return (-1); | return (-1); | ||||
} | } | ||||
th = (const struct tcphdr *)((c_caddr_t)ip + iphlen); | th = (const struct tcphdr *)((c_caddr_t)ip + iphlen); | ||||
Context not available. | |||||
(is_frag == 0)) { | (is_frag == 0)) { | ||||
uh = (const struct udphdr *)((c_caddr_t)ip + iphlen); | uh = (const struct udphdr *)((c_caddr_t)ip + iphlen); | ||||
if (m->m_len < iphlen + sizeof(struct udphdr)) { | if (m->m_len < iphlen + sizeof(struct udphdr)) { | ||||
printf("%s: short UDP frame?\n", __func__); | RSS_DEBUG("short UDP frame?\n"); | ||||
return (-1); | return (-1); | ||||
} | } | ||||
return rss_proto_software_hash_v4(ip->ip_src, ip->ip_dst, | return rss_proto_software_hash_v4(ip->ip_src, ip->ip_dst, | ||||
Context not available. | |||||
hashval, | hashval, | ||||
hashtype); | hashtype); | ||||
} else { | } else { | ||||
printf("%s: no available hashtypes!\n", __func__); | RSS_DEBUG("no available hashtypes!\n"); | ||||
return (-1); | return (-1); | ||||
} | } | ||||
} | } | ||||
Context not available. |