本文将mark下TC Filter Actions机制的相关notes。

TC框架实现中加入了Filter Actions机制。filter实际作用就是classifier,当数据包匹配到特定的filter之后,可以执行该filter所挂载的actions对数据包进行处理。

如图:

The tc filter framework provides the infrastructure to another extensible set of tools as well, namely tc actions. As the name suggests, they allow to do things with packets (or associated data). (The list of) Actions are part of a given filter. If it matches, each action it contains is executed in order before returning the classification result.

在lwn中看到了offload tc action to net device的工作,有机会再细看。


参考资料:

  1. Linux流量控制(Traffic Control)介绍
  2. Filter Actions
  3. Linux Traffic Control Classifier-Action Subsystem Architecture
  4. allow user to offload tc action to net device