linux_dsm_epyc7002/include/uapi
Daniel Borkmann 045efa82ff cls_bpf: introduce integrated actions
Often cls_bpf classifier is used with single action drop attached.
Optimize this use case and let cls_bpf return both classid and action.
For backwards compatibility reasons enable this feature under
TCA_BPF_FLAG_ACT_DIRECT flag.

Then more interesting programs like the following are easier to write:
int cls_bpf_prog(struct __sk_buff *skb)
{
  /* classify arp, ip, ipv6 into different traffic classes
   * and drop all other packets
   */
  switch (skb->protocol) {
  case htons(ETH_P_ARP):
    skb->tc_classid = 1;
    break;
  case htons(ETH_P_IP):
    skb->tc_classid = 2;
    break;
  case htons(ETH_P_IPV6):
    skb->tc_classid = 3;
    break;
  default:
    return TC_ACT_SHOT;
  }

  return TC_ACT_OK;
}

Joint work with Daniel Borkmann.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-09-17 21:09:06 -07:00
..
asm-generic errno.h: Improve ENOSYS's comment 2015-04-17 09:03:58 -04:00
drm uapi/drm/i915_drm.h: fix userspace compilation. 2015-09-02 16:26:58 +03:00
linux cls_bpf: introduce integrated actions 2015-09-17 21:09:06 -07:00
misc cxl: Add alternate MMIO error handling 2015-08-18 19:34:43 +10:00
mtd mtd: lpddr: add driver for LPDDR2-NVM PCM memories 2014-05-20 17:45:17 -07:00
rdma IB/hfi1: Add PSM2 user space header to header_install 2015-09-03 15:29:52 -04:00
scsi cxlflash: Virtual LUN support 2015-08-26 18:05:39 -07:00
sound ASoC: Disable topology support for v4.2 2015-08-19 18:31:54 +02:00
video
xen xen/privcmd: Further s/MFN/GFN/ clean-up 2015-09-08 18:03:54 +01:00
Kbuild cxl: Add userspace header file 2014-10-08 20:15:57 +11:00