net: mvpp2: cls: Add classification
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 4 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | net: mvpp2: cls: Remove extra whitespace in mvpp2_cls_flow_writedrivers/ | +3 | 0 replies | |
| 2/4 | net: mvpp2: cls: Use a bitfield to represent the flow_typedrivers/ drivers/ | +109 | 0 replies | |
| 3/4 | net: mvpp2: cls: Add Classification offload supportdrivers/ drivers/ drivers/ +1 more | +410 | 0 replies | |
| 4/4 | net: mvpp2: cls: Allow dropping packets with classification offloaddrivers/ drivers/ drivers/ | +32 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH net-next 0/4] net: mvpp2: cls: Add classification
Hi everyone,
This series is a rework of the previously standalone patch adding classification support for mvpp2 :
https://lore.kernel.org/netdev/[email protected]/
This patch has been reworked according to Saeed's review, to make sure that the location of the rule is always respected and serves as a way to prioritize rules between each other. This the 3rd iteration of this submission, but since it's now a series, I reset the revision numbering.
This series implements that in a limited configuration for now, since we limit the total number of rules per port to 4.
The main factors for this limitation are that :
- We share the classification tables between all ports (4 max, although one is only used for internal loopback), hence we have to perform a logical separation between rules, which is done today by dedicated ranges for each port in each table
- The "Flow table", which dictates which lookups operations are performed for an ingress packet, in subdivided into 22 "sub flows", each corresponding to a traffic type based on the L3 proto, L4 proto, the presence or not of a VLAN tag and the L3 fragmentation.
This makes so that when adding a rule, it has to be added into each of these subflows, introducing duplications of entries and limiting our max number of entries.
These limitations can be overcomed in several ways, but for readability sake, I'd rather submit basic classification offload support for now, and improve it gradually.
This series also adds a small cosmetic cleanup patch (1), and also adds support for the "Drop" action compared to the first submission of this feature. It is simple enough to be added with this basic support.
Compared to the first submissions, the NETIF_F_NTUPLE flag was also removed, following Saeed's comment.
Thanks,
Maxime
Maxime Chevallier (4):
net: mvpp2: cls: Remove extra whitespace in mvpp2_cls_flow_write
net: mvpp2: cls: Use a bitfield to represent the flow_type
net: mvpp2: cls: Add Classification offload support
net: mvpp2: cls: Allow dropping packets with classification offload
drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 42 ++ .../net/ethernet/marvell/mvpp2/mvpp2_cls.c | 497 +++++++++++++++--- .../net/ethernet/marvell/mvpp2/mvpp2_cls.h | 70 ++- .../net/ethernet/marvell/mvpp2/mvpp2_main.c | 20 +- 4 files changed, 545 insertions(+), 84 deletions(-)
Signature · 1 line
2.20.1