@@ -189,6 +189,7 @@ static int dpdk_setup_port(pktio_entry_t *pktio_entry)
int ret;
pkt_dpdk_t *pkt_dpdk = &pktio_entry->s.pkt_dpdk;
struct rte_eth_rss_conf rss_conf;
+ uint16_t hw_ip_checksum = 0;
/* Always set some hash functions to enable DPDK RSS hash calculation */
if (pkt_dpdk->hash.all_bits == 0) {
@@ -198,13 +199,18 @@ static int dpdk_setup_port(pktio_entry_t *pktio_entry)
rss_conf_to_hash_proto(&rss_conf, &pkt_dpdk->hash);
}
+ if (pktio_entry->s.config.pktin.bit.ipv4_chksum ||
+ pktio_entry->s.config.pktin.bit.udp_chksum ||
+ pktio_entry->s.config.pktin.bit.tcp_chksum)
+ hw_ip_checksum = 1;
+
struct rte_eth_conf port_conf = {
.rxmode = {
.mq_mode = ETH_MQ_RX_RSS,
.max_rx_pkt_len = pkt_dpdk->data_room,
.split_hdr_size = 0,
.header_split = 0,
- .hw_ip_checksum = 0,
+ .hw_ip_checksum = hw_ip_checksum,
.hw_vlan_filter = 0,
.jumbo_frame = 1,
.hw_strip_crc = 0,
Signed-off-by: Bogdan Pricope <bogdan.pricope@linaro.org> --- platform/linux-generic/pktio/dpdk.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) -- 1.9.1