mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
net: mvpp2: cls: Use a bitfield to represent the flow_type
As of today, the classification code is used only for RSS. We split the incoming traffic into multiple flows, that correspond to the ethtool flow_type parameter. We don't want to use the ethtool flow definitions such as TCP_V4_FLOW, for several reason : - We want to decorrelate the driver code from ethtool as much as possible, so that we can easily use other interfaces such as tc flower, - We want the flow_type to be a bitfield, so that we can match flows embedded into each other, such as TCP4 which is a subset of IP4. This commit does the conversion to the newer type. Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
6f16a46522
commit
84e90b0b51
2 changed files with 109 additions and 69 deletions
|
@ -107,6 +107,20 @@ struct mvpp2_cls_c2_entry {
|
|||
u8 valid;
|
||||
};
|
||||
|
||||
#define MVPP22_FLOW_ETHER_BIT BIT(0)
|
||||
#define MVPP22_FLOW_IP4_BIT BIT(1)
|
||||
#define MVPP22_FLOW_IP6_BIT BIT(2)
|
||||
#define MVPP22_FLOW_TCP_BIT BIT(3)
|
||||
#define MVPP22_FLOW_UDP_BIT BIT(4)
|
||||
|
||||
#define MVPP22_FLOW_TCP4 (MVPP22_FLOW_ETHER_BIT | MVPP22_FLOW_IP4_BIT | MVPP22_FLOW_TCP_BIT)
|
||||
#define MVPP22_FLOW_TCP6 (MVPP22_FLOW_ETHER_BIT | MVPP22_FLOW_IP6_BIT | MVPP22_FLOW_TCP_BIT)
|
||||
#define MVPP22_FLOW_UDP4 (MVPP22_FLOW_ETHER_BIT | MVPP22_FLOW_IP4_BIT | MVPP22_FLOW_UDP_BIT)
|
||||
#define MVPP22_FLOW_UDP6 (MVPP22_FLOW_ETHER_BIT | MVPP22_FLOW_IP6_BIT | MVPP22_FLOW_UDP_BIT)
|
||||
#define MVPP22_FLOW_IP4 (MVPP22_FLOW_ETHER_BIT | MVPP22_FLOW_IP4_BIT)
|
||||
#define MVPP22_FLOW_IP6 (MVPP22_FLOW_ETHER_BIT | MVPP22_FLOW_IP6_BIT)
|
||||
#define MVPP22_FLOW_ETHERNET (MVPP22_FLOW_ETHER_BIT)
|
||||
|
||||
/* Classifier C2 engine entries */
|
||||
#define MVPP22_CLS_C2_N_ENTRIES 256
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue