[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150514110900.GA28582@angus-think.wlc.globallogic.com>
Date: Thu, 14 May 2015 14:09:00 +0300
From: Vadim Kochan <vadim4j@...il.com>
To: Willem de Bruijn <willemb@...gle.com>
Cc: Vadim Kochan <vadim4j@...il.com>,
Network Development <netdev@...r.kernel.org>
Subject: Re: [PATCH iproute2] ss: Show more info (ring,fanout) for packet
socks
On Wed, May 13, 2015 at 05:10:38PM -0400, Willem de Bruijn wrote:
> > + }
> > + if (has_fanout) {
> > + uint16_t type = (fanout >> 16) & 0xffff;
>
> type can be modified by flags in the upper 8 bits. Better
> mask those out and report them separately.
Kernel puts only id & type in diag message, flags are stored in separated
member of 'struct packet_sock'.
>
> > +
> > + printf("\n\tfanout(");
> > + printf("id:%d,", fanout & 0xff);
> > + printf("type:0x%x", type);
> > + if (type == 0)
> > + printf("(hash)");
> > + else if (type == 1)
> > + printf("(lb)");
> > + else if (type == 2)
> > + printf("(cpu)");
> > + else if (type == 3)
> > + printf("(rollover)");
> > + else if (type == 4)
> > + printf("(random)");
> > + else if (type == 5)
> > + printf("(qm)");
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists