Lines Matching defs:rule

110 	struct mlx5_flow_handle *rule;
116 struct mlx5_flow_handle *rule;
124 struct mlx5e_ipsec_rule kspi_bypass_rule; /*rule for IPSEC bypass*/
134 struct mlx5_flow_handle *rule;
327 /* Create miss rule */
328 miss->rule = mlx5_add_flow_rules(ft, NULL, &flow_act, dest, 1);
329 if (IS_ERR(miss->rule)) {
331 err = PTR_ERR(miss->rule);
508 struct mlx5_flow_handle *rule;
571 rule = mlx5_add_flow_rules(rx->ft.sa, spec, &flow_act, dest, 2);
572 if (IS_ERR(rule)) {
573 err = PTR_ERR(rule);
574 mlx5_core_err(mdev, "fail to add RX ipsec rule err=%d\n", err);
577 ipsec_rule->rule = rule;
579 /* Add another rule for zero vid */
583 rule = mlx5_add_flow_rules(rx->ft.sa, spec, &flow_act, dest, 2);
584 if (IS_ERR(rule)) {
585 err = PTR_ERR(rule);
587 "fail to add RX ipsec zero vid rule err=%d\n",
591 ipsec_rule->vid_zero_rule = rule;
602 if (ipsec_rule->rule != NULL)
603 mlx5_del_flow_rules(&ipsec_rule->rule);
646 mlx5_core_err(mdev, "Fail to add ipsec tx counter rule err=%d\n", err);
650 tx->status.rule = fte;
661 mlx5_del_flow_rules(&tx->roce.rule);
674 mlx5_del_flow_rules(&tx->pol.rule);
679 mlx5_del_flow_rules(&tx->kspi_miss.rule);
681 mlx5_del_flow_rules(&tx->kspi_bypass_rule.rule);
684 mlx5_del_flow_rules(&tx->status.rule);
693 struct mlx5_flow_handle *rule;
699 rule = mlx5_add_flow_rules(tx->roce.ft, NULL, &flow_act, &dst, 1);
700 if (IS_ERR(rule)) {
701 err = PTR_ERR(rule);
702 mlx5_core_err(mdev, "Fail to add TX roce ipsec rule err=%d\n",
706 tx->roce.rule = rule;
770 * Setting a rule in KSPI table for values that should bypass IPSEC.
782 struct mlx5_flow_handle *rule;
795 rule = mlx5_add_flow_rules(tx->ft.sa_kspi, spec, &flow_act_kspi,
797 if (IS_ERR(rule)) {
798 err = PTR_ERR(rule);
799 mlx5_core_err(mdev, "Fail to add ipsec kspi bypass rule err=%d\n",
803 tx->kspi_bypass_rule.kspi_rule = rule;
805 /* set the rule for packets withoiut ipsec tag. */
809 rule = mlx5_add_flow_rules(tx->ft.sa_kspi, spec, &flow_act, &dest, 1);
810 if (IS_ERR(rule)) {
811 err = PTR_ERR(rule);
812 mlx5_core_err(mdev, "Fail to add ipsec kspi bypass rule err=%d\n", err);
815 tx->kspi_bypass_rule.rule = rule;
835 * For Ethernet packets we start in SA KSPI table that matches KSPI of SA rule
838 * which matches either reqid of the SA rule to reqid reported by policy table
885 /* set miss rule for kspi table with drop action*/
905 mlx5_del_flow_rules(&tx->status.rule);
907 mlx5_del_flow_rules(&tx->kspi_bypass_rule.rule);
915 mlx5_del_flow_rules(&tx->pol.rule);
922 mlx5_del_flow_rules(&tx->kspi_miss.rule);
1108 struct mlx5_flow_handle *rule;
1119 rule = mlx5_add_flow_rules(tx->ft.sa_kspi, spec, flow_act, dest, num_dest);
1120 if (IS_ERR(rule)) {
1121 err = PTR_ERR(rule);
1122 mlx5_core_err(mdev, "fail to add TX ipsec kspi rule err=%d\n", err);
1125 ipsec_rule->kspi_rule = rule;
1143 struct mlx5_flow_handle *rule;
1156 rule = mlx5_add_flow_rules(tx->ft.sa, spec, flow_act, dest, num_dest);
1157 if (IS_ERR(rule)) {
1158 err = PTR_ERR(rule);
1159 mlx5_core_err(mdev, "fail to add TX ipsec reqid rule err=%d\n", err);
1162 ipsec_rule->reqid_rule = rule;
1172 rule = mlx5_add_flow_rules(tx->ft.sa, spec, flow_act, dest, num_dest);
1173 if (IS_ERR(rule)) {
1174 err = PTR_ERR(rule);
1175 mlx5_core_err(mdev, "fail to add TX ipsec ip rule err=%d\n", err);
1178 ipsec_rule->rule = rule;
1264 struct mlx5_flow_handle *rule;
1311 rule = mlx5_add_flow_rules(ft, spec, &flow_act, dest, dstn);
1312 if (IS_ERR(rule)) {
1313 err = PTR_ERR(rule);
1314 mlx5_core_err(mdev, "fail to add TX ipsec rule err=%d\n", err);
1319 pol_entry->ipsec_rule.rule = rule;
1340 struct mlx5_flow_handle *rule;
1389 rule = mlx5_add_flow_rules(ft, spec, &flow_act, dest, dstn);
1390 if (IS_ERR(rule)) {
1391 err = PTR_ERR(rule);
1393 "Failed to add RX IPsec policy rule err=%d\n", err);
1396 pol_entry->ipsec_rule.rule = rule;
1398 /* Add also rule for zero vid */
1402 rule = mlx5_add_flow_rules(ft, spec, &flow_act, dest, dstn);
1403 if (IS_ERR(rule)) {
1404 err = PTR_ERR(rule);
1406 "Failed to add RX IPsec policy rule err=%d\n",
1410 pol_entry->ipsec_rule.vid_zero_rule = rule;
1417 if (pol_entry->ipsec_rule.rule != NULL)
1418 mlx5_del_flow_rules(&pol_entry->ipsec_rule.rule);
1515 struct mlx5_flow_handle *rule;
1547 rule = mlx5_add_flow_rules(rx->ft.status, spec, &flow_act, dest, 2);
1548 if (IS_ERR(rule)) {
1549 err = PTR_ERR(rule);
1550 mlx5_core_err(mdev, "fail to add ipsec rx err copy rule err=%d\n", err);
1555 rx->status.rule = rule;
1571 mlx5_del_flow_rules(&rx_roce->roce_miss.rule);
1572 mlx5_del_flow_rules(&rx_roce->rule);
1580 mlx5_del_flow_rules(&rx->sa.rule);
1583 mlx5_del_flow_rules(&rx->pol.rule);
1586 mlx5_del_flow_rules(&rx->status.rule);
1607 mlx5_del_flow_rules(&rx->pol.rule);
1630 struct mlx5_flow_handle *rule;
1645 rule = mlx5_add_flow_rules(roce->ft, spec, &flow_act, &dst, 1);
1646 if (IS_ERR(rule)) {
1647 err = PTR_ERR(rule);
1648 mlx5_core_err(mdev, "Fail to add RX roce ipsec rule err=%d\n",
1653 roce->rule = rule;
1655 rule = mlx5_add_flow_rules(roce->ft, NULL, &flow_act, default_dst, 1);
1656 if (IS_ERR(rule)) {
1657 err = PTR_ERR(rule);
1658 mlx5_core_err(mdev, "Fail to add RX roce ipsec miss rule err=%d\n",
1663 roce->roce_miss.rule = rule;
1669 mlx5_del_flow_rules(&roce->rule);
1753 /* IPsec Rx IP Status table rule */
1767 /* IPsec Rx IP policy default miss rule */
1786 mlx5_del_flow_rules(&rx->pol.rule);
1790 mlx5_del_flow_rules(&rx->status.rule);
1941 mlx5_del_flow_rules(&ipsec_rule->rule);
1971 mlx5_del_flow_rules(&ipsec_rule->rule);