On Wed, Aug 23, 2017 at 10:41:23PM +0200, Pablo M. Bermudo Garay wrote: > This patch adds support for overloading stateful objects operations > through the select_ops() callback, just as it is implemented for > expressions. > > This change is needed for upcoming additions to the stateful objects > infrastructure. Applied with changes, see below. > > Signed-off-by: Pablo M. Bermudo Garay <pablombg@xxxxxxxxx> > --- > include/net/netfilter/nf_tables.h | 30 ++++++++++++++++++++++-------- > net/netfilter/nf_tables_api.c | 27 ++++++++++++++++++++------- > net/netfilter/nft_counter.c | 12 ++++++++---- > net/netfilter/nft_ct.c | 12 ++++++++---- > net/netfilter/nft_objref.c | 4 ++-- > net/netfilter/nft_quota.c | 12 ++++++++---- > 6 files changed, 68 insertions(+), 29 deletions(-) > > diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h > index f9795fe394f3..b53639af1c7b 100644 > --- a/include/net/netfilter/nf_tables.h > +++ b/include/net/netfilter/nf_tables.h > @@ -1008,6 +1008,7 @@ int nft_verdict_dump(struct sk_buff *skb, int type, > * @list: table stateful object list node > * @table: table this object belongs to > * @type: pointer to object type > + * @ops: object operations > * @data: pointer to object data > * @name: name of this stateful object > * @genmask: generation mask > @@ -1022,6 +1023,7 @@ struct nft_object { > use:30; > /* runtime data below here */ > const struct nft_object_type *type ____cacheline_aligned; > + const struct nft_object_ops *ops; We can just leave *ops here, and place *type in nft_object_ops. No need to rework this, I have mangled this patch here. -- 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