[dpdk-dev] [PATCH v6 4/6] gso: add GRE GSO support

Ananyev, Konstantin konstantin.ananyev at intel.com
Wed Oct 4 16:15:39 CEST 2017


> diff --git a/lib/librte_gso/rte_gso.c b/lib/librte_gso/rte_gso.c
> index 6095689..b748ab1 100644
> --- a/lib/librte_gso/rte_gso.c
> +++ b/lib/librte_gso/rte_gso.c
> @@ -60,8 +60,9 @@
> 
>  	if ((gso_ctx->gso_size >= pkt->pkt_len) || (gso_ctx->gso_types &
>  				(DEV_TX_OFFLOAD_TCP_TSO |
> -				 DEV_TX_OFFLOAD_VXLAN_TNL_TSO)) !=
> -				gso_ctx->gso_types) {
> +				 DEV_TX_OFFLOAD_VXLAN_TNL_TSO |
> +				 DEV_TX_OFFLOAD_GRE_TNL_TSO)) !=
> +				 gso_ctx->gso_types) {
>  		pkt->ol_flags &= (~PKT_TX_TCP_SEG);
>  		pkts_out[0] = pkt;
>  		return 1;
> @@ -73,7 +74,8 @@
>  	ipid_delta = (gso_ctx->ipid_flag != RTE_GSO_IPID_FIXED);
>  	ol_flags = pkt->ol_flags;
> 
> -	if (IS_IPV4_VXLAN_TCP4(pkt->ol_flags)) {
> +	if (IS_IPV4_VXLAN_TCP4(pkt->ol_flags) ||
> +			IS_IPV4_GRE_TCP4(pkt->ol_flags)) {

Same comment as for previous patch: user might want that ctx to 
Segment vxlan packets and not segment gro packets.
Konstantin

>  		pkt->ol_flags &= (~PKT_TX_TCP_SEG);
>  		ret = gso_tunnel_tcp4_segment(pkt, gso_size, ipid_delta,
>  				direct_pool, indirect_pool,
> --
> 1.9.3



More information about the dev mailing list