All of lore.kernel.org
 help / color / mirror / Atom feed
* Support marking/matching tc_index in netfilter
@ 2015-12-03 21:59 Luuk Paulussen
  2015-12-03 21:59 ` [PATCH] Add tcindex to conntrack and add netfilter target/matches Luuk Paulussen
  0 siblings, 1 reply; 12+ messages in thread
From: Luuk Paulussen @ 2015-12-03 21:59 UTC (permalink / raw)
  To: netfilter-devel

Hi All,

This patch is related to the recent discussion around increasing the skb->mark
size.

Given that increasing the size of the skb is undesirable, this patch makes use
of existing space in the skb reserved for tc marking and adds the possibility
to do that marking from netfilter code.  For performance reasons, the ability
to save/restore this mark to the connection has also been added.

The existing tcindex filter in the scheduler means that no changes are required
there.

This is a first draft, but I think it is reasonably complete in terms of the kernel
code required.


^ permalink raw reply	[flat|nested] 12+ messages in thread
* Add tcindex to conntrack and add netfilter target/matches
@ 2015-12-16  0:20 Luuk Paulussen
  2015-12-16  0:20 ` [PATCH] " Luuk Paulussen
  0 siblings, 1 reply; 12+ messages in thread
From: Luuk Paulussen @ 2015-12-16  0:20 UTC (permalink / raw)
  To: netdev; +Cc: kyeong.yoo, matt.bennett


I recently posted this patch to the netfilter-devel and lartc mailing lists.  The
feedback I have had so far has mostly been questions around how we would use this, and some
suggestions that don't solve the issues.  I haven't had any negative feedback.

The key use case is to mark first packet in flows in either direction using all xtables rules
and then save the mark into the connection.  For subsequent packets in the flow, restore mark
and skip full processing.  Flows that don't match any rule are still marked with a default mark
so that future packets in the flow don't have to go through all of the rules.

Comments/suggestions so far:
 - Use/extend cls_flow to handle tc_index from connection directly. - cls_flow can't
   be used with class-based qdiscs, and also being able to restore with a mask is
   useful for separating request/response from flow.  Also tcindex filter already exists. (This
   suggestion implies that tc_index will be added to the connection information)
 - use CLASSIFY target in xtables and use cls_flow to match prioirity. - CLASSIFY doesn't allow
   the desired performance benefits of restoring mark from connection and we can't use cls_flow.
 - cls_bfp supports tc_index. - I think that this is an argument for having more ways to set it.

The full discussion on netfilter-devel is available here:
http://www.spinics.net/lists/netfilter-devel/msg39746.html

I didn't get any responses on the lartc mailing list.

I would like to know if there is a possibility for this patch to be accepted into the kernel,
and/or suggestions for improvements or alternatives.

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2015-12-17  5:23 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-03 21:59 Support marking/matching tc_index in netfilter Luuk Paulussen
2015-12-03 21:59 ` [PATCH] Add tcindex to conntrack and add netfilter target/matches Luuk Paulussen
2015-12-06 22:28   ` Luuk Paulussen
2015-12-06 22:45     ` Florian Westphal
2015-12-07  2:19       ` Luuk Paulussen
2015-12-07  3:05         ` Florian Westphal
2015-12-07  4:24           ` Luuk Paulussen
2015-12-09  9:07         ` Daniel Borkmann
2015-12-13 23:00           ` Luuk Paulussen
2015-12-14  9:50             ` Daniel Borkmann
2015-12-16  0:20 Luuk Paulussen
2015-12-16  0:20 ` [PATCH] " Luuk Paulussen
2015-12-17  5:21   ` kbuild test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.