net/bnxt: ignore IPv4 TOS mask
authorKishore Padmanabha <kishore.padmanabha@broadcom.com>
Wed, 15 Jul 2020 13:50:34 +0000 (19:20 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 21 Jul 2020 11:54:53 +0000 (13:54 +0200)
This is a work around for the OVS setting offload rules that
are passing ipv4 tos mask as wild card and currently we do not
support.

Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/tf_ulp/ulp_rte_parser.c

index b943465..63f4c17 100644 (file)
@@ -704,9 +704,19 @@ ulp_rte_ipv4_hdr_handler(const struct rte_flow_item *item,
                ulp_rte_prsr_mask_copy(params, &idx,
                                       &ipv4_mask->hdr.version_ihl,
                                       sizeof(ipv4_mask->hdr.version_ihl));
+#ifdef ULP_DONT_IGNORE_TOS
                ulp_rte_prsr_mask_copy(params, &idx,
                                       &ipv4_mask->hdr.type_of_service,
                                       sizeof(ipv4_mask->hdr.type_of_service));
+#else
+               /*
+                * The tos field is ignored since OVS is setting it as wild card
+                * match and it is not supported. This is a work around and
+                * shall be addressed in the future.
+                */
+               idx += 1;
+#endif
+
                ulp_rte_prsr_mask_copy(params, &idx,
                                       &ipv4_mask->hdr.total_length,
                                       sizeof(ipv4_mask->hdr.total_length));