Lines Matching refs:vport

9 static void esw_acl_egress_lgcy_rules_destroy(struct mlx5_vport *vport)
11 esw_acl_egress_vlan_destroy(vport);
12 if (!IS_ERR_OR_NULL(vport->egress.legacy.drop_rule)) {
13 mlx5_del_flow_rules(vport->egress.legacy.drop_rule);
14 vport->egress.legacy.drop_rule = NULL;
19 struct mlx5_vport *vport)
27 err = esw_acl_egress_vlan_grp_create(esw, vport);
39 drop_grp = mlx5_create_flow_group(vport->egress.acl, flow_group_in);
42 esw_warn(dev, "Failed to create E-Switch vport[%d] egress drop flow group, err(%d)\n",
43 vport->vport, err);
47 vport->egress.legacy.drop_grp = drop_grp;
54 esw_acl_egress_vlan_grp_destroy(vport);
58 static void esw_acl_egress_lgcy_groups_destroy(struct mlx5_vport *vport)
60 if (!IS_ERR_OR_NULL(vport->egress.legacy.drop_grp)) {
61 mlx5_destroy_flow_group(vport->egress.legacy.drop_grp);
62 vport->egress.legacy.drop_grp = NULL;
64 esw_acl_egress_vlan_grp_destroy(vport);
68 struct mlx5_vport *vport)
84 if (vport->egress.legacy.drop_counter) {
85 drop_counter = vport->egress.legacy.drop_counter;
90 "vport[%d] configure egress drop rule counter err(%ld)\n",
91 vport->vport, PTR_ERR(drop_counter));
94 vport->egress.legacy.drop_counter = drop_counter;
97 esw_acl_egress_lgcy_rules_destroy(vport);
99 if (!vport->info.vlan && !vport->info.qos) {
100 esw_acl_egress_lgcy_cleanup(esw, vport);
104 if (!vport->egress.acl) {
105 vport->egress.acl = esw_acl_table_create(esw, vport,
108 if (IS_ERR(vport->egress.acl)) {
109 err = PTR_ERR(vport->egress.acl);
110 vport->egress.acl = NULL;
114 err = esw_acl_egress_lgcy_groups_create(esw, vport);
120 "vport[%d] configure egress rules, vlan(%d) qos(%d)\n",
121 vport->vport, vport->info.vlan, vport->info.qos);
127 err = esw_egress_acl_vlan_create(esw, vport, NULL, vport->info.vlan,
142 vport->egress.legacy.drop_rule =
143 mlx5_add_flow_rules(vport->egress.acl, NULL,
145 if (IS_ERR(vport->egress.legacy.drop_rule)) {
146 err = PTR_ERR(vport->egress.legacy.drop_rule);
148 "vport[%d] configure egress drop rule failed, err(%d)\n",
149 vport->vport, err);
150 vport->egress.legacy.drop_rule = NULL;
157 esw_acl_egress_lgcy_cleanup(esw, vport);
162 struct mlx5_vport *vport)
164 if (IS_ERR_OR_NULL(vport->egress.acl))
167 esw_debug(esw->dev, "Destroy vport[%d] E-Switch egress ACL\n", vport->vport);
169 esw_acl_egress_lgcy_rules_destroy(vport);
170 esw_acl_egress_lgcy_groups_destroy(vport);
171 esw_acl_egress_table_destroy(vport);
174 if (vport->egress.legacy.drop_counter) {
175 mlx5_fc_destroy(esw->dev, vport->egress.legacy.drop_counter);
176 vport->egress.legacy.drop_counter = NULL;