DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Aman Singh <aman.deep.singh@intel.com>,
	Thomas Monjalon <thomas@monjalon.net>,
	David Marchand <david.marchand@redhat.com>
Cc: <dev@dpdk.org>
Subject: Re: [PATCH] devtools/cocci: add script for ethdev namespace
Date: Fri, 26 Nov 2021 16:37:03 +0000	[thread overview]
Message-ID: <23df5155-2418-ee1b-949b-383c816b9eb8@intel.com> (raw)
In-Reply-To: <b5febe1b-30c4-3f7b-a3b9-603c6d3c1051@intel.com>

On 11/25/2021 6:41 PM, Ferruh Yigit wrote:
> On 11/23/2021 8:47 AM, Aman Singh wrote:
>> The cocci script is to help add prefix 'RTE_ETH' namespace to enum
>> & macro of ethdev library. It helps in automating these changes for
>> applications. The script won't make changes in the code comment part.
>> Usage: spatch <script path> <app path>
>>
> 
> Hi Aman,
> 
> I am trying to test the script, I thought an easy way can be to run
> the script in an old version of the DPDK release and expecting it
> build successfully after script run.
> For that I am using 'spatch --include-headers --in-place' option on p
> the repo.
> 
> Getting build error for the OFFLOAD macros, header files seems not
> updated for the offloads, but .c files are updated.
> Like:
> DEV_TX_OFFLOAD_TCP_CKSUM --> RTE_ETH_TX_OFFLOAD_TCP_CKSUM
> DEV_RX_OFFLOAD_UDP_CKSUM --> RTE_ETH_RX_OFFLOAD_UDP_CKSUM
> ...
> 
> Am I missing something, or .h left out intentionally?
> Is there a way to update all?
> 

What I missed was script is not updating "#define ..." usage,
this make sense since target is for applications to update their code,
so script should update usage, not defines.

And as I tested with v21.08 with latest ethdev.h defines, some macros
seems not updated:
ETH_TUNNEL_FILTER_*
ETH_SPEED_NUM_*

Deprecated and removed macros are not updated, like:
RTE_ETH_DCB_NONE

And for some cases, like a new PMD specific macro is defined using
old existing macros, old macros are not updated.


Except from above issues, script updates majority of the macros,
and can be useful for application developers, also script can be
improved more later.

With above notes:
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>


>> Signed-off-by: Aman Singh <aman.deep.singh@intel.com>

<...>

  reply	other threads:[~2021-11-26 16:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-23  8:47 Aman Singh
2021-11-25 18:41 ` Ferruh Yigit
2021-11-26 16:37   ` Ferruh Yigit [this message]
2021-11-26 16:58     ` Thomas Monjalon

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=23df5155-2418-ee1b-949b-383c816b9eb8@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=aman.deep.singh@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=thomas@monjalon.net \
    /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).