Merge "[qca-nss-sfe] Fix HW checksum issue for VxLan."
diff --git a/sfe_ipv4.c b/sfe_ipv4.c
index 670ed2d..6f4dd26 100644
--- a/sfe_ipv4.c
+++ b/sfe_ipv4.c
@@ -1142,10 +1142,10 @@
* are used. In such cases, do not use HW csum offload. csum offload is used only when we
* are sending directly to the destination interface that supports it.
*/
- if (likely(dest_dev->features & NETIF_F_HW_CSUM)) {
+ if (likely(dest_dev->features & NETIF_F_HW_CSUM) && !netif_is_vxlan(dest_dev)) {
if ((msg->conn_rule.return_top_interface_num == msg->conn_rule.return_interface_num) ||
(msg->rule_flags & SFE_RULE_CREATE_FLAG_USE_RETURN_BOTTOM_INTERFACE)) {
- original_cm->flags |= SFE_IPV4_CONNECTION_MATCH_FLAG_CSUM_OFFLOAD;
+ original_cm->flags |= SFE_IPV4_CONNECTION_MATCH_FLAG_CSUM_OFFLOAD;
}
}
@@ -1350,7 +1350,7 @@
* are used. In such cases, do not use HW csum offload. csum offload is used only when we
* are sending directly to the destination interface that supports it.
*/
- if (likely(src_dev->features & NETIF_F_HW_CSUM)) {
+ if (likely(src_dev->features & NETIF_F_HW_CSUM) && !(netif_is_vxlan(src_dev) || netif_is_vxlan(dest_dev))) {
if ((msg->conn_rule.flow_top_interface_num == msg->conn_rule.flow_interface_num) ||
(msg->rule_flags & SFE_RULE_CREATE_FLAG_USE_FLOW_BOTTOM_INTERFACE)) {
reply_cm->flags |= SFE_IPV4_CONNECTION_MATCH_FLAG_CSUM_OFFLOAD;
diff --git a/sfe_ipv6.c b/sfe_ipv6.c
index 5c62c3d..e08a7e1 100644
--- a/sfe_ipv6.c
+++ b/sfe_ipv6.c
@@ -1122,7 +1122,7 @@
* are used. In such cases, do not use HW csum offload. csum offload is used only when we
* are sending directly to the destination interface that supports it.
*/
- if (likely(dest_dev->features & NETIF_F_HW_CSUM)) {
+ if (likely(dest_dev->features & NETIF_F_HW_CSUM) && !netif_is_vxlan(dest_dev)) {
if ((msg->conn_rule.return_top_interface_num == msg->conn_rule.return_interface_num) ||
(msg->rule_flags & SFE_RULE_CREATE_FLAG_USE_RETURN_BOTTOM_INTERFACE)) {
original_cm->flags |= SFE_IPV6_CONNECTION_MATCH_FLAG_CSUM_OFFLOAD;
@@ -1328,7 +1328,7 @@
* are used. In such cases, do not use HW csum offload. csum offload is used only when we
* are sending directly to the destination interface that supports it.
*/
- if (likely(src_dev->features & NETIF_F_HW_CSUM)) {
+ if (likely(src_dev->features & NETIF_F_HW_CSUM) && !(netif_is_vxlan(src_dev) || netif_is_vxlan(dest_dev))) {
if ((msg->conn_rule.flow_top_interface_num == msg->conn_rule.flow_interface_num) ||
(msg->rule_flags & SFE_RULE_CREATE_FLAG_USE_FLOW_BOTTOM_INTERFACE)) {
reply_cm->flags |= SFE_IPV6_CONNECTION_MATCH_FLAG_CSUM_OFFLOAD;