patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Radu Nicolau <radu.nicolau@intel.com>
To: David Marchand <david.marchand@redhat.com>
Cc: "Zhang, Qi Z" <qi.z.zhang@intel.com>,
	"Wu, Jingjing" <jingjing.wu@intel.com>,
	"Xing, Beilei" <beilei.xing@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [PATCH] net/iavf: fix IAVF_TX_OFFLOAD_MASK definition
Date: Wed, 25 Oct 2023 11:14:44 +0100	[thread overview]
Message-ID: <f4950df7-3042-b266-e2cf-abe1984a5e16@intel.com> (raw)
In-Reply-To: <CAJFAV8yqvb_shE+14jYctVo4KX=xQ863BAtzoWLQuCSP_Nwnaw@mail.gmail.com>


On 25-Oct-23 10:07 AM, David Marchand wrote:
> On Wed, Oct 25, 2023 at 11:02 AM Radu Nicolau <radu.nicolau@intel.com> wrote:
>>
>> On 25-Oct-23 12:30 AM, Zhang, Qi Z wrote:
>>>> -----Original Message-----
>>>> From: Nicolau, Radu <radu.nicolau@intel.com>
>>>> Sent: Tuesday, October 24, 2023 10:49 PM
>>>> To: Zhang, Qi Z <qi.z.zhang@intel.com>; Marchand, David
>>>> <david.marchand@redhat.com>
>>>> Cc: Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei <beilei.xing@intel.com>;
>>>> dev@dpdk.org; stable@dpdk.org
>>>> Subject: Re: [PATCH] net/iavf: fix IAVF_TX_OFFLOAD_MASK definition
>>>>
>>>>
>>>> On 24-Oct-23 12:24 PM, Zhang, Qi Z wrote:
>>>>>> -----Original Message-----
>>>>>> From: Radu Nicolau <radu.nicolau@intel.com>
>>>>>> Sent: Tuesday, October 24, 2023 6:23 PM
>>>>>> To: Marchand, David <david.marchand@redhat.com>
>>>>>> Cc: Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei
>>>>>> <beilei.xing@intel.com>; dev@dpdk.org; stable@dpdk.org
>>>>>> Subject: Re: [PATCH] net/iavf: fix IAVF_TX_OFFLOAD_MASK definition
>>>>>>
>>>>>>
>>>>>> On 24-Oct-23 10:49 AM, David Marchand wrote:
>>>>>>> On Tue, Oct 24, 2023 at 11:13 AM Radu Nicolau
>>>>>>> <radu.nicolau@intel.com>
>>>>>> wrote:
>>>>>>>> IAVF_TX_OFFLOAD_MASK definition contained
>>>>>> RTE_ETH_TX_OFFLOAD_SECURITY
>>>>>>>> instead of RTE_MBUF_F_TX_SEC_OFFLOAD.
>>>>>>>>
>>>>>>>> Fixes: 6bc987ecb860 ("net/iavf: support IPsec inline crypto")
>>>>>>>> Cc: stable@dpdk.org
>>>>>>>>
>>>>>>>> Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
>>>>>>> Something is not clear to me.
>>>>>>> How was the IPsec inline crypto feature supposed to work with this
>>>>>>> driver so far?
>>>>>>>
>>>>>>> Any packet with the RTE_MBUF_F_TX_SEC_OFFLOAD flag should have
>>>> been
>>>>>>> refused in iavf_prep_pkts.
>>>>>>>
>>>>>> It worked because the IPsec sample app doesn't call
>>>>>> rte_eth_tx_prepare, and from what I can see no other sample app does.
>>>>> To keep consistent, its better to refine the
>>>> IAVF_TX_OFFLOAD_NOTSUP_MASK definition.
>>>>
>>>> You mean like this?
>>>>
>>>>
>>>> #define IAVF_TX_OFFLOAD_NOTSUP_MASK ( \
>>>>            RTE_MBUF_F_TX_OFFLOAD_MASK ^ (  \
>>>>                RTE_MBUF_F_TX_OUTER_IPV6 |         \
>>>>                RTE_MBUF_F_TX_OUTER_IPV4 |         \
>>>>                RTE_MBUF_F_TX_IPV6 |             \
>>>>                RTE_MBUF_F_TX_IPV4 |             \
>>>>                RTE_MBUF_F_TX_VLAN |         \
>>>>                RTE_MBUF_F_TX_IP_CKSUM |         \
>>>>                RTE_MBUF_F_TX_L4_MASK |         \
>>>>                RTE_MBUF_F_TX_TCP_SEG |         \
>>>>                RTE_MBUF_F_TX_UDP_SEG |      \
>>>>                RTE_MBUF_F_TX_TUNNEL_MASK |    \
>>>>                RTE_MBUF_F_TX_OUTER_IP_CKSUM |  \
>>>>                RTE_MBUF_F_TX_OUTER_UDP_CKSUM | \
>>>>                RTE_MBUF_F_TX_SEC_OFFLOAD))
>>> Sorry, I miss understanding this code change, actually you didn't remove a flag, but just replace it,  NOTSUP_MASK no need to be changed
>>>
>>> Then I don't understand why "Any packet with the RTE_MBUF_F_TX_SEC_OFFLOAD flag should have refused in iavf_prep_pkts"
>>> But I assume tx_pkt_prepare should reject only invalid packets while still functioning correctly with inline IPsec.
>> rte_eth_tx_prepare would have rejected the packets before this fix, but
>> no app calls rte_eth_tx_prepare. The only app that calls it is testpmd.
>  From my understanding, applications that want checksum offload are
> required to call rte_eth_tx_prepare.

TBH I don't understand much about it and looking at the implementation 
actually made things worse: for example from what I can see calling it 
when RTE_MBUF_F_TX_TCP_CKSUM is set will result in having the TCP 
checksum being computed (in software) in the prepare function.


  reply	other threads:[~2023-10-25 10:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-24  9:13 Radu Nicolau
2023-10-24  9:49 ` David Marchand
2023-10-24 10:22   ` Radu Nicolau
2023-10-24 11:24     ` Zhang, Qi Z
2023-10-24 14:48       ` Radu Nicolau
2023-10-24 23:30         ` Zhang, Qi Z
2023-10-25  9:01           ` Radu Nicolau
2023-10-25  9:07             ` David Marchand
2023-10-25 10:14               ` Radu Nicolau [this message]
2023-10-25  1:50 ` Zhang, Qi Z

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=f4950df7-3042-b266-e2cf-abe1984a5e16@intel.com \
    --to=radu.nicolau@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=stable@dpdk.org \
    /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).