DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: dpdk-dev <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] net/bnxt: use bnxt_ prefix on global function
Date: Sat, 24 Apr 2021 12:39:05 -0700	[thread overview]
Message-ID: <CACZ4nhvz9dhYMpXEXtfFLXf8uZzVZPVVHmfNmG8q4oZx1RHP2A@mail.gmail.com> (raw)
In-Reply-To: <20210423210444.197230-1-stephen@networkplumber.org>

[-- Attachment #1: Type: text/plain, Size: 3109 bytes --]

On Fri, Apr 23, 2021 at 2:04 PM Stephen Hemminger
<stephen@networkplumber.org> wrote:
>
> When statically linked the function prandom_bytes is exposed
> and might conflict with something in application. All driver
> functions should use same prefix.
>
> Fixes: 9738793f28ec ("net/bnxt: add VNIC functions and structs")
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Patch applied to dpdk-next-net-brcm. Thanks

> ---
>  drivers/net/bnxt/bnxt_flow.c | 4 ++--
>  drivers/net/bnxt/bnxt_vnic.c | 4 ++--
>  drivers/net/bnxt/bnxt_vnic.h | 2 +-
>  3 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
> index e3906b47791b..844bf1520f50 100644
> --- a/drivers/net/bnxt/bnxt_flow.c
> +++ b/drivers/net/bnxt/bnxt_flow.c
> @@ -1404,8 +1404,8 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,
>                                 /* If hash key has not been specified,
>                                  * use random hash key.
>                                  */
> -                               prandom_bytes(vnic->rss_hash_key,
> -                                             HW_HASH_KEY_SIZE);
> +                               bnxt_prandom_bytes(vnic->rss_hash_key,
> +                                                  HW_HASH_KEY_SIZE);
>                         } else {
>                                 if (rss->key_len > HW_HASH_KEY_SIZE)
>                                         memcpy(vnic->rss_hash_key,
> diff --git a/drivers/net/bnxt/bnxt_vnic.c b/drivers/net/bnxt/bnxt_vnic.c
> index 14ad33b4e86c..de5c14566deb 100644
> --- a/drivers/net/bnxt/bnxt_vnic.c
> +++ b/drivers/net/bnxt/bnxt_vnic.c
> @@ -16,7 +16,7 @@
>   * VNIC Functions
>   */
>
> -void prandom_bytes(void *dest_ptr, size_t len)
> +void bnxt_prandom_bytes(void *dest_ptr, size_t len)
>  {
>         char *dest = (char *)dest_ptr;
>         uint64_t rb;
> @@ -172,7 +172,7 @@ int bnxt_alloc_vnic_attributes(struct bnxt *bp)
>                                 HW_HASH_KEY_SIZE);
>                 vnic->mc_list_dma_addr = vnic->rss_hash_key_dma_addr +
>                                 HW_HASH_KEY_SIZE;
> -               prandom_bytes(vnic->rss_hash_key, HW_HASH_KEY_SIZE);
> +               bnxt_prandom_bytes(vnic->rss_hash_key, HW_HASH_KEY_SIZE);
>         }
>
>         return 0;
> diff --git a/drivers/net/bnxt/bnxt_vnic.h b/drivers/net/bnxt/bnxt_vnic.h
> index 00a664c8b839..37b452f28170 100644
> --- a/drivers/net/bnxt/bnxt_vnic.h
> +++ b/drivers/net/bnxt/bnxt_vnic.h
> @@ -68,7 +68,7 @@ int bnxt_alloc_vnic_attributes(struct bnxt *bp);
>  void bnxt_free_vnic_mem(struct bnxt *bp);
>  int bnxt_alloc_vnic_mem(struct bnxt *bp);
>  int bnxt_vnic_grp_alloc(struct bnxt *bp, struct bnxt_vnic_info *vnic);
> -void prandom_bytes(void *dest_ptr, size_t len);
> +void bnxt_prandom_bytes(void *dest_ptr, size_t len);
>  uint16_t bnxt_rte_to_hwrm_hash_types(uint64_t rte_type);
>  int bnxt_rte_to_hwrm_hash_level(struct bnxt *bp, uint64_t hash_f, uint32_t lvl);
>  uint64_t bnxt_hwrm_to_rte_rss_level(struct bnxt *bp, uint32_t mode);
> --
> 2.30.2
>

      reply	other threads:[~2021-04-24 19:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-23 21:04 Stephen Hemminger
2021-04-24 19:39 ` Ajit Khaparde [this message]

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=CACZ4nhvz9dhYMpXEXtfFLXf8uZzVZPVVHmfNmG8q4oZx1RHP2A@mail.gmail.com \
    --to=ajit.khaparde@broadcom.com \
    --cc=dev@dpdk.org \
    --cc=stephen@networkplumber.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).