18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
28c2ecf20Sopenharmony_ci/* Copyright (c) 2015-2018 Mellanox Technologies. All rights reserved */
38c2ecf20Sopenharmony_ci
48c2ecf20Sopenharmony_ci#ifndef _MLXSW_TXHEADER_H
58c2ecf20Sopenharmony_ci#define _MLXSW_TXHEADER_H
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ci#define MLXSW_TXHDR_LEN 0x10
88c2ecf20Sopenharmony_ci#define MLXSW_TXHDR_VERSION_0 0
98c2ecf20Sopenharmony_ci#define MLXSW_TXHDR_VERSION_1 1
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_cienum {
128c2ecf20Sopenharmony_ci	MLXSW_TXHDR_ETH_CTL,
138c2ecf20Sopenharmony_ci	MLXSW_TXHDR_ETH_DATA,
148c2ecf20Sopenharmony_ci};
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ci#define MLXSW_TXHDR_PROTO_ETH 1
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_cienum {
198c2ecf20Sopenharmony_ci	MLXSW_TXHDR_ETCLASS_0,
208c2ecf20Sopenharmony_ci	MLXSW_TXHDR_ETCLASS_1,
218c2ecf20Sopenharmony_ci	MLXSW_TXHDR_ETCLASS_2,
228c2ecf20Sopenharmony_ci	MLXSW_TXHDR_ETCLASS_3,
238c2ecf20Sopenharmony_ci	MLXSW_TXHDR_ETCLASS_4,
248c2ecf20Sopenharmony_ci	MLXSW_TXHDR_ETCLASS_5,
258c2ecf20Sopenharmony_ci	MLXSW_TXHDR_ETCLASS_6,
268c2ecf20Sopenharmony_ci	MLXSW_TXHDR_ETCLASS_7,
278c2ecf20Sopenharmony_ci};
288c2ecf20Sopenharmony_ci
298c2ecf20Sopenharmony_cienum {
308c2ecf20Sopenharmony_ci	MLXSW_TXHDR_RDQ_OTHER,
318c2ecf20Sopenharmony_ci	MLXSW_TXHDR_RDQ_EMAD = 0x1f,
328c2ecf20Sopenharmony_ci};
338c2ecf20Sopenharmony_ci
348c2ecf20Sopenharmony_ci#define MLXSW_TXHDR_CTCLASS3 0
358c2ecf20Sopenharmony_ci#define MLXSW_TXHDR_CPU_SIG 0
368c2ecf20Sopenharmony_ci#define MLXSW_TXHDR_SIG 0xE0E0
378c2ecf20Sopenharmony_ci#define MLXSW_TXHDR_STCLASS_NONE 0
388c2ecf20Sopenharmony_ci
398c2ecf20Sopenharmony_cienum {
408c2ecf20Sopenharmony_ci	MLXSW_TXHDR_NOT_EMAD,
418c2ecf20Sopenharmony_ci	MLXSW_TXHDR_EMAD,
428c2ecf20Sopenharmony_ci};
438c2ecf20Sopenharmony_ci
448c2ecf20Sopenharmony_cienum {
458c2ecf20Sopenharmony_ci	MLXSW_TXHDR_TYPE_DATA,
468c2ecf20Sopenharmony_ci	MLXSW_TXHDR_TYPE_CONTROL = 6,
478c2ecf20Sopenharmony_ci};
488c2ecf20Sopenharmony_ci
498c2ecf20Sopenharmony_ci#endif
50