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
..
2015-04-11 22:28:27 -04:00
2015-08-10 21:36:13 +02:00
2015-02-20 17:35:14 -05:00
2014-12-10 15:33:16 -05:00
2015-09-17 17:18:37 -07:00
2015-08-04 23:57:45 -07:00
2015-08-20 22:00:11 +02:00
2015-06-14 12:55:49 -07:00
2015-08-26 11:01:45 -07:00
2015-08-11 22:05:36 +02:00
2015-08-26 11:01:44 -07:00
2015-09-09 08:33:31 -07:00
2014-10-25 08:07:30 +02:00
2015-06-10 22:49:20 -07:00
2015-05-11 10:50:17 -04:00
2014-09-18 10:54:36 +02:00
2015-03-04 00:23:23 -05:00
2015-06-28 16:55:44 -07:00
2015-02-24 16:05:48 -05:00
2014-11-10 13:27:49 -05:00
2015-07-27 01:05:24 -07:00
2015-08-30 18:08:50 -04:00
2015-07-17 15:39:41 +02:00
2015-08-10 20:43:06 +02:00
2015-08-17 21:33:06 -07:00
2015-02-11 14:46:37 -05:00
2015-07-20 12:41:30 -07:00
2015-05-13 14:31:43 -04:00
2015-04-09 00:02:26 -04:00
2015-03-06 21:50:02 -05:00
2015-09-17 17:18:37 -07:00
2015-08-18 14:17:21 -07:00
2015-08-31 21:23:42 -07:00
2015-03-09 16:06:10 -04:00
2015-09-17 17:18:37 -07:00
2015-09-09 14:19:50 -07:00
2015-09-01 16:46:08 -07:00
2015-09-01 21:19:17 -07:00
2014-11-12 15:01:35 -05:00
2014-09-30 01:02:26 -04:00
2015-03-12 14:39:40 -04:00
2015-08-27 15:42:48 -07:00
2015-08-10 14:03:54 -07:00
2015-08-31 15:17:17 -07:00
2014-11-05 16:30:03 -05:00
2015-06-12 11:42:29 +02:00
2015-03-23 22:12:09 -04:00
2015-03-20 12:40:25 -04:00
2015-03-18 22:00:35 -04:00
2015-05-11 10:50:18 -04:00
2015-05-31 21:49:14 -07:00
2014-05-07 15:30:52 -04:00
2015-07-26 21:00:15 -07:00
2015-07-09 15:12:20 -07:00
2015-06-06 23:57:12 -07:00
2015-07-09 15:12:20 -07:00
2015-08-28 13:32:36 -07:00
2014-08-24 18:09:23 -07:00
2015-08-20 15:42:36 -07:00
2015-05-25 13:25:34 -04:00
2015-04-07 15:29:08 -04:00
2015-07-31 23:52:20 -07:00
2015-08-31 12:28:56 -07:00
2015-08-21 09:10:11 -07:00
2015-08-30 21:48:58 -07:00
2015-09-17 17:18:37 -07:00
2014-11-24 04:28:49 -05:00
2015-02-28 21:31:12 +01:00
2014-10-14 02:18:27 +02:00
2014-12-10 15:21:24 -05:00
2015-05-11 10:50:17 -04:00
2014-12-10 15:21:24 -05:00
2015-08-24 10:34:40 -07:00
2015-09-04 14:25:46 +02:00
2015-07-23 17:10:50 +02:00
2014-09-22 16:23:15 -04:00
2015-07-21 10:39:05 -07:00
2014-11-05 23:52:33 -08:00
2015-08-20 15:42:37 -07:00
2015-08-10 13:46:21 -07:00
2015-08-07 11:50:56 +02:00
2014-08-07 20:55:21 -04:00
2015-03-31 13:58:35 -04:00
2015-08-10 20:43:06 +02:00
2015-03-02 13:06:31 -05:00
2014-10-06 18:02:32 -04:00
2015-08-27 14:18:48 -07:00
2014-05-23 16:28:53 -04:00
2014-12-17 11:49:55 +01:00
2015-05-05 16:02:34 -04:00
2015-09-15 12:01:41 -07:00
2015-09-15 15:25:02 -07:00
2015-09-17 21:09:06 -07:00
2014-06-02 11:00:41 -07:00
2014-10-15 07:48:18 +02:00
2015-09-17 21:01:04 -07:00
2015-08-11 12:03:19 -07:00
2015-03-12 22:58:12 -04:00
2015-08-31 12:34:00 -07:00
2015-07-09 15:12:20 -07:00
2014-05-22 14:57:15 -04:00
2015-08-29 13:07:54 -07:00
2015-03-02 13:06:31 -05:00
2015-02-04 01:34:15 -05:00
2015-09-01 14:32:44 -07:00
2015-08-25 14:32:04 -07:00
2014-09-05 17:35:28 -07:00
2015-09-17 17:18:32 -07:00