[patch 0/2] netfilter/ct: add unsupported optional attributes

Holger Eitzenberger holger at eitzenberger.org
Thu Aug 22 05:38:28 EDT 2013


Hi Thomas,

> Patches look good but don't apply due to the idiagnl merge
> that took place. Would you mind to rebase your patches against
> the latest git tree?

thanks, will do.

One other issue which we should probably fix is the fact that
there are several holes in 'nfnl_ct' (and partly have been
there before).  This is from x86_64:

  struct nfnl_ct {
  	int                        ce_refcnt;            /*     0     4 */
  
  	/* XXX 4 bytes hole, try to pack */
  
  	struct nl_object_ops *     ce_ops;               /*     8     8 */
  	struct nl_cache *          ce_cache;             /*    16     8 */
  	struct nl_list_head        ce_list;              /*    24    16 */
  	int                        ce_msgtype;           /*    40     4 */
  	int                        ce_flags;             /*    44     4 */
  	uint32_t                   ce_mask;              /*    48     4 */
  	uint8_t                    ct_family;            /*    52     1 */
  	uint8_t                    ct_proto;             /*    53     1 */
  	union nfnl_ct_protoinfo    ct_protoinfo;         /*    54     1 */
  
  	/* XXX 1 byte hole, try to pack */
  
  	uint32_t                   ct_status;            /*    56     4 */
  	uint32_t                   ct_status_mask;       /*    60     4 */
  	/* --- cacheline 1 boundary (64 bytes) --- */
  	uint32_t                   ct_timeout;           /*    64     4 */
  	uint32_t                   ct_mark;              /*    68     4 */
  	uint32_t                   ct_use;               /*    72     4 */
  	uint32_t                   ct_id;                /*    76     4 */
  	uint16_t                   ct_zone;              /*    80     2 */
  
  	/* XXX 6 bytes hole, try to pack */
  
  	struct nfnl_ct_dir         ct_orig;              /*    88    40 */
  	/* --- cacheline 2 boundary (128 bytes) --- */
  	struct nfnl_ct_dir         ct_repl;              /*   128    40 */
  	struct nfnl_ct_timestamp   ct_tstamp;            /*   168    16 */
  
  	/* size: 184, cachelines: 3, members: 20 */
  	/* sum members: 173, holes: 3, sum holes: 11 */
  	/* last cacheline: 56 bytes */
  };

It might make sense to change that, but I could do that in a later patch.

 /Holger




More information about the libnl mailing list