DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Nicolau, Radu" <radu.nicolau@intel.com>
To: Akhil Goyal <gakhil@marvell.com>,
	Konstantin Ananyev <konstantin.ananyev@intel.com>,
	Bernard Iremonger <bernard.iremonger@intel.com>,
	Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, Anoob Joseph <anoobj@marvell.com>,
	"Declan Doherty" <declan.doherty@intel.com>,
	Abhijit Sinha <abhijit.sinha@intel.com>,
	 Daniel Martin Buckley <daniel.m.buckley@intel.com>,
	Fan Zhang <roy.fan.zhang@intel.com>
Subject: Re: [dpdk-dev] [EXT] [PATCH 1/2] ipsec: add transmit segmentation offload support
Date: Tue, 26 Oct 2021 16:50:35 +0100	[thread overview]
Message-ID: <ff200f9b-e897-1f15-f832-3b4e00737f70@intel.com> (raw)
In-Reply-To: <CO6PR18MB4484B3BFB396C620855D5263D8839@CO6PR18MB4484.namprd18.prod.outlook.com>

Hi Akhil, I will address all issues except the last one with a comment 
below:

>> -	n = num;
>> -	sqn = esn_outb_update_sqn(sa, &n);
>> -	if (n != num)
>> +	n_sqn = nb_segs_t;
>> +	sqn = esn_outb_update_sqn(sa, &n_sqn);
>> +	if (n_sqn != nb_segs_t) {
>>   		rte_errno = EOVERFLOW;
> If it is an error condition, shouldn't we return.
> Also, I do not see rte_errno being checked anywhere in the app/test or ipsec-secgw.
We are sending all packets that don't cause a SN overflow, and we set 
the error flag. The user will see that not all packets were sent and and 
rte_errno, and this is the behaviour that was in place before this patch.
>
>> +		/* if there are segmented packets find out how many can be
>> +		 * sent until overflow occurs
>> +		 */
>> +		if (nb_segs_t > num) { /* there is at least 1 */
>> +			uint32_t seg_cnt = 0;
>> +			for (i = 0; i < num && seg_cnt < n_sqn; i++)
>> +				seg_cnt += nb_segs[i];
>> +			num = i - 1;
>> +		} else {
>> +			num = n_sqn; /* no segmented packets */
>> +		}
>> +	}
>>

  reply	other threads:[~2021-10-26 15:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-18 14:58 [dpdk-dev] [PATCH 0/2] " Radu Nicolau
2021-10-18 14:58 ` [dpdk-dev] [PATCH 1/2] " Radu Nicolau
2021-10-25  9:11   ` [dpdk-dev] [EXT] " Akhil Goyal
2021-10-26 15:50     ` Nicolau, Radu [this message]
2021-10-18 14:58 ` [dpdk-dev] [PATCH 2/2] examples/ipsec-secgw: add support for TSO Radu Nicolau

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=ff200f9b-e897-1f15-f832-3b4e00737f70@intel.com \
    --to=radu.nicolau@intel.com \
    --cc=abhijit.sinha@intel.com \
    --cc=anoobj@marvell.com \
    --cc=bernard.iremonger@intel.com \
    --cc=daniel.m.buckley@intel.com \
    --cc=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    --cc=gakhil@marvell.com \
    --cc=konstantin.ananyev@intel.com \
    --cc=roy.fan.zhang@intel.com \
    --cc=vladimir.medvedkin@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).