1 // SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
2 /* Copyright (c) 2019 Mellanox Technologies */
4 #include <linux/mlx5/vport.h>
11 static bool mlx5_dr_is_fw_table(u32 flags)
13 if (flags & MLX5_FLOW_TABLE_TERMINATION)
19 static int mlx5_cmd_dr_update_root_ft(struct mlx5_flow_root_namespace *ns,
20 struct mlx5_flow_table *ft,
24 return mlx5_fs_cmd_get_fw_cmds()->update_root_ft(ns, ft, underlay_qpn,
28 static int set_miss_action(struct mlx5_flow_root_namespace *ns,
29 struct mlx5_flow_table *ft,
30 struct mlx5_flow_table *next_ft)
32 struct mlx5dr_action *old_miss_action;
33 struct mlx5dr_action *action = NULL;
34 struct mlx5dr_table *next_tbl;
37 next_tbl = next_ft ? next_ft->fs_dr_table.dr_table : NULL;
39 action = mlx5dr_action_create_dest_table(next_tbl);
43 old_miss_action = ft->fs_dr_table.miss_action;
44 err = mlx5dr_table_set_miss_action(ft->fs_dr_table.dr_table, action);
46 err = mlx5dr_action_destroy(action);
49 mlx5_core_err(ns->dev, "Failed to destroy action (%d)\n",
53 ft->fs_dr_table.miss_action = action;
54 if (old_miss_action) {
55 err = mlx5dr_action_destroy(old_miss_action);
57 mlx5_core_err(ns->dev, "Failed to destroy action (%d)\n",
64 static int mlx5_cmd_dr_create_flow_table(struct mlx5_flow_root_namespace *ns,
65 struct mlx5_flow_table *ft,
67 struct mlx5_flow_table *next_ft)
69 struct mlx5dr_table *tbl;
73 if (mlx5_dr_is_fw_table(ft->flags))
74 return mlx5_fs_cmd_get_fw_cmds()->create_flow_table(ns, ft,
78 /* turn off encap/decap if not supported for sw-str by fw */
79 if (!MLX5_CAP_FLOWTABLE(ns->dev, sw_owner_reformat_supported))
80 flags = ft->flags & ~(MLX5_FLOW_TABLE_TUNNEL_EN_REFORMAT |
81 MLX5_FLOW_TABLE_TUNNEL_EN_DECAP);
83 tbl = mlx5dr_table_create(ns->fs_dr_domain.dr_domain, ft->level, flags);
85 mlx5_core_err(ns->dev, "Failed creating dr flow_table\n");
89 ft->fs_dr_table.dr_table = tbl;
90 ft->id = mlx5dr_table_get_id(tbl);
93 err = set_miss_action(ns, ft, next_ft);
95 mlx5dr_table_destroy(tbl);
96 ft->fs_dr_table.dr_table = NULL;
101 ft->max_fte = INT_MAX;
106 static int mlx5_cmd_dr_destroy_flow_table(struct mlx5_flow_root_namespace *ns,
107 struct mlx5_flow_table *ft)
109 struct mlx5dr_action *action = ft->fs_dr_table.miss_action;
112 if (mlx5_dr_is_fw_table(ft->flags))
113 return mlx5_fs_cmd_get_fw_cmds()->destroy_flow_table(ns, ft);
115 err = mlx5dr_table_destroy(ft->fs_dr_table.dr_table);
117 mlx5_core_err(ns->dev, "Failed to destroy flow_table (%d)\n",
122 err = mlx5dr_action_destroy(action);
124 mlx5_core_err(ns->dev, "Failed to destroy action(%d)\n",
133 static int mlx5_cmd_dr_modify_flow_table(struct mlx5_flow_root_namespace *ns,
134 struct mlx5_flow_table *ft,
135 struct mlx5_flow_table *next_ft)
137 if (mlx5_dr_is_fw_table(ft->flags))
138 return mlx5_fs_cmd_get_fw_cmds()->modify_flow_table(ns, ft, next_ft);
140 return set_miss_action(ns, ft, next_ft);
143 static int mlx5_cmd_dr_create_flow_group(struct mlx5_flow_root_namespace *ns,
144 struct mlx5_flow_table *ft,
146 struct mlx5_flow_group *fg)
148 struct mlx5dr_matcher *matcher;
149 u32 priority = MLX5_GET(create_flow_group_in, in,
151 u8 match_criteria_enable = MLX5_GET(create_flow_group_in,
153 match_criteria_enable);
154 struct mlx5dr_match_parameters mask;
156 if (mlx5_dr_is_fw_table(ft->flags))
157 return mlx5_fs_cmd_get_fw_cmds()->create_flow_group(ns, ft, in,
160 mask.match_buf = MLX5_ADDR_OF(create_flow_group_in,
162 mask.match_sz = sizeof(fg->mask.match_criteria);
164 matcher = mlx5dr_matcher_create(ft->fs_dr_table.dr_table,
166 match_criteria_enable,
169 mlx5_core_err(ns->dev, "Failed creating matcher\n");
173 fg->fs_dr_matcher.dr_matcher = matcher;
177 static int mlx5_cmd_dr_destroy_flow_group(struct mlx5_flow_root_namespace *ns,
178 struct mlx5_flow_table *ft,
179 struct mlx5_flow_group *fg)
181 if (mlx5_dr_is_fw_table(ft->flags))
182 return mlx5_fs_cmd_get_fw_cmds()->destroy_flow_group(ns, ft, fg);
184 return mlx5dr_matcher_destroy(fg->fs_dr_matcher.dr_matcher);
187 static struct mlx5dr_action *create_vport_action(struct mlx5dr_domain *domain,
188 struct mlx5_flow_rule *dst)
190 struct mlx5_flow_destination *dest_attr = &dst->dest_attr;
192 return mlx5dr_action_create_dest_vport(domain, dest_attr->vport.num,
193 dest_attr->vport.flags &
194 MLX5_FLOW_DEST_VPORT_VHCA_ID,
195 dest_attr->vport.vhca_id);
198 static struct mlx5dr_action *create_uplink_action(struct mlx5dr_domain *domain,
199 struct mlx5_flow_rule *dst)
201 struct mlx5_flow_destination *dest_attr = &dst->dest_attr;
203 return mlx5dr_action_create_dest_vport(domain, MLX5_VPORT_UPLINK, 1,
204 dest_attr->vport.vhca_id);
207 static struct mlx5dr_action *create_ft_action(struct mlx5dr_domain *domain,
208 struct mlx5_flow_rule *dst)
210 struct mlx5_flow_table *dest_ft = dst->dest_attr.ft;
212 if (mlx5_dr_is_fw_table(dest_ft->flags))
213 return mlx5dr_action_create_dest_flow_fw_table(domain, dest_ft);
214 return mlx5dr_action_create_dest_table(dest_ft->fs_dr_table.dr_table);
217 static struct mlx5dr_action *create_action_push_vlan(struct mlx5dr_domain *domain,
218 struct mlx5_fs_vlan *vlan)
220 u16 n_ethtype = vlan->ethtype;
221 u8 prio = vlan->prio;
225 vlan_hdr = (u32)n_ethtype << 16 | (u32)(prio) << 12 | (u32)vid;
226 return mlx5dr_action_create_push_vlan(domain, htonl(vlan_hdr));
229 static bool contain_vport_reformat_action(struct mlx5_flow_rule *dst)
231 return (dst->dest_attr.type == MLX5_FLOW_DESTINATION_TYPE_VPORT ||
232 dst->dest_attr.type == MLX5_FLOW_DESTINATION_TYPE_UPLINK) &&
233 dst->dest_attr.vport.flags & MLX5_FLOW_DEST_VPORT_REFORMAT_ID;
236 /* We want to support a rule with 32 destinations, which means we need to
237 * account for 32 destinations plus usually a counter plus one more action
238 * for a multi-destination flow table.
240 #define MLX5_FLOW_CONTEXT_ACTION_MAX 34
241 static int mlx5_cmd_dr_create_fte(struct mlx5_flow_root_namespace *ns,
242 struct mlx5_flow_table *ft,
243 struct mlx5_flow_group *group,
246 struct mlx5dr_domain *domain = ns->fs_dr_domain.dr_domain;
247 struct mlx5dr_action_dest *term_actions;
248 struct mlx5dr_match_parameters params;
249 struct mlx5_core_dev *dev = ns->dev;
250 struct mlx5dr_action **fs_dr_actions;
251 struct mlx5dr_action *tmp_action;
252 struct mlx5dr_action **actions;
253 bool delay_encap_set = false;
254 struct mlx5dr_rule *rule;
255 struct mlx5_flow_rule *dst;
256 int fs_dr_num_actions = 0;
257 int num_term_actions = 0;
263 if (mlx5_dr_is_fw_table(ft->flags))
264 return mlx5_fs_cmd_get_fw_cmds()->create_fte(ns, ft, group, fte);
266 actions = kcalloc(MLX5_FLOW_CONTEXT_ACTION_MAX, sizeof(*actions),
273 fs_dr_actions = kcalloc(MLX5_FLOW_CONTEXT_ACTION_MAX,
274 sizeof(*fs_dr_actions), GFP_KERNEL);
275 if (!fs_dr_actions) {
277 goto free_actions_alloc;
280 term_actions = kcalloc(MLX5_FLOW_CONTEXT_ACTION_MAX,
281 sizeof(*term_actions), GFP_KERNEL);
284 goto free_fs_dr_actions_alloc;
287 match_sz = sizeof(fte->val);
289 /* Drop reformat action bit if destination vport set with reformat */
290 if (fte->action.action & MLX5_FLOW_CONTEXT_ACTION_FWD_DEST) {
291 list_for_each_entry(dst, &fte->node.children, node.list) {
292 if (!contain_vport_reformat_action(dst))
295 fte->action.action &= ~MLX5_FLOW_CONTEXT_ACTION_PACKET_REFORMAT;
300 /* The order of the actions are must to be keep, only the following
301 * order is supported by SW steering:
302 * TX: modify header -> push vlan -> encap
303 * RX: decap -> pop vlan -> modify header
305 if (fte->action.action & MLX5_FLOW_CONTEXT_ACTION_DECAP) {
306 enum mlx5dr_action_reformat_type decap_type =
307 DR_ACTION_REFORMAT_TYP_TNL_L2_TO_L2;
309 tmp_action = mlx5dr_action_create_packet_reformat(domain,
317 fs_dr_actions[fs_dr_num_actions++] = tmp_action;
318 actions[num_actions++] = tmp_action;
321 if (fte->action.action & MLX5_FLOW_CONTEXT_ACTION_PACKET_REFORMAT) {
322 bool is_decap = fte->action.pkt_reformat->reformat_type ==
323 MLX5_REFORMAT_TYPE_L3_TUNNEL_TO_L2;
326 actions[num_actions++] =
327 fte->action.pkt_reformat->action.dr_action;
329 delay_encap_set = true;
332 if (fte->action.action & MLX5_FLOW_CONTEXT_ACTION_VLAN_POP) {
334 mlx5dr_action_create_pop_vlan();
339 fs_dr_actions[fs_dr_num_actions++] = tmp_action;
340 actions[num_actions++] = tmp_action;
343 if (fte->action.action & MLX5_FLOW_CONTEXT_ACTION_VLAN_POP_2) {
345 mlx5dr_action_create_pop_vlan();
350 fs_dr_actions[fs_dr_num_actions++] = tmp_action;
351 actions[num_actions++] = tmp_action;
354 if (fte->action.action & MLX5_FLOW_CONTEXT_ACTION_MOD_HDR)
355 actions[num_actions++] =
356 fte->action.modify_hdr->action.dr_action;
358 if (fte->action.action & MLX5_FLOW_CONTEXT_ACTION_VLAN_PUSH) {
359 tmp_action = create_action_push_vlan(domain, &fte->action.vlan[0]);
364 fs_dr_actions[fs_dr_num_actions++] = tmp_action;
365 actions[num_actions++] = tmp_action;
368 if (fte->action.action & MLX5_FLOW_CONTEXT_ACTION_VLAN_PUSH_2) {
369 tmp_action = create_action_push_vlan(domain, &fte->action.vlan[1]);
374 fs_dr_actions[fs_dr_num_actions++] = tmp_action;
375 actions[num_actions++] = tmp_action;
379 actions[num_actions++] =
380 fte->action.pkt_reformat->action.dr_action;
382 /* The order of the actions below is not important */
384 if (fte->action.action & MLX5_FLOW_CONTEXT_ACTION_DROP) {
385 tmp_action = mlx5dr_action_create_drop();
390 fs_dr_actions[fs_dr_num_actions++] = tmp_action;
391 term_actions[num_term_actions++].dest = tmp_action;
394 if (fte->flow_context.flow_tag) {
396 mlx5dr_action_create_tag(fte->flow_context.flow_tag);
401 fs_dr_actions[fs_dr_num_actions++] = tmp_action;
402 actions[num_actions++] = tmp_action;
405 if (fte->action.action & MLX5_FLOW_CONTEXT_ACTION_FWD_DEST) {
406 list_for_each_entry(dst, &fte->node.children, node.list) {
407 enum mlx5_flow_destination_type type = dst->dest_attr.type;
410 if (fs_dr_num_actions == MLX5_FLOW_CONTEXT_ACTION_MAX ||
411 num_term_actions == MLX5_FLOW_CONTEXT_ACTION_MAX) {
416 if (type == MLX5_FLOW_DESTINATION_TYPE_COUNTER)
420 case MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE:
421 tmp_action = create_ft_action(domain, dst);
426 fs_dr_actions[fs_dr_num_actions++] = tmp_action;
427 term_actions[num_term_actions++].dest = tmp_action;
429 case MLX5_FLOW_DESTINATION_TYPE_UPLINK:
430 case MLX5_FLOW_DESTINATION_TYPE_VPORT:
431 tmp_action = type == MLX5_FLOW_DESTINATION_TYPE_VPORT ?
432 create_vport_action(domain, dst) :
433 create_uplink_action(domain, dst);
438 fs_dr_actions[fs_dr_num_actions++] = tmp_action;
439 term_actions[num_term_actions].dest = tmp_action;
441 if (dst->dest_attr.vport.flags &
442 MLX5_FLOW_DEST_VPORT_REFORMAT_ID)
443 term_actions[num_term_actions].reformat =
444 dst->dest_attr.vport.pkt_reformat->action.dr_action;
448 case MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE_NUM:
449 id = dst->dest_attr.ft_num;
450 tmp_action = mlx5dr_action_create_dest_table_num(domain,
456 fs_dr_actions[fs_dr_num_actions++] = tmp_action;
457 term_actions[num_term_actions++].dest = tmp_action;
459 case MLX5_FLOW_DESTINATION_TYPE_FLOW_SAMPLER:
460 id = dst->dest_attr.sampler_id;
461 tmp_action = mlx5dr_action_create_flow_sampler(domain,
467 fs_dr_actions[fs_dr_num_actions++] = tmp_action;
468 term_actions[num_term_actions++].dest = tmp_action;
477 if (fte->action.action & MLX5_FLOW_CONTEXT_ACTION_COUNT) {
478 list_for_each_entry(dst, &fte->node.children, node.list) {
481 if (dst->dest_attr.type !=
482 MLX5_FLOW_DESTINATION_TYPE_COUNTER)
485 if (num_actions == MLX5_FLOW_CONTEXT_ACTION_MAX ||
486 fs_dr_num_actions == MLX5_FLOW_CONTEXT_ACTION_MAX) {
491 id = dst->dest_attr.counter_id;
493 mlx5dr_action_create_flow_counter(id);
499 fs_dr_actions[fs_dr_num_actions++] = tmp_action;
500 actions[num_actions++] = tmp_action;
504 params.match_sz = match_sz;
505 params.match_buf = (u64 *)fte->val;
506 if (num_term_actions == 1) {
507 if (term_actions->reformat) {
508 if (num_actions == MLX5_FLOW_CONTEXT_ACTION_MAX) {
512 actions[num_actions++] = term_actions->reformat;
515 if (num_actions == MLX5_FLOW_CONTEXT_ACTION_MAX) {
519 actions[num_actions++] = term_actions->dest;
520 } else if (num_term_actions > 1) {
521 bool ignore_flow_level =
522 !!(fte->action.flags & FLOW_ACT_IGNORE_FLOW_LEVEL);
523 u32 flow_source = fte->flow_context.flow_source;
525 if (num_actions == MLX5_FLOW_CONTEXT_ACTION_MAX ||
526 fs_dr_num_actions == MLX5_FLOW_CONTEXT_ACTION_MAX) {
530 tmp_action = mlx5dr_action_create_mult_dest_tbl(domain,
539 fs_dr_actions[fs_dr_num_actions++] = tmp_action;
540 actions[num_actions++] = tmp_action;
543 rule = mlx5dr_rule_create(group->fs_dr_matcher.dr_matcher,
547 fte->flow_context.flow_source);
556 fte->fs_dr_rule.dr_rule = rule;
557 fte->fs_dr_rule.num_actions = fs_dr_num_actions;
558 fte->fs_dr_rule.dr_actions = fs_dr_actions;
563 /* Free in reverse order to handle action dependencies */
564 for (i = fs_dr_num_actions - 1; i >= 0; i--)
565 if (!IS_ERR_OR_NULL(fs_dr_actions[i]))
566 mlx5dr_action_destroy(fs_dr_actions[i]);
569 free_fs_dr_actions_alloc:
570 kfree(fs_dr_actions);
574 mlx5_core_err(dev, "Failed to create dr rule err(%d)\n", err);
578 static int mlx5_cmd_dr_packet_reformat_alloc(struct mlx5_flow_root_namespace *ns,
579 struct mlx5_pkt_reformat_params *params,
580 enum mlx5_flow_namespace_type namespace,
581 struct mlx5_pkt_reformat *pkt_reformat)
583 struct mlx5dr_domain *dr_domain = ns->fs_dr_domain.dr_domain;
584 struct mlx5dr_action *action;
587 switch (params->type) {
588 case MLX5_REFORMAT_TYPE_L2_TO_VXLAN:
589 case MLX5_REFORMAT_TYPE_L2_TO_NVGRE:
590 case MLX5_REFORMAT_TYPE_L2_TO_L2_TUNNEL:
591 dr_reformat = DR_ACTION_REFORMAT_TYP_L2_TO_TNL_L2;
593 case MLX5_REFORMAT_TYPE_L3_TUNNEL_TO_L2:
594 dr_reformat = DR_ACTION_REFORMAT_TYP_TNL_L3_TO_L2;
596 case MLX5_REFORMAT_TYPE_L2_TO_L3_TUNNEL:
597 dr_reformat = DR_ACTION_REFORMAT_TYP_L2_TO_TNL_L3;
599 case MLX5_REFORMAT_TYPE_INSERT_HDR:
600 dr_reformat = DR_ACTION_REFORMAT_TYP_INSERT_HDR;
602 case MLX5_REFORMAT_TYPE_REMOVE_HDR:
603 dr_reformat = DR_ACTION_REFORMAT_TYP_REMOVE_HDR;
606 mlx5_core_err(ns->dev, "Packet-reformat not supported(%d)\n",
611 action = mlx5dr_action_create_packet_reformat(dr_domain,
618 mlx5_core_err(ns->dev, "Failed allocating packet-reformat action\n");
622 pkt_reformat->action.dr_action = action;
627 static void mlx5_cmd_dr_packet_reformat_dealloc(struct mlx5_flow_root_namespace *ns,
628 struct mlx5_pkt_reformat *pkt_reformat)
630 mlx5dr_action_destroy(pkt_reformat->action.dr_action);
633 static int mlx5_cmd_dr_modify_header_alloc(struct mlx5_flow_root_namespace *ns,
634 u8 namespace, u8 num_actions,
635 void *modify_actions,
636 struct mlx5_modify_hdr *modify_hdr)
638 struct mlx5dr_domain *dr_domain = ns->fs_dr_domain.dr_domain;
639 struct mlx5dr_action *action;
642 actions_sz = MLX5_UN_SZ_BYTES(set_add_copy_action_in_auto) *
644 action = mlx5dr_action_create_modify_header(dr_domain, 0,
648 mlx5_core_err(ns->dev, "Failed allocating modify-header action\n");
652 modify_hdr->action.dr_action = action;
657 static void mlx5_cmd_dr_modify_header_dealloc(struct mlx5_flow_root_namespace *ns,
658 struct mlx5_modify_hdr *modify_hdr)
660 mlx5dr_action_destroy(modify_hdr->action.dr_action);
664 mlx5_cmd_dr_destroy_match_definer(struct mlx5_flow_root_namespace *ns,
670 static int mlx5_cmd_dr_create_match_definer(struct mlx5_flow_root_namespace *ns,
671 u16 format_id, u32 *match_mask)
676 static int mlx5_cmd_dr_delete_fte(struct mlx5_flow_root_namespace *ns,
677 struct mlx5_flow_table *ft,
680 struct mlx5_fs_dr_rule *rule = &fte->fs_dr_rule;
684 if (mlx5_dr_is_fw_table(ft->flags))
685 return mlx5_fs_cmd_get_fw_cmds()->delete_fte(ns, ft, fte);
687 err = mlx5dr_rule_destroy(rule->dr_rule);
691 /* Free in reverse order to handle action dependencies */
692 for (i = rule->num_actions - 1; i >= 0; i--)
693 if (!IS_ERR_OR_NULL(rule->dr_actions[i]))
694 mlx5dr_action_destroy(rule->dr_actions[i]);
696 kfree(rule->dr_actions);
700 static int mlx5_cmd_dr_update_fte(struct mlx5_flow_root_namespace *ns,
701 struct mlx5_flow_table *ft,
702 struct mlx5_flow_group *group,
706 struct fs_fte fte_tmp = {};
709 if (mlx5_dr_is_fw_table(ft->flags))
710 return mlx5_fs_cmd_get_fw_cmds()->update_fte(ns, ft, group, modify_mask, fte);
712 /* Backup current dr rule details */
713 fte_tmp.fs_dr_rule = fte->fs_dr_rule;
714 memset(&fte->fs_dr_rule, 0, sizeof(struct mlx5_fs_dr_rule));
716 /* First add the new updated rule, then delete the old rule */
717 ret = mlx5_cmd_dr_create_fte(ns, ft, group, fte);
721 ret = mlx5_cmd_dr_delete_fte(ns, ft, &fte_tmp);
722 WARN_ONCE(ret, "dr update fte duplicate rule deletion failed\n");
726 fte->fs_dr_rule = fte_tmp.fs_dr_rule;
730 static int mlx5_cmd_dr_set_peer(struct mlx5_flow_root_namespace *ns,
731 struct mlx5_flow_root_namespace *peer_ns)
733 struct mlx5dr_domain *peer_domain = NULL;
736 peer_domain = peer_ns->fs_dr_domain.dr_domain;
737 mlx5dr_domain_set_peer(ns->fs_dr_domain.dr_domain,
742 static int mlx5_cmd_dr_create_ns(struct mlx5_flow_root_namespace *ns)
744 ns->fs_dr_domain.dr_domain =
745 mlx5dr_domain_create(ns->dev,
746 MLX5DR_DOMAIN_TYPE_FDB);
747 if (!ns->fs_dr_domain.dr_domain) {
748 mlx5_core_err(ns->dev, "Failed to create dr flow namespace\n");
754 static int mlx5_cmd_dr_destroy_ns(struct mlx5_flow_root_namespace *ns)
756 return mlx5dr_domain_destroy(ns->fs_dr_domain.dr_domain);
759 static u32 mlx5_cmd_dr_get_capabilities(struct mlx5_flow_root_namespace *ns,
760 enum fs_flow_table_type ft_type)
762 if (ft_type != FS_FT_FDB ||
763 MLX5_CAP_GEN(ns->dev, steering_format_version) == MLX5_STEERING_FORMAT_CONNECTX_5)
766 return MLX5_FLOW_STEERING_CAP_VLAN_PUSH_ON_RX | MLX5_FLOW_STEERING_CAP_VLAN_POP_ON_TX;
769 bool mlx5_fs_dr_is_supported(struct mlx5_core_dev *dev)
771 return mlx5dr_is_supported(dev);
774 static const struct mlx5_flow_cmds mlx5_flow_cmds_dr = {
775 .create_flow_table = mlx5_cmd_dr_create_flow_table,
776 .destroy_flow_table = mlx5_cmd_dr_destroy_flow_table,
777 .modify_flow_table = mlx5_cmd_dr_modify_flow_table,
778 .create_flow_group = mlx5_cmd_dr_create_flow_group,
779 .destroy_flow_group = mlx5_cmd_dr_destroy_flow_group,
780 .create_fte = mlx5_cmd_dr_create_fte,
781 .update_fte = mlx5_cmd_dr_update_fte,
782 .delete_fte = mlx5_cmd_dr_delete_fte,
783 .update_root_ft = mlx5_cmd_dr_update_root_ft,
784 .packet_reformat_alloc = mlx5_cmd_dr_packet_reformat_alloc,
785 .packet_reformat_dealloc = mlx5_cmd_dr_packet_reformat_dealloc,
786 .modify_header_alloc = mlx5_cmd_dr_modify_header_alloc,
787 .modify_header_dealloc = mlx5_cmd_dr_modify_header_dealloc,
788 .create_match_definer = mlx5_cmd_dr_create_match_definer,
789 .destroy_match_definer = mlx5_cmd_dr_destroy_match_definer,
790 .set_peer = mlx5_cmd_dr_set_peer,
791 .create_ns = mlx5_cmd_dr_create_ns,
792 .destroy_ns = mlx5_cmd_dr_destroy_ns,
793 .get_capabilities = mlx5_cmd_dr_get_capabilities,
796 const struct mlx5_flow_cmds *mlx5_fs_cmd_get_dr_cmds(void)
798 return &mlx5_flow_cmds_dr;