forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.h
....@@ -108,12 +108,40 @@
108108 #define PEDIT_TCP_SPORT_DPORT 0x0
109109 #define PEDIT_UDP_SPORT_DPORT 0x0
110110
111
+enum cxgb4_action_natmode_flags {
112
+ CXGB4_ACTION_NATMODE_NONE = 0,
113
+ CXGB4_ACTION_NATMODE_DIP = (1 << 0),
114
+ CXGB4_ACTION_NATMODE_SIP = (1 << 1),
115
+ CXGB4_ACTION_NATMODE_DPORT = (1 << 2),
116
+ CXGB4_ACTION_NATMODE_SPORT = (1 << 3),
117
+};
118
+
119
+/* TC PEDIT action to NATMODE translation entry */
120
+struct cxgb4_natmode_config {
121
+ enum chip_type chip;
122
+ u8 flags;
123
+ u8 natmode;
124
+};
125
+
126
+void cxgb4_process_flow_actions(struct net_device *in,
127
+ struct flow_action *actions,
128
+ struct ch_filter_specification *fs);
129
+int cxgb4_validate_flow_actions(struct net_device *dev,
130
+ struct flow_action *actions,
131
+ struct netlink_ext_ack *extack,
132
+ u8 matchall_filter);
133
+
111134 int cxgb4_tc_flower_replace(struct net_device *dev,
112
- struct tc_cls_flower_offload *cls);
135
+ struct flow_cls_offload *cls);
113136 int cxgb4_tc_flower_destroy(struct net_device *dev,
114
- struct tc_cls_flower_offload *cls);
137
+ struct flow_cls_offload *cls);
115138 int cxgb4_tc_flower_stats(struct net_device *dev,
116
- struct tc_cls_flower_offload *cls);
139
+ struct flow_cls_offload *cls);
140
+int cxgb4_flow_rule_replace(struct net_device *dev, struct flow_rule *rule,
141
+ u32 tc_prio, struct netlink_ext_ack *extack,
142
+ struct ch_filter_specification *fs, u32 *tid);
143
+int cxgb4_flow_rule_destroy(struct net_device *dev, u32 tc_prio,
144
+ struct ch_filter_specification *fs, int tid);
117145
118146 int cxgb4_init_tc_flower(struct adapter *adap);
119147 void cxgb4_cleanup_tc_flower(struct adapter *adap);