summaryrefslogtreecommitdiffstats
path: root/src/spdk/dpdk/drivers/net/bnxt/bnxt_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/spdk/dpdk/drivers/net/bnxt/bnxt_util.c')
-rw-r--r--src/spdk/dpdk/drivers/net/bnxt/bnxt_util.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/spdk/dpdk/drivers/net/bnxt/bnxt_util.c b/src/spdk/dpdk/drivers/net/bnxt/bnxt_util.c
new file mode 100644
index 00000000..7d334271
--- /dev/null
+++ b/src/spdk/dpdk/drivers/net/bnxt/bnxt_util.c
@@ -0,0 +1,18 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2014-2018 Broadcom
+ * All rights reserved.
+ */
+
+#include <inttypes.h>
+
+#include "bnxt_util.h"
+
+int bnxt_check_zero_bytes(const uint8_t *bytes, int len)
+{
+ int i;
+
+ for (i = 0; i < len; i++)
+ if (bytes[i] != 0x00)
+ return 0;
+ return 1;
+}