[dpdk-dev] [EXT] [PATCH 1/2] ipsec: add transmit segmentation offload support
Nicolau, Radu
radu.nicolau at intel.com
Tue Oct 26 17:50:35 CEST 2021
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 */
>> + }
>> + }
>>
More information about the dev
mailing list