[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20130425.013003.906198891652585954.davem@davemloft.net>
Date: Thu, 25 Apr 2013 01:30:03 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: dborkman@...hat.com
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH net-next 2/2] packet: account statistics only in
tpacket_stats_u
From: Daniel Borkmann <dborkman@...hat.com>
Date: Fri, 19 Apr 2013 18:12:29 +0200
> Currently, packet_sock has a struct tpacket_stats stats member for
> TPACKET_V1 and TPACKET_V2 statistic accounting, and with TPACKET_V3
> ``union tpacket_stats_u stats_u'' was introduced, where however only
> statistics for TPACKET_V3 are held, and when copied to user space,
> TPACKET_V3 does some hackery and access also tpacket_stats' stats,
> although everything could have been done within the union itself.
>
> Unify accounting within the tpacket_stats_u union so that we can
> remove 8 bytes from packet_sock that are there unnecessary. Note that
> even if we switch to TPACKET_V3 and would use non mmap(2)ed option,
> this still works due to the union with same types + offsets, that are
> exposed to the user space.
>
> Signed-off-by: Daniel Borkmann <dborkman@...hat.com>
Applied.
--
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