Re: [PATCH 03/22] netfilter: ipset: Improve skbinfo get/init helpers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Oct 23, 2016 at 10:37:36PM +0200, Jozsef Kadlecsik wrote:
> Use struct ip_set_skbinfo in struct ip_set_ext instead of open
> coded fields and assign structure members in get/init helpers
> instead of copying members one by one.
> 
> Ported from a patch proposed by Sergey Popovich <popovich_sergei@xxxxxxx>.
> 
> Suggested-by: Sergey Popovich <popovich_sergei@xxxxxxx>
> Signed-off-by: Jozsef Kadlecsik <kadlec@xxxxxxxxxxxxxxxxx>
> ---
>  include/linux/netfilter/ipset/ip_set.h | 30 +++++++++++-------------------
>  net/netfilter/ipset/ip_set_core.c      | 12 ++++++------
>  net/netfilter/xt_set.c                 | 12 +++++++-----
>  3 files changed, 24 insertions(+), 30 deletions(-)
> 
> diff --git a/include/linux/netfilter/ipset/ip_set.h b/include/linux/netfilter/ipset/ip_set.h
> index 1ea28e3..7802621 100644
> --- a/include/linux/netfilter/ipset/ip_set.h
> +++ b/include/linux/netfilter/ipset/ip_set.h
> @@ -92,17 +92,6 @@ struct ip_set_ext_type {
>  
>  extern const struct ip_set_ext_type ip_set_extensions[];
>  
> -struct ip_set_ext {
> -	u64 packets;
> -	u64 bytes;
> -	u32 timeout;
> -	u32 skbmark;
> -	u32 skbmarkmask;
> -	u32 skbprio;
> -	u16 skbqueue;
> -	char *comment;
> -};
> -
>  struct ip_set_counter {
>  	atomic64_t bytes;
>  	atomic64_t packets;
> @@ -122,6 +111,15 @@ struct ip_set_skbinfo {
>  	u32 skbmarkmask;
>  	u32 skbprio;
>  	u16 skbqueue;
> +	u16 __pad;

Description doesn't say why this new __pad field is required. Did this
slip through accidentally? Otherwise, include a reason for this in the
patch description. Thanks.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux