Re: [PATCH nf-next 2/2] netfilter: nft_hash: support of symmetric hash

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

 



Hi Laura,

[auto build test WARNING on v4.9-rc8]
[cannot apply to next-20170223]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Laura-Garcia-Liebana/netfilter-nft_hash-symhash-type-support/20170223-205609
config: i386-randconfig-x018-201708 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   net/netfilter/nft_hash.c: In function 'nft_symhash_eval':
>> net/netfilter/nft_hash.c:55:48: warning: passing argument 1 of '__skb_get_hash_symmetric' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     h = reciprocal_scale(__skb_get_hash_symmetric(skb), priv->modulus);
                                                   ^~~
   In file included from include/linux/netlink.h:6:0,
                    from net/netfilter/nft_hash.c:13:
   include/linux/skbuff.h:1090:5: note: expected 'struct sk_buff *' but argument is of type 'const struct sk_buff *'
    u32 __skb_get_hash_symmetric(struct sk_buff *skb);
        ^~~~~~~~~~~~~~~~~~~~~~~~

vim +55 net/netfilter/nft_hash.c

    39	}
    40	
    41	struct nft_symhash {
    42		enum nft_registers      dreg:8;
    43		u32			modulus;
    44		u32			offset;
    45	};
    46	
    47	static void nft_symhash_eval(const struct nft_expr *expr,
    48				     struct nft_regs *regs,
    49				     const struct nft_pktinfo *pkt)
    50	{
    51		struct nft_symhash *priv = nft_expr_priv(expr);
    52		const struct sk_buff *skb = pkt->skb;
    53		u32 h;
    54	
  > 55		h = reciprocal_scale(__skb_get_hash_symmetric(skb), priv->modulus);
    56	
    57		regs->data[priv->dreg] = h + priv->offset;
    58	}
    59	
    60	static const struct nla_policy nft_hash_policy[NFTA_HASH_MAX + 1] = {
    61		[NFTA_HASH_SREG]	= { .type = NLA_U32 },
    62		[NFTA_HASH_DREG]	= { .type = NLA_U32 },
    63		[NFTA_HASH_LEN]		= { .type = NLA_U32 },

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


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

  Powered by Linux