Context Aware Offload
Context Aware Offload
2
RTE_FLOW Match:Action
Using RTE_FLOW API user can define HW rule
HW is consisted of list of matches and a list of actions
3
RTE_FLOW UDP Match Code Example
struct rte_flow_item_udp {
struct udp_hdr hdr;
};
4
RTE_FLOW Output Action Example
• API receive an array of actions. Action has a type and pointer to data
• In presented example, there must be additional action to steer packet
5
Offload HW Table
6
Context Aware MULTI TABLE OFFLOAD USE
CASE
Offload
Multi-Table Logic
8
Use of Multiple Table
9
Multi-Stage processing might use context
10
Multi-Stage processing
Table 0 Table 1
A1: Set classification 1
11
Multi-Stages Compile to a single rule
Solution for offload where control is multi-table and hardware can’t support
• We might run logic that compiles multiple rules into a single one.
• Compilation is packet driven
Table 0 Table 1
M1(1,0)+M(1,1):A1,A2,A1’,A2’
12
Multi-Stages Compile to a Single Rule
13
Multi-Stage VS Single-Stage
• It is a tradeoff
• Right approach is use case dependent
• Generalization
• Memory
• PPS (Multi-Table usually has more processing per packet)
• Number of rules and update rate
• Open Flow (OVS) use multi-stage processing
14
Context Aware RTE_FLOW TAG
Offload
RTE_FLOW TAG
32bits
16
TAG is generic
Index = 1
data = VIDEO
match_cls.data = VIDEO
cls_tag.data = cls;
match_cls.index = CLS_INDEX
cls_tag.mask = CLS_MASK;
cls_tag.index = CLS_INDEX;
m_match_cls.data = CLS_MASK
m_match_cls.index =CLS_INDEX
17
TAG limitations
• Limited length
• Limited resource and HW dependent
• Can have impact on performance
• Software logic can be hard to adjust in some cases
Example:
• OVS Tunnel:
• OVS saves the outer ip and tunneling information in packet meta data
• For IPv6 we will need 4 such actions per IP and 1 for VNI, total of 9 actions
18
OVS CT Meta Data
recirc_id(0x7),in_port(1),ct_state(+est+rpl+trk),ct_label(0/0x1),……
19
OVS CT hardware offload using TAG
20
OVS CT Meta Data
Match Actions:OUTPUT:1
21
TAG Summary
• Application dependent
• 5G UPF can have QFI
• OVS can use for CT state/zone…etc
• Allow multie-stage processing
• Match and action on different field
• Multi-Stage logic
• Will be supported on 19.11
22
Q&A
Q&A
23
THANKS!