flow_dissector: Add PPPoE dissectors
authorWojciech Drewek <wojciech.drewek@intel.com>
Mon, 18 Jul 2022 12:18:10 +0000 (14:18 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 26 Jul 2022 16:49:12 +0000 (09:49 -0700)
commit46126db9c86110e5fc1e369b9bb89735ddefdae4
treea1e29356c85ab3b5adbb3ffde49b87f69ad2b9ea
parent35d099da41967f114c6472b838e12014706c26e7
flow_dissector: Add PPPoE dissectors

Allow to dissect PPPoE specific fields which are:
- session ID (16 bits)
- ppp protocol (16 bits)
- type (16 bits) - this is PPPoE ethertype, for now only
  ETH_P_PPP_SES is supported, possible ETH_P_PPP_DISC
  in the future

The goal is to make the following TC command possible:

  # tc filter add dev ens6f0 ingress prio 1 protocol ppp_ses \
      flower \
        pppoe_sid 12 \
        ppp_proto ip \
      action drop

Note that only PPPoE Session is supported.

Signed-off-by: Wojciech Drewek <wojciech.drewek@intel.com>
Acked-by: Guillaume Nault <gnault@redhat.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
include/linux/ppp_defs.h
include/net/flow_dissector.h
net/core/flow_dissector.c