net/ice/base: add various headers

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>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
This commit is contained in:
Paul M Stillwell Jr 2018-12-18 16:46:20 +08:00 committed by Ferruh Yigit
parent 453d087cca
commit 2d2bdc0267
4 changed files with 94 additions and 0 deletions

View File

@ -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_ */

View File

@ -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_ */

View File

@ -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_ */

View File

@ -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_ */