Skip to content

Commit

Permalink
net/bnxt: use prefix on global function
Browse files Browse the repository at this point in the history
[ upstream commit c02bbaa ]

When statically linked the function prandom_bytes is exposed
and might conflict with something in application. All driver
functions should use the same prefix.

Fixes: 9738793 ("net/bnxt: add VNIC functions and structs")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
  • Loading branch information
shemminger authored and steevenlee committed Jun 8, 2021
1 parent 52d2337 commit 8965b66
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions drivers/net/bnxt/bnxt_flow.c
Expand Up @@ -1397,8 +1397,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,
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/bnxt/bnxt_vnic.c
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/bnxt/bnxt_vnic.h
Expand Up @@ -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);
Expand Down

0 comments on commit 8965b66

Please sign in to comment.