/* * Today's hack: quantum tunneling in structs * * 'entries' and 'term' are never anywhere referenced by word in code. In fact, * they serve as the hanging-off data accessed through repl.data[]. */ /* tbl has the following structure equivalent, but is C99 compliant: * struct { * struct type##_replace repl; * struct type##_standard entries[nhooks]; * struct type##_error term; * } *tbl; */ #define xt_alloc_initial_table(type, typ2) ({ \ unsigned int hook_mask = info->valid_hooks; \ unsigned int nhooks = hweight32(hook_mask); \ unsigned int bytes = 0, hooknum = 0, i = 0; \ struct { \ struct type##_replace repl; \ struct type##_standard entries[]; \ } *tbl; \ struct type##_error *term; \ size_t term_offset = (offsetof(typeof(*tbl), entries[nhooks]) + \ __alignof__(*term) - 1) & ~(__alignof__(*term) - 1); \ tbl = kzalloc(term_offset + sizeof(*term), GFP_KERNEL); \ if (tbl == NULL) \ return NULL; \ term = (struct type##_error *)&(((char *)tbl)[term_offset]); \ strncpy(tbl->repl.name, info->name, sizeof(tbl->repl.name)); \ *term = (struct type##_error)typ2##_ERROR_INIT; \ tbl->repl.valid_hooks = hook_mask; \ tbl->repl.num_entries = nhooks + 1; \ tbl->repl.size = nhooks * sizeof(struct type##_standard) + \ sizeof(struct type##_error); \ for (; hook_mask != 0; hook_mask >>= 1, ++hooknum) { \ if (!(hook_mask & 1)) \ continue; \ tbl->repl.hook_entry[hooknum] = bytes; \ tbl->repl.underflow[hooknum] = bytes; \ tbl->entries[i++] = (struct type##_standard) \ typ2##_STANDARD_INIT(NF_ACCEPT); \ bytes += sizeof(struct type##_standard); \ } \ tbl; \ }) p;id=40710cf9ad234778eb8b10ef07d922f435005cf7'>refslogtreecommitdiff
path: root/net/rds/ib_rdma.c
cd7b846f4fa60dc0317'>sctp: add dst_pending_confirm flag
AgeCommit message (Expand)AuthorFilesLines
Julian Anastasov2-4/+6
2017-02-07net: add dst_pending_confirm flag to skbuffJulian Anastasov1-0/+14
2017-02-07sock: add sk_dst_pending_confirm flagJulian Anastasov1-0/+12
2017-02-07net: dsa: Add support for platform dataFlorian Fainelli1-0/+6
2017-02-07net: dsa: Rename and export dev_to_net_device()Florian Fainelli1-0/+1
2017-02-06net: dsa: introduce bridge notifierVivien Didelot1-0/+10
2017-02-06net: dsa: add switch notifierVivien Didelot1-0/+7
2017-02-04net: ipv6: Change notifications for multipath add to RTA_MULTIPATHDavid Ahern1-0/+1
2017-02-04net: ipv6: Allow shorthand delete of all nexthops in multipath routeDavid Ahern1-1/+3
2017-02-03Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-nextDavid S. Miller8-26/+28
2017-02-03sched: cls_flower: expose priority to offloading netdeviceJiri Pirko1-0/+1
2017-02-03ip_tunnels: new IP_TUNNEL_INFO_BRIDGE flag for ip_tunnel_info modeRoopa Prabhu1-0/+1
2017-02-03net/sched: act_ife: Change to use ife moduleYotam Gigi1-1/+0
2017-02-03net: Introduce ife encapsulation moduleYotam Gigi1-0/+51
2017-02-03net/sched: act_ife: Unexport ife_tlv_meta_encodeYotam Gigi1-2/+0
2017-02-02Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-0/+5
2017-02-02netfilter: allow logging from non-init namespacesMichal Kubeček1-0/+3
2017-02-02ipvs: free ip_vs_dest structs when refcnt=0David Windsor1-1/+1
2017-02-02netfilter: merge ctinfo into nfct pointer storage areaFlorian Westphal1-5/+6
2017-02-02netfilter: guarantee 8 byte minalign for template addressesFlorian Westphal1-0/+2
2017-02-02netfilter: add and use nf_ct_set helperFlorian Westphal2-2/+9
2017-02-02skbuff: add and use skb_nfct helperFlorian Westphal1-1/+1
2017-02-02netfilter: reduce direct skb->nfct usageFlorian Westphal1-3/+6
2017-02-02netfilter: conntrack: no need to pass ctinfo to error handlerFlorian Westphal1-1/+1