summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--VNFs/DPPD-PROX/prox_compat.h6
-rw-r--r--VNFs/DPPD-PROX/prox_port_cfg.c7
2 files changed, 13 insertions, 0 deletions
diff --git a/VNFs/DPPD-PROX/prox_compat.h b/VNFs/DPPD-PROX/prox_compat.h
index 1ebacd4a..65bba65d 100644
--- a/VNFs/DPPD-PROX/prox_compat.h
+++ b/VNFs/DPPD-PROX/prox_compat.h
@@ -130,6 +130,12 @@ static void *prox_rte_table_create(struct prox_rte_table_params *params, int soc
#define DEV_RX_OFFLOAD_JUMBO_FRAME 0x00000800
#endif
+#ifndef DEV_RX_OFFLOAD_KEEP_CRC
+#ifndef DEV_RX_OFFLOAD_CRC_STRIP
+#define DEV_RX_OFFLOAD_CRC_STRIP 0x00001000
+#endif
+#endif
+
#if RTE_VERSION < RTE_VERSION_NUM(19,2,0,0)
#define RTE_COLOR_GREEN e_RTE_METER_GREEN
#define RTE_COLOR_YELLOW e_RTE_METER_YELLOW
diff --git a/VNFs/DPPD-PROX/prox_port_cfg.c b/VNFs/DPPD-PROX/prox_port_cfg.c
index de11dbff..93341d3f 100644
--- a/VNFs/DPPD-PROX/prox_port_cfg.c
+++ b/VNFs/DPPD-PROX/prox_port_cfg.c
@@ -281,6 +281,13 @@ void init_rte_dev(int use_dummy_devices)
plog_info("\t\tDisabling UDP cksum on vmxnet3\n");
port_cfg->disabled_tx_offload |= DEV_TX_OFFLOAD_UDP_CKSUM;
}
+ // Some OVS versions reports that they support UDP offload and no IPv4 offload, but fails when UDP offload is enabled
+ if ((!strcmp(port_cfg->short_name, "virtio")) &&
+ ((port_cfg->dev_info.tx_offload_capa & DEV_TX_OFFLOAD_IPV4_CKSUM) == 0) &&
+ (port_cfg->dev_info.tx_offload_capa & DEV_TX_OFFLOAD_UDP_CKSUM)) {
+ plog_info("\t\tDisabling UDP cksum on virtio\n");
+ port_cfg->disabled_tx_offload |= DEV_TX_OFFLOAD_UDP_CKSUM;
+ }
}
}