From owner-svn-src-head@FreeBSD.ORG Wed Mar 18 23:26:48 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 96AB67C; Wed, 18 Mar 2015 23:26:48 +0000 (UTC) Received: from mail-ig0-x234.google.com (mail-ig0-x234.google.com [IPv6:2607:f8b0:4001:c05::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5983FD3C; Wed, 18 Mar 2015 23:26:48 +0000 (UTC) Received: by igbqf9 with SMTP id qf9so8039339igb.1; Wed, 18 Mar 2015 16:26:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=fcjHcPL64KjQjhnT2+2So0aou+xu+K1/oH1f+cimgwI=; b=XZrp8iuxCowN+D75fkgQlsp/0+Yf4tNM1hSvSoG7zcqDTCMAwF+GSIBSd+o/tDjPkp icIJkm27oy3dAfs2ErY465OXiDIk/YYq0p8SYdNJaJvj5pXkGkuy9W54KPGGWAWYmtSD jGvf++3tHrBGHqo74CvReO8xbmod9UqGZR4yuD/Yqvsd4iADNsOIqV+a3ifaI6bYCeO/ bv6Wmw9ntyj47IbioYh0XILJuoDEWg3cWuniwIQ036SrS3rUZEfx4BuWNy18mM4xjieQ eUA5BJ2sC3g8xU07EywFFyZQejOn6enhZgZNx/2lcfDWJKUBHvueU5Go7pNofnd+QQjn 8mHw== MIME-Version: 1.0 X-Received: by 10.107.5.211 with SMTP id 202mr97935629iof.88.1426721207867; Wed, 18 Mar 2015 16:26:47 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.17.194 with HTTP; Wed, 18 Mar 2015 16:26:47 -0700 (PDT) In-Reply-To: <201503182324.t2INOQI2056264@svn.freebsd.org> References: <201503182324.t2INOQI2056264@svn.freebsd.org> Date: Wed, 18 Mar 2015 16:26:47 -0700 X-Google-Sender-Auth: _8lXDHAOd3eNJ62xad6bo6vEcgc Message-ID: Subject: Re: svn commit: r280233 - in head: share/man/man4 sys/netinet From: Adrian Chadd To: Hiren Panchasara Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Mar 2015 23:26:48 -0000 Sorry I didn't add this earlier. There's a flowtype field, right? You should log that too. It'll tell you what the flowid field means. -a On 18 March 2015 at 16:24, Hiren Panchasara wrote: > Author: hiren > Date: Wed Mar 18 23:24:25 2015 > New Revision: 280233 > URL: https://svnweb.freebsd.org/changeset/base/280233 > > Log: > Add connection flowid to siftr(4). > > Reviewed by: lstewart > MFC after: 1 week > Sponsored by: Limelight Networks > Differential Revision: https://reviews.freebsd.org/D2089 > > Modified: > head/share/man/man4/siftr.4 > head/sys/netinet/siftr.c > > Modified: head/share/man/man4/siftr.4 > ============================================================================== > --- head/share/man/man4/siftr.4 Wed Mar 18 22:05:15 2015 (r280232) > +++ head/share/man/man4/siftr.4 Wed Mar 18 23:24:25 2015 (r280233) > @@ -30,7 +30,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd November 12, 2010 > +.Dd March 18, 2015 > .Dt SIFTR 4 > .Os > .Sh NAME > @@ -335,6 +335,13 @@ Bytes acknowledged via SACK are not excl > .It Va 26 > The current number of segments in the reassembly queue. > .El > +.Bl -tag -offset indent -width Va > +.It Va 27 > +Flowid for the connection. > +A caveat: Zero '0' either represents a valid flowid or a default value when it's > +not being set. There is no easy way to differentiate without looking at actual > +network interface card and drivers being used. > +.El > .Pp > The third type of log message is written to the file when the module is disabled > and ceases collecting data from the running kernel. > > Modified: head/sys/netinet/siftr.c > ============================================================================== > --- head/sys/netinet/siftr.c Wed Mar 18 22:05:15 2015 (r280232) > +++ head/sys/netinet/siftr.c Wed Mar 18 23:24:25 2015 (r280233) > @@ -227,6 +227,8 @@ struct pkt_node { > u_int sent_inflight_bytes; > /* Number of segments currently in the reassembly queue. */ > int t_segqlen; > + /* Flowid for the connection. */ > + u_int flowid; > /* Link to next pkt_node in the list. */ > STAILQ_ENTRY(pkt_node) nodes; > }; > @@ -485,7 +487,8 @@ siftr_process_pkt(struct pkt_node * pkt_ > pkt_node->rcv_buf_hiwater, > pkt_node->rcv_buf_cc, > pkt_node->sent_inflight_bytes, > - pkt_node->t_segqlen); > + pkt_node->t_segqlen, > + pkt_node->flowid); > } else { /* IPv4 packet */ > pkt_node->ip_laddr[0] = FIRST_OCTET(pkt_node->ip_laddr[3]); > pkt_node->ip_laddr[1] = SECOND_OCTET(pkt_node->ip_laddr[3]); > @@ -501,7 +504,7 @@ siftr_process_pkt(struct pkt_node * pkt_ > log_buf->ae_bytesused = snprintf(log_buf->ae_data, > MAX_LOG_MSG_LEN, > "%c,0x%08x,%jd.%06ld,%u.%u.%u.%u,%u,%u.%u.%u.%u,%u,%ld,%ld," > - "%ld,%ld,%ld,%u,%u,%u,%u,%u,%u,%u,%d,%u,%u,%u,%u,%u,%u\n", > + "%ld,%ld,%ld,%u,%u,%u,%u,%u,%u,%u,%d,%u,%u,%u,%u,%u,%u,%u\n", > direction[pkt_node->direction], > pkt_node->hash, > (intmax_t)pkt_node->tval.tv_sec, > @@ -534,7 +537,8 @@ siftr_process_pkt(struct pkt_node * pkt_ > pkt_node->rcv_buf_hiwater, > pkt_node->rcv_buf_cc, > pkt_node->sent_inflight_bytes, > - pkt_node->t_segqlen); > + pkt_node->t_segqlen, > + pkt_node->flowid); > #ifdef SIFTR_IPV6 > } > #endif > @@ -787,6 +791,7 @@ siftr_siftdata(struct pkt_node *pn, stru > pn->rcv_buf_cc = sbused(&inp->inp_socket->so_rcv); > pn->sent_inflight_bytes = tp->snd_max - tp->snd_una; > pn->t_segqlen = tp->t_segqlen; > + pn->flowid = inp->inp_flowid; > > /* We've finished accessing the tcb so release the lock. */ > if (inp_locally_locked) >