[dpdk-dev] [PATCH v2] gso: add VXLAN UDP GSO support

yang_y_yi yang_y_yi at 163.com
Mon Nov 16 01:50:21 CET 2020


At 2020-11-13 21:16:38, "Ananyev, Konstantin" <konstantin.ananyev at intel.com> wrote:
>...
>> diff --git a/lib/librte_gso/rte_gso.c b/lib/librte_gso/rte_gso.c
>> index 896350e..fb76a21 100644
>> --- a/lib/librte_gso/rte_gso.c
>> +++ b/lib/librte_gso/rte_gso.c
>> @@ -11,6 +11,7 @@
>>  #include "gso_common.h"
>>  #include "gso_tcp4.h"
>>  #include "gso_tunnel_tcp4.h"
>> +#include "gso_tunnel_udp4.h"
>>  #include "gso_udp4.h"
>> 
>>  #define ILLEGAL_UDP_GSO_CTX(ctx) \
>> @@ -60,6 +61,13 @@
>>  		ret = gso_tunnel_tcp4_segment(pkt, gso_size, ipid_delta,
>>  				direct_pool, indirect_pool,
>>  				pkts_out, nb_pkts_out);
>> +	} else if (IS_IPV4_VXLAN_UDP4(pkt->ol_flags) &&
>> +			(gso_ctx->gso_types & (DEV_TX_OFFLOAD_VXLAN_TNL_TSO |
>> +					       DEV_TX_OFFLOAD_UDP_TSO))) {
>
>That check would succeed even if DEV_TX_OFFLOAD_VXLAN_TNL_TSO flag is not set.
>Is it supposed to be like that?

Thanks Konstantin for pointing out this, it should be

                       (gso_ctx->gso_types & DEV_TX_OFFLOAD_VXLAN_TNL_TSO) &&
                       (gso_ctx->gso_types & DEV_TX_OFFLOAD_UDP_TSO)) {

I'll send out v3 with this correctness.

>
>
>> +		pkt->ol_flags &= (~PKT_TX_UDP_SEG);
>> +		ret = gso_tunnel_udp4_segment(pkt, gso_size,
>> +				direct_pool, indirect_pool,
>> +				pkts_out, nb_pkts_out);
>>  	} else if (IS_IPV4_TCP(pkt->ol_flags) &&
>>  			(gso_ctx->gso_types & DEV_TX_OFFLOAD_TCP_TSO)) {
>>  		pkt->ol_flags &= (~PKT_TX_TCP_SEG);
>> --
>> 1.8.3.1




More information about the dev mailing list