.. | .. |
---|
108 | 108 | #define PEDIT_TCP_SPORT_DPORT 0x0 |
---|
109 | 109 | #define PEDIT_UDP_SPORT_DPORT 0x0 |
---|
110 | 110 | |
---|
| 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 | + |
---|
111 | 134 | int cxgb4_tc_flower_replace(struct net_device *dev, |
---|
112 | | - struct tc_cls_flower_offload *cls); |
---|
| 135 | + struct flow_cls_offload *cls); |
---|
113 | 136 | int cxgb4_tc_flower_destroy(struct net_device *dev, |
---|
114 | | - struct tc_cls_flower_offload *cls); |
---|
| 137 | + struct flow_cls_offload *cls); |
---|
115 | 138 | 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); |
---|
117 | 145 | |
---|
118 | 146 | int cxgb4_init_tc_flower(struct adapter *adap); |
---|
119 | 147 | void cxgb4_cleanup_tc_flower(struct adapter *adap); |
---|