Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Jan 2014 10:03:02 -0800
From:      Adrian Chadd <adrian@freebsd.org>
To:        Andriy Gapon <avg@freebsd.org>
Cc:        svn-src-stable@freebsd.org, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "src-committers@freebsd.org" <src-committers@freebsd.org>, svn-src-stable-10@freebsd.org
Subject:   Re: svn commit: r260815 - stable/10/sys/netinet
Message-ID:  <CAJ-Vmo=fE9_fZrxA-jHWK5JTNpNH_UX6bDhXA1OXu9e26-brKA@mail.gmail.com>
In-Reply-To: <201401171048.s0HAmiPf025684@svn.freebsd.org>
References:  <201401171048.s0HAmiPf025684@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
:)

Thanks!



-a

On 17 January 2014 02:48, Andriy Gapon <avg@freebsd.org> wrote:
> Author: avg
> Date: Fri Jan 17 10:48:44 2014
> New Revision: 260815
> URL: http://svnweb.freebsd.org/changeset/base/260815
>
> Log:
>   MFC r258605: Convert over the TCP probes to use mtod()
>
>   MFC slacker:  adrian
>
> Modified:
>   stable/10/sys/netinet/tcp_input.c
>   stable/10/sys/netinet/tcp_subr.c
> Directory Properties:
>   stable/10/   (props changed)
>
> Modified: stable/10/sys/netinet/tcp_input.c
> ==============================================================================
> --- stable/10/sys/netinet/tcp_input.c   Fri Jan 17 10:35:18 2014        (r260814)
> +++ stable/10/sys/netinet/tcp_input.c   Fri Jan 17 10:48:44 2014        (r260815)
> @@ -1393,7 +1393,7 @@ relocked:
>         }
>  #endif
>
> -       TCP_PROBE5(receive, NULL, tp, m->m_data, tp, th);
> +       TCP_PROBE5(receive, NULL, tp, mtod(m, const char *), tp, th);
>
>         /*
>          * Segment belongs to a connection in SYN_SENT, ESTABLISHED or later
> @@ -1405,7 +1405,7 @@ relocked:
>         return;
>
>  dropwithreset:
> -       TCP_PROBE5(receive, NULL, tp, m->m_data, tp, th);
> +       TCP_PROBE5(receive, NULL, tp, mtod(m, const char *), tp, th);
>
>         if (ti_locked == TI_WLOCKED) {
>                 INP_INFO_WUNLOCK(&V_tcbinfo);
> @@ -1429,7 +1429,7 @@ dropwithreset:
>
>  dropunlock:
>         if (m != NULL)
> -               TCP_PROBE5(receive, NULL, tp, m->m_data, tp, th);
> +               TCP_PROBE5(receive, NULL, tp, mtod(m, const char *), tp, th);
>
>         if (ti_locked == TI_WLOCKED) {
>                 INP_INFO_WUNLOCK(&V_tcbinfo);
> @@ -1928,8 +1928,8 @@ tcp_do_segment(struct mbuf *m, struct tc
>                         goto dropwithreset;
>                 }
>                 if ((thflags & (TH_ACK|TH_RST)) == (TH_ACK|TH_RST)) {
> -                       TCP_PROBE5(connect_refused, NULL, tp, m->m_data, tp,
> -                           th);
> +                       TCP_PROBE5(connect_refused, NULL, tp,
> +                           mtod(m, const char *), tp, th);
>                         tp = tcp_drop(tp, ECONNREFUSED);
>                 }
>                 if (thflags & TH_RST)
> @@ -1982,7 +1982,7 @@ tcp_do_segment(struct mbuf *m, struct tc
>                         } else {
>                                 tcp_state_change(tp, TCPS_ESTABLISHED);
>                                 TCP_PROBE5(connect_established, NULL, tp,
> -                                   m->m_data, tp, th);
> +                                   mtod(m, const char *), tp, th);
>                                 cc_conn_init(tp);
>                                 tcp_timer_activate(tp, TT_KEEP,
>                                     TP_KEEPIDLE(tp));
> @@ -2387,8 +2387,8 @@ tcp_do_segment(struct mbuf *m, struct tc
>                         tp->t_flags &= ~TF_NEEDFIN;
>                 } else {
>                         tcp_state_change(tp, TCPS_ESTABLISHED);
> -                       TCP_PROBE5(accept_established, NULL, tp, m->m_data, tp,
> -                           th);
> +                       TCP_PROBE5(accept_established, NULL, tp,
> +                           mtod(m, const char *), tp, th);
>                         cc_conn_init(tp);
>                         tcp_timer_activate(tp, TT_KEEP, TP_KEEPIDLE(tp));
>                 }
>
> Modified: stable/10/sys/netinet/tcp_subr.c
> ==============================================================================
> --- stable/10/sys/netinet/tcp_subr.c    Fri Jan 17 10:35:18 2014        (r260814)
> +++ stable/10/sys/netinet/tcp_subr.c    Fri Jan 17 10:48:44 2014        (r260815)
> @@ -706,9 +706,10 @@ tcp_respond(struct tcpcb *tp, void *ipge
>                 tcp_trace(TA_OUTPUT, 0, tp, mtod(m, void *), th, 0);
>  #endif
>         if (flags & TH_RST)
> -               TCP_PROBE5(accept_refused, NULL, NULL, m->m_data, tp, nth);
> +               TCP_PROBE5(accept_refused, NULL, NULL, mtod(m, const char *),
> +                   tp, nth);
>
> -       TCP_PROBE5(send, NULL, tp, m->m_data, tp, nth);
> +       TCP_PROBE5(send, NULL, tp, mtod(m, const char *), tp, nth);
>  #ifdef INET6
>         if (isipv6)
>                 (void) ip6_output(m, NULL, NULL, ipflags, NULL, NULL, inp);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-Vmo=fE9_fZrxA-jHWK5JTNpNH_UX6bDhXA1OXu9e26-brKA>