[v2,2/3] app/testpmd: enable UDP GSO in csum engine
Checks
Commit Message
This patch enables GSO for UDP/IPv4 packets. Oversized UDP/IPv4
packets transmitted over a GSO-enabled port will undergo segmentation.
Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
---
app/test-pmd/cmdline.c | 5 +++--
app/test-pmd/csumonly.c | 2 ++
app/test-pmd/testpmd.c | 2 +-
3 files changed, 6 insertions(+), 3 deletions(-)
Comments
> -----Original Message-----
> From: Hu, Jiayu
> Sent: Sunday, June 17, 2018 4:13 AM
> To: dev@dpdk.org
> Cc: Ananyev, Konstantin <konstantin.ananyev@intel.com>; Zhang, Yuwei1
> <yuwei1.zhang@intel.com>; Iremonger, Bernard
> <bernard.iremonger@intel.com>; Hu, Jiayu <jiayu.hu@intel.com>
> Subject: [PATCH v2 2/3] app/testpmd: enable UDP GSO in csum engine
>
> This patch enables GSO for UDP/IPv4 packets. Oversized UDP/IPv4 packets
> transmitted over a GSO-enabled port will undergo segmentation.
>
> Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
> ---
Acked-by: Bernard Iremonger <Bernard.iremonger@intel.com>
@@ -4792,8 +4792,9 @@ cmd_gso_show_parsed(void *parsed_result,
if (gso_ports[res->cmd_pid].enable) {
printf("Max GSO'd packet size: %uB\n"
"Supported GSO types: TCP/IPv4, "
- "VxLAN with inner TCP/IPv4 packet, "
- "GRE with inner TCP/IPv4 packet\n",
+ "UDP/IPv4, VxLAN with inner "
+ "TCP/IPv4 packet, GRE with inner "
+ "TCP/IPv4 packet\n",
gso_max_segment_size);
} else
printf("GSO is not enabled on Port %u\n", res->cmd_pid);
@@ -411,6 +411,8 @@ process_inner_cksums(void *l3_hdr, const struct testpmd_offload_info *info,
info->ethertype);
}
}
+ if (info->gso_enable)
+ ol_flags |= PKT_TX_UDP_SEG;
} else if (info->l4_proto == IPPROTO_TCP) {
tcp_hdr = (struct tcp_hdr *)((char *)l3_hdr + info->l3_len);
tcp_hdr->cksum = 0;
@@ -777,7 +777,7 @@ init_config(void)
init_port_config();
gso_types = DEV_TX_OFFLOAD_TCP_TSO | DEV_TX_OFFLOAD_VXLAN_TNL_TSO |
- DEV_TX_OFFLOAD_GRE_TNL_TSO;
+ DEV_TX_OFFLOAD_GRE_TNL_TSO | DEV_TX_OFFLOAD_UDP_TSO;
/*
* Records which Mbuf pool to use by each logical core, if needed.
*/