DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@amd.com>
To: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
	Aman Singh <aman.deep.singh@intel.com>,
	Yuying Zhang <yuying.zhang@intel.com>
Cc: dev@dpdk.org, Georgiy Levashov <georgiy.levashov@oktetlabs.ru>,
	Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Subject: Re: [PATCH v3 2/2] app/testpmd: support TCP TSO in Tx only mode
Date: Tue, 15 Nov 2022 12:43:31 +0000	[thread overview]
Message-ID: <40388ec7-c314-db18-8571-e29f1ab84e8a@amd.com> (raw)
In-Reply-To: <20221111090423.1600091-3-andrew.rybchenko@oktetlabs.ru>

On 11/11/2022 9:04 AM, Andrew Rybchenko wrote:
> @@ -459,11 +486,16 @@ tx_only_begin(portid_t pi)
>   {
>   	uint16_t pkt_hdr_len, pkt_data_len;
>   	int dynf;
> -	uint8_t ip_proto = IPPROTO_UDP;
> +	uint8_t ip_proto;
>   
>   	pkt_hdr_len = (uint16_t)(sizeof(struct rte_ether_hdr) +
>   				 sizeof(struct rte_ipv4_hdr));
> +
> +	ip_proto = txonly_tso_segsz > 0 ? IPPROTO_TCP : IPPROTO_UDP;

Instead of detecting protocol via txonly_tso_segsz, what about 
introducing '--tx-tcp' and use it?
I put some more comment to have tcp specific parameters in prev version 
of the patch.

As far as I understand, '--tx-udp'/'--tx-tcp' parameters are optional, 
that is why to detect protocol we can:
a) Use UDP by default if '--tx-udp'/'--tx-tcp' not provided
b) Have another argument to set protocol explicitly, something like 
'--tx-proto='. In this case it is better to have '--tx-udp'/'--tx-tcp' 
parameter as '--tx-l4-port', because otherwise protocol information will 
be duplicated (need to check against '--tx-proto=txp --tx-udp' etc..).

I think both of us think it is not good idea to change existing 
parameter name, that is why I prefer option a) above, what do you think?



>   	switch (ip_proto) {
> +	case IPPROTO_TCP:
> +		pkt_hdr_len += sizeof(struct rte_tcp_hdr);
> +		break;
>   	case IPPROTO_UDP:
>   		pkt_hdr_len += sizeof(struct rte_udp_hdr);
>   		break;


      reply	other threads:[~2022-11-15 12:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-17 14:41 [PATCH 0/2] " Andrew Rybchenko
2022-10-17 14:41 ` [PATCH 1/2] app/testpmd: prepare to support TCP " Andrew Rybchenko
2022-10-19 16:39   ` Ferruh Yigit
2022-11-11  8:36     ` Andrew Rybchenko
2022-11-11  8:54       ` Andrew Rybchenko
2022-11-15 12:32       ` Ferruh Yigit
2022-10-17 14:41 ` [PATCH 2/2] app/testpmd: support TCP TSO " Andrew Rybchenko
2022-10-19 16:41   ` Ferruh Yigit
2022-11-11  8:44     ` Andrew Rybchenko
2022-11-11  9:04 ` [PATCH v3 0/2] " Andrew Rybchenko
2022-11-11  9:04   ` [PATCH v3 1/2] app/testpmd: prepare to support TCP " Andrew Rybchenko
2022-11-11  9:04   ` [PATCH v3 2/2] app/testpmd: support TCP TSO " Andrew Rybchenko
2022-11-15 12:43     ` Ferruh Yigit [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40388ec7-c314-db18-8571-e29f1ab84e8a@amd.com \
    --to=ferruh.yigit@amd.com \
    --cc=aman.deep.singh@intel.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=georgiy.levashov@oktetlabs.ru \
    --cc=ivan.ilchenko@oktetlabs.ru \
    --cc=yuying.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).