Date: Thu, 16 Jan 2014 12:58:04 +0000 (UTC) From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260709 - head/sys/netinet Message-ID: <201401161258.s0GCw4eM096287@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: glebius Date: Thu Jan 16 12:58:03 2014 New Revision: 260709 URL: http://svnweb.freebsd.org/changeset/base/260709 Log: Cleanup comments and whitespace. No functional changes. Modified: head/sys/netinet/ip_output.c Modified: head/sys/netinet/ip_output.c ============================================================================== --- head/sys/netinet/ip_output.c Thu Jan 16 12:53:01 2014 (r260708) +++ head/sys/netinet/ip_output.c Thu Jan 16 12:58:03 2014 (r260709) @@ -123,9 +123,6 @@ ip_output(struct mbuf *m, struct mbuf *o struct mbuf *m0; int hlen = sizeof (struct ip); int mtu; -#if 0 - int n; /* scratchpad */ -#endif int error = 0; struct sockaddr_in *dst; const struct sockaddr_in *gw; @@ -158,7 +155,7 @@ ip_output(struct mbuf *m, struct mbuf *o #ifdef FLOWTABLE if (ro->ro_rt == NULL) { struct flentry *fle; - + /* * The flow table returns route entries valid for up to 30 * seconds; we rely on the remainder of ip_output() taking no @@ -205,19 +202,18 @@ ip_output(struct mbuf *m, struct mbuf *o /* * dst/gw handling: * - * dst can be rewritten but always point to &ro->ro_dst - * gw is readonly but can be pointed either to dst OR rt_gatewy - * therefore we need restore GW if we're re-doing lookup + * dst can be rewritten but always points to &ro->ro_dst. + * gw is readonly but can point either to dst OR rt_gateway, + * therefore we need restore gw if we're redoing lookup. */ gw = dst = (struct sockaddr_in *)&ro->ro_dst; again: ia = NULL; /* - * If there is a cached route, - * check that it is to the same destination - * and is still up. If not, free it and try again. - * The address family should also be checked in case of sharing the - * cache with IPv6. + * If there is a cached route, check that it is to the same + * destination and is still up. If not, free it and try again. + * The address family should also be checked in case of sharing + * the cache with IPv6. */ rte = ro->ro_rt; if (rte && ((rte->rt_flags & RTF_UP) == 0 || @@ -770,10 +766,10 @@ ip_fragment(struct ip *ip, struct mbuf * } #endif if (len > PAGE_SIZE) { - /* - * Fragment large datagrams such that each segment - * contains a multiple of PAGE_SIZE amount of data, - * plus headers. This enables a receiver to perform + /* + * Fragment large datagrams such that each segment + * contains a multiple of PAGE_SIZE amount of data, + * plus headers. This enables a receiver to perform * page-flipping zero-copy optimizations. * * XXX When does this help given that sender and receiver @@ -787,7 +783,7 @@ ip_fragment(struct ip *ip, struct mbuf * off += m->m_len; /* - * firstlen (off - hlen) must be aligned on an + * firstlen (off - hlen) must be aligned on an * 8-byte boundary */ if (off < hlen) @@ -1172,7 +1168,7 @@ ip_ctloutput(struct socket *so, struct s case IP_OPTIONS: case IP_RETOPTS: if (inp->inp_options) - error = sooptcopyout(sopt, + error = sooptcopyout(sopt, mtod(inp->inp_options, char *), inp->inp_options->m_len);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401161258.s0GCw4eM096287>