Skip to content

Commit d9665c9

Browse files
committed
Fix the IP/TCP/UDP csum error of txmode offloads, refer #317.
1 parent 2bc927f commit d9665c9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/ff_dpdk_if.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,18 +651,21 @@ init_port_start(void)
651651

652652
if ((dev_info.tx_offload_capa & DEV_TX_OFFLOAD_IPV4_CKSUM)) {
653653
printf("TX ip checksum offload supported\n");
654+
port_conf.txmode.offloads |= DEV_TX_OFFLOAD_IPV4_CKSUM;
654655
pconf->hw_features.tx_csum_ip = 1;
655656
}
656657

657658
if ((dev_info.tx_offload_capa & DEV_TX_OFFLOAD_UDP_CKSUM) &&
658659
(dev_info.tx_offload_capa & DEV_TX_OFFLOAD_TCP_CKSUM)) {
659660
printf("TX TCP&UDP checksum offload supported\n");
661+
port_conf.txmode.offloads |= DEV_TX_OFFLOAD_UDP_CKSUM | DEV_TX_OFFLOAD_TCP_CKSUM;
660662
pconf->hw_features.tx_csum_l4 = 1;
661663
}
662664

663665
if (ff_global_cfg.dpdk.tso) {
664666
if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_TCP_TSO) {
665667
printf("TSO is supported\n");
668+
port_conf.txmode.offloads |= DEV_TX_OFFLOAD_TCP_TSO;
666669
pconf->hw_features.tx_tso = 1;
667670
}
668671
} else {

0 commit comments

Comments
 (0)