DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Medvedkin, Vladimir" <vladimir.medvedkin@intel.com>
To: "Stanisław Kardach" <kda@semihalf.com>
Cc: Michal Mazurek <maz@semihalf.com>, dev <dev@dpdk.org>,
	Frank Zhao <Frank.Zhao@starfivetech.com>,
	Sam Grove <sam.grove@sifive.com>,
	"Marcin Wojtas" <mw@semihalf.com>, <upstream@semihalf.com>,
	Bruce Richardson <bruce.richardson@intel.com>
Subject: Re: [PATCH 1/1] lpm: add a scalar version of lookupx4 function
Date: Fri, 27 May 2022 14:16:45 +0100	[thread overview]
Message-ID: <f4c6a89e-91b9-3faf-99fd-8c845f89bb2b@intel.com> (raw)
In-Reply-To: <CALVGJW+T7gFhOxYQDTb+GaNyHN2t_=G9hV9jERJwLA6=ct+xkQ@mail.gmail.com>

Hi Stanislaw,

On 27/05/2022 12:16, Stanisław Kardach wrote:
> On Tue, May 24, 2022 at 6:28 PM Stanisław Kardach <kda@semihalf.com> wrote:
> <snip>
>> That said I wonder why do we have different const requirements for
>> rte_lpm_lookup() and rte_lpm_lookupx4():
>>    static inline int rte_lpm_lookup(struct rte_lpm *lpm, uint32_t ip,
>> uint32_t *next_hop)
>>    static inline void rte_lpm_lookupx4(const struct rte_lpm *lpm, xmm_t
>> ip, uint32_t hop[4], uint32_t defv);
>> I think both should be const.
>>
> To re-iterate the question, should I also post a patch for changing
> rte_lpm_lookup() to add "const" to "struct rte_lpm *lpm" argument?
> rte_lpm_lookup_bulk_func() and rte_lpm_lookupx4() already take lpm as
> const.
> I'm pushing because otherwise I get a const discard warning in the
> scalar version of rte_lpm_lookupx4() utilizing rte_lpm_lookup().

Since these are inline functions, there will be no problems with the 
ABI/API, so please add const to the *lpm argument.

Thanks!

> 
> Best Regards,
> Stanislaw Kardach

-- 
Regards,
Vladimir

  reply	other threads:[~2022-05-27 13:17 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-10 11:58 Stanislaw Kardach
2022-05-19 17:02 ` Medvedkin, Vladimir
2022-05-24 16:28   ` Stanisław Kardach
2022-05-27 11:16     ` Stanisław Kardach
2022-05-27 13:16       ` Medvedkin, Vladimir [this message]
2022-05-27 18:18 ` [PATCH v2 1/2] lpm: add const to lpm arg of rte_lpm_lookup Stanislaw Kardach
2022-05-27 18:18   ` [PATCH v2 2/2] lpm: add a scalar version of lookupx4 function Stanislaw Kardach
2022-05-27 20:15     ` Stephen Hemminger
2022-05-30  7:52       ` Bruce Richardson
2022-05-30  8:00         ` Morten Brørup
2022-05-30 10:42           ` Bruce Richardson
2022-05-30 11:20             ` Stanisław Kardach
2022-05-30 12:46               ` Bruce Richardson
2022-05-30 18:24   ` [PATCH v3 1/2] lpm: add const to lpm arg of rte_lpm_lookup Stanislaw Kardach
2022-05-30 18:24     ` [PATCH v3 2/2] lpm: add a scalar version of lookupx4 function Stanislaw Kardach
2022-06-01  9:41       ` Medvedkin, Vladimir
2022-06-01 10:32         ` Stanisław Kardach
2022-05-30 20:38     ` [PATCH v3 1/2] lpm: add const to lpm arg of rte_lpm_lookup Stephen Hemminger
2022-06-01  9:35     ` Medvedkin, Vladimir

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=f4c6a89e-91b9-3faf-99fd-8c845f89bb2b@intel.com \
    --to=vladimir.medvedkin@intel.com \
    --cc=Frank.Zhao@starfivetech.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=kda@semihalf.com \
    --cc=maz@semihalf.com \
    --cc=mw@semihalf.com \
    --cc=sam.grove@sifive.com \
    --cc=upstream@semihalf.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).