netfilter: nf_tables: kill nft_pktinfo.ops
[deliverable/linux.git] / include / net / netfilter / nf_tables.h
index 2a246680a6c38934485fbd7a540df04ad47a0253..c0899f97ff8d62cbd05fb3147f7361615ca0101c 100644 (file)
@@ -16,7 +16,8 @@ struct nft_pktinfo {
        struct sk_buff                  *skb;
        const struct net_device         *in;
        const struct net_device         *out;
-       const struct nf_hook_ops        *ops;
+       u8                              pf;
+       u8                              hook;
        u8                              nhoff;
        u8                              thoff;
        u8                              tprot;
@@ -25,16 +26,14 @@ struct nft_pktinfo {
 };
 
 static inline void nft_set_pktinfo(struct nft_pktinfo *pkt,
-                                  const struct nf_hook_ops *ops,
                                   struct sk_buff *skb,
                                   const struct nf_hook_state *state)
 {
        pkt->skb = skb;
        pkt->in = pkt->xt.in = state->in;
        pkt->out = pkt->xt.out = state->out;
-       pkt->ops = ops;
-       pkt->xt.hooknum = ops->hooknum;
-       pkt->xt.family = ops->pf;
+       pkt->hook = pkt->xt.hooknum = state->hook;
+       pkt->pf = pkt->xt.family = state->pf;
 }
 
 /**
@@ -125,7 +124,7 @@ static inline enum nft_data_types nft_dreg_to_type(enum nft_registers reg)
 
 static inline enum nft_registers nft_type_to_reg(enum nft_data_types type)
 {
-       return type == NFT_DATA_VERDICT ? NFT_REG_VERDICT : NFT_REG_1;
+       return type == NFT_DATA_VERDICT ? NFT_REG_VERDICT : NFT_REG_1 * NFT_REG_SIZE / NFT_REG32_SIZE;
 }
 
 unsigned int nft_parse_register(const struct nlattr *attr);
This page took 0.026782 seconds and 5 git commands to generate.