f-stack/dpdk/drivers/net/bnxt/bnxt_util.h

22 lines
457 B
C
Raw Normal View History

2019-06-25 11:12:58 +00:00
/* SPDX-License-Identifier: BSD-3-Clause
2022-09-06 04:00:10 +00:00
* Copyright(c) 2014-2021 Broadcom
2019-06-25 11:12:58 +00:00
* All rights reserved.
*/
#ifndef _BNXT_UTIL_H_
#define _BNXT_UTIL_H_
2020-06-18 16:55:50 +00:00
#ifndef BIT
#define BIT(n) (1UL << (n))
#endif /* BIT */
2022-09-06 04:00:10 +00:00
#ifndef BIT_MASK
#define BIT_MASK(len) (BIT(len) - 1)
#endif /* BIT_MASK */
2020-06-18 16:55:50 +00:00
2022-09-02 07:34:10 +00:00
#define PCI_SUBSYSTEM_ID_OFFSET 0x2e
2019-06-25 11:12:58 +00:00
int bnxt_check_zero_bytes(const uint8_t *bytes, int len);
2020-06-18 16:55:50 +00:00
void bnxt_eth_hw_addr_random(uint8_t *mac_addr);
2019-06-25 11:12:58 +00:00
#endif /* _BNXT_UTIL_H_ */