[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+FuTSditeDHFKD-NLUJsZ=Cgyzca3RZysecRAx=whzpg+E6cg@mail.gmail.com>
Date: Thu, 14 May 2015 15:54:41 -0400
From: Willem de Bruijn <willemb@...gle.com>
To: Vadim Kochan <vadim4j@...il.com>
Cc: Network Development <netdev@...r.kernel.org>
Subject: Re: [PATCH iproute2] ss: Show more info (ring,fanout) for packet socks
On Thu, May 14, 2015 at 7:09 AM, Vadim Kochan <vadim4j@...il.com> wrote:
> 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'.
I don't mean pdi_flags, but
PACKET_FANOUT_FLAG_ROLLOVER
PACKET_FANOUT_FLAG_DEFRAG
which are passed as part of this u32 by the process during setsockopt
PACKET_FANOUT.
>
>>
>> > +
>> > + 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