diff options
author | adrian <adrian@FreeBSD.org> | 2015-08-28 05:58:16 +0000 |
---|---|---|
committer | adrian <adrian@FreeBSD.org> | 2015-08-28 05:58:16 +0000 |
commit | 2d6b12b4999603aa0dff03a24758f30ff6427aa4 (patch) | |
tree | 1f508b9593144d2019e8c741e45107704f285ce6 /sys/netinet/in_rss.c | |
parent | 52c4e750440575c74c74d764a9cd89684cb0b097 (diff) | |
download | FreeBSD-src-2d6b12b4999603aa0dff03a24758f30ff6427aa4.zip FreeBSD-src-2d6b12b4999603aa0dff03a24758f30ff6427aa4.tar.gz |
Replace the printf()s with optional rate limited debugging for RSS.
Submitted by: Tiwei Bie <btw@mail.ustc.edu.cn>
Differential Revision: https://reviews.freebsd.org/D3471
Diffstat (limited to 'sys/netinet/in_rss.c')
-rw-r--r-- | sys/netinet/in_rss.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/netinet/in_rss.c b/sys/netinet/in_rss.c index 264b6d7..40c5f3b 100644 --- a/sys/netinet/in_rss.c +++ b/sys/netinet/in_rss.c @@ -147,7 +147,7 @@ rss_proto_software_hash_v4(struct in_addr s, struct in_addr d, } /* No configured available hashtypes! */ - printf("%s: no available hashtypes!\n", __func__); + RSS_DEBUG("no available hashtypes!\n"); return (-1); } @@ -183,7 +183,7 @@ rss_mbuf_software_hash_v4(const struct mbuf *m, int dir, uint32_t *hashval, * XXX For now this only handles hashing on incoming mbufs. */ if (dir != RSS_HASH_PKT_INGRESS) { - printf("%s: called on EGRESS packet!\n", __func__); + RSS_DEBUG("called on EGRESS packet!\n"); return (-1); } @@ -192,11 +192,11 @@ rss_mbuf_software_hash_v4(const struct mbuf *m, int dir, uint32_t *hashval, * to have an IPv4 header in it. */ if (m->m_pkthdr.len < (sizeof(struct ip))) { - printf("%s: short mbuf pkthdr\n", __func__); + RSS_DEBUG("short mbuf pkthdr\n"); return (-1); } if (m->m_len < (sizeof(struct ip))) { - printf("%s: short mbuf len\n", __func__); + RSS_DEBUG("short mbuf len\n"); return (-1); } @@ -280,7 +280,7 @@ rss_mbuf_software_hash_v4(const struct mbuf *m, int dir, uint32_t *hashval, (proto == IPPROTO_TCP) && (is_frag == 0)) { if (m->m_len < iphlen + sizeof(struct tcphdr)) { - printf("%s: short TCP frame?\n", __func__); + RSS_DEBUG("short TCP frame?\n"); return (-1); } th = (const struct tcphdr *)((c_caddr_t)ip + iphlen); @@ -295,7 +295,7 @@ rss_mbuf_software_hash_v4(const struct mbuf *m, int dir, uint32_t *hashval, (is_frag == 0)) { uh = (const struct udphdr *)((c_caddr_t)ip + iphlen); if (m->m_len < iphlen + sizeof(struct udphdr)) { - printf("%s: short UDP frame?\n", __func__); + RSS_DEBUG("short UDP frame?\n"); return (-1); } return rss_proto_software_hash_v4(ip->ip_src, ip->ip_dst, @@ -313,7 +313,7 @@ rss_mbuf_software_hash_v4(const struct mbuf *m, int dir, uint32_t *hashval, hashval, hashtype); } else { - printf("%s: no available hashtypes!\n", __func__); + RSS_DEBUG("no available hashtypes!\n"); return (-1); } } |