1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright (c) 2015-2019 Amazon.com, Inc. or its affiliates. 3 * All rights reserved. 4 */ 5 6 #ifndef __ENA_PLATFORM_H__ 7 #define __ENA_PLATFORM_H__ 8 9 #define swap16_to_le(x) (x) 10 11 #define swap32_to_le(x) (x) 12 13 #define swap64_to_le(x) (x) 14 15 #define swap16_from_le(x) (x) 16 17 #define swap32_from_le(x) (x) 18 19 #define swap64_from_le(x) (x) 20 21 #define ena_assert_msg(cond, msg) \ 22 do { \ 23 if (unlikely(!(cond))) { \ 24 rte_log(RTE_LOG_ERR, ena_logtype_driver, \ 25 "Assert failed on %s:%s:%d: ", \ 26 __FILE__, __func__, __LINE__); \ 27 rte_panic(msg); \ 28 } \ 29 } while (0) 30 31 #endif /* __ENA_PLATFORM_H__ */ 32