From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <wenzhuo.lu@intel.com>
Received: from mga09.intel.com (mga09.intel.com [134.134.136.24])
 by dpdk.org (Postfix) with ESMTP id 766B71B5C2
 for <dev@dpdk.org>; Mon, 17 Dec 2018 08:33:09 +0100 (CET)
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
Received: from orsmga002.jf.intel.com ([10.7.209.21])
 by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 16 Dec 2018 23:33:07 -0800
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.56,364,1539673200"; d="scan'208";a="118899182"
Received: from dpdk26.sh.intel.com ([10.67.110.164])
 by orsmga002.jf.intel.com with ESMTP; 16 Dec 2018 23:33:07 -0800
From: Wenzhuo Lu <wenzhuo.lu@intel.com>
To: dev@dpdk.org
Cc: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Date: Mon, 17 Dec 2018 15:37:19 +0800
Message-Id: <1545032259-77179-12-git-send-email-wenzhuo.lu@intel.com>
X-Mailer: git-send-email 1.9.3
In-Reply-To: <1545032259-77179-1-git-send-email-wenzhuo.lu@intel.com>
References: <1542956179-80951-1-git-send-email-wenzhuo.lu@intel.com>
 <1545032259-77179-1-git-send-email-wenzhuo.lu@intel.com>
Subject: [dpdk-dev] [PATCH v5 11/31] net/ice/base: add various headers
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Mon, 17 Dec 2018 07:33:10 -0000

From: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>

Add various headers that define status codes and
basic defines for use in the code.

Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
---
 drivers/net/ice/base/ice_alloc.h     | 22 ++++++++++++++++++
 drivers/net/ice/base/ice_flex_type.h | 19 +++++++++++++++
 drivers/net/ice/base/ice_flow.h      |  8 +++++++
 drivers/net/ice/base/ice_status.h    | 45 ++++++++++++++++++++++++++++++++++++
 4 files changed, 94 insertions(+)
 create mode 100644 drivers/net/ice/base/ice_alloc.h
 create mode 100644 drivers/net/ice/base/ice_flex_type.h
 create mode 100644 drivers/net/ice/base/ice_flow.h
 create mode 100644 drivers/net/ice/base/ice_status.h

diff --git a/drivers/net/ice/base/ice_alloc.h b/drivers/net/ice/base/ice_alloc.h
new file mode 100644
index 0000000..7883104
--- /dev/null
+++ b/drivers/net/ice/base/ice_alloc.h
@@ -0,0 +1,22 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2001-2018
+ */
+
+#ifndef _ICE_ALLOC_H_
+#define _ICE_ALLOC_H_
+
+/* Memory types */
+enum ice_memset_type {
+	ICE_NONDMA_MEM = 0,
+	ICE_DMA_MEM
+};
+
+/* Memcpy types */
+enum ice_memcpy_type {
+	ICE_NONDMA_TO_NONDMA = 0,
+	ICE_NONDMA_TO_DMA,
+	ICE_DMA_TO_DMA,
+	ICE_DMA_TO_NONDMA
+};
+
+#endif /* _ICE_ALLOC_H_ */
diff --git a/drivers/net/ice/base/ice_flex_type.h b/drivers/net/ice/base/ice_flex_type.h
new file mode 100644
index 0000000..84a38cb
--- /dev/null
+++ b/drivers/net/ice/base/ice_flex_type.h
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2001-2018
+ */
+
+#ifndef _ICE_FLEX_TYPE_H_
+#define _ICE_FLEX_TYPE_H_
+
+/* Extraction Sequence (Field Vector) Table */
+struct ice_fv_word {
+	u8 prot_id;
+	u8 off;		/* Offset within the protocol header */
+};
+
+#define ICE_MAX_FV_WORDS 48
+struct ice_fv {
+	struct ice_fv_word ew[ICE_MAX_FV_WORDS];
+};
+
+#endif /* _ICE_FLEX_TYPE_H_ */
diff --git a/drivers/net/ice/base/ice_flow.h b/drivers/net/ice/base/ice_flow.h
new file mode 100644
index 0000000..228a2c0
--- /dev/null
+++ b/drivers/net/ice/base/ice_flow.h
@@ -0,0 +1,8 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2001-2018
+ */
+
+#ifndef _ICE_FLOW_H_
+#define _ICE_FLOW_H_
+
+#endif /* _ICE_FLOW_H_ */
diff --git a/drivers/net/ice/base/ice_status.h b/drivers/net/ice/base/ice_status.h
new file mode 100644
index 0000000..898bfa6
--- /dev/null
+++ b/drivers/net/ice/base/ice_status.h
@@ -0,0 +1,45 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2001-2018
+ */
+
+#ifndef _ICE_STATUS_H_
+#define _ICE_STATUS_H_
+
+/* Error Codes */
+enum ice_status {
+	ICE_SUCCESS				= 0,
+
+	/* Generic codes : Range -1..-49 */
+	ICE_ERR_PARAM				= -1,
+	ICE_ERR_NOT_IMPL			= -2,
+	ICE_ERR_NOT_READY			= -3,
+	ICE_ERR_BAD_PTR				= -5,
+	ICE_ERR_INVAL_SIZE			= -6,
+	ICE_ERR_DEVICE_NOT_SUPPORTED		= -8,
+	ICE_ERR_RESET_FAILED			= -9,
+	ICE_ERR_FW_API_VER			= -10,
+	ICE_ERR_NO_MEMORY			= -11,
+	ICE_ERR_CFG				= -12,
+	ICE_ERR_OUT_OF_RANGE			= -13,
+	ICE_ERR_ALREADY_EXISTS			= -14,
+	ICE_ERR_DOES_NOT_EXIST			= -15,
+	ICE_ERR_IN_USE				= -16,
+	ICE_ERR_MAX_LIMIT			= -17,
+	ICE_ERR_RESET_ONGOING			= -18,
+	ICE_ERR_HW_TABLE			= -19,
+
+	/* NVM specific error codes: Range -50..-59 */
+	ICE_ERR_NVM				= -50,
+	ICE_ERR_NVM_CHECKSUM			= -51,
+	ICE_ERR_BUF_TOO_SHORT			= -52,
+	ICE_ERR_NVM_BLANK_MODE			= -53,
+
+	/* ARQ/ASQ specific error codes. Range -100..-109 */
+	ICE_ERR_AQ_ERROR			= -100,
+	ICE_ERR_AQ_TIMEOUT			= -101,
+	ICE_ERR_AQ_FULL				= -102,
+	ICE_ERR_AQ_NO_WORK			= -103,
+	ICE_ERR_AQ_EMPTY			= -104,
+};
+
+#endif /* _ICE_STATUS_H_ */
-- 
1.9.3