From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1219BA0546; Thu, 27 May 2021 17:27:53 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BCCD64115B; Thu, 27 May 2021 17:26:28 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 9C6DB41116 for ; Thu, 27 May 2021 17:26:24 +0200 (CEST) Received: by shelob.oktetlabs.ru (Postfix, from userid 122) id 72DCB7F601; Thu, 27 May 2021 18:26:24 +0300 (MSK) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shelob.oktetlabs.ru X-Spam-Level: * X-Spam-Status: No, score=1.6 required=5.0 tests=ALL_TRUSTED, DKIM_ADSP_DISCARD, UPPERCASE_50_75,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from aros.oktetlabs.ru (aros.oktetlabs.ru [192.168.38.17]) by shelob.oktetlabs.ru (Postfix) with ESMTP id 9059D7F60C; Thu, 27 May 2021 18:25:43 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 9059D7F60C Authentication-Results: shelob.oktetlabs.ru/9059D7F60C; dkim=none; dkim-atps=neutral From: Andrew Rybchenko To: dev@dpdk.org Cc: Andy Moreton Date: Thu, 27 May 2021 18:25:08 +0300 Message-Id: <20210527152510.1551026-19-andrew.rybchenko@oktetlabs.ru> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210527152510.1551026-1-andrew.rybchenko@oktetlabs.ru> References: <20210527152510.1551026-1-andrew.rybchenko@oktetlabs.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 18/20] common/sfc_efx/base: add packetiser packet format definition X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Packetiser composes packets with MAE counters update. Signed-off-by: Andrew Rybchenko Reviewed-by: Andy Moreton --- .../base/efx_regs_counters_pkt_format.h | 87 +++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 drivers/common/sfc_efx/base/efx_regs_counters_pkt_format.h diff --git a/drivers/common/sfc_efx/base/efx_regs_counters_pkt_format.h b/drivers/common/sfc_efx/base/efx_regs_counters_pkt_format.h new file mode 100644 index 0000000000..6610d07dc0 --- /dev/null +++ b/drivers/common/sfc_efx/base/efx_regs_counters_pkt_format.h @@ -0,0 +1,87 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * + * Copyright(c) 2020-2021 Xilinx, Inc. + */ + +#ifndef _SYS_EFX_REGS_COUNTERS_PKT_FORMAT_H +#define _SYS_EFX_REGS_COUNTERS_PKT_FORMAT_H + +/* + * Packetiser packet format definition. + * SF-122415-TC - OVS Counter Design Specification section 7 + * Primary copy of the header is located in the smartnic_registry repo: + * src/ovs_counter/packetiser_packet_format.h + */ + +/*------------------------------------------------------------*/ +/* + * ER_RX_SL_PACKETISER_HEADER_WORD(160bit): + * + */ +#define ER_RX_SL_PACKETISER_HEADER_WORD_SIZE 20 + +#define ERF_SC_PACKETISER_HEADER_VERSION_LBN 0 +#define ERF_SC_PACKETISER_HEADER_VERSION_WIDTH 8 +/* Deprecated, use ERF_SC_PACKETISER_HEADER_VERSION_2 instead */ +#define ERF_SC_PACKETISER_HEADER_VERSION_VALUE 2 +#define ERF_SC_PACKETISER_HEADER_VERSION_2 2 +#define ERF_SC_PACKETISER_HEADER_IDENTIFIER_LBN 8 +#define ERF_SC_PACKETISER_HEADER_IDENTIFIER_WIDTH 8 +#define ERF_SC_PACKETISER_HEADER_IDENTIFIER_AR 0 +#define ERF_SC_PACKETISER_HEADER_IDENTIFIER_CT 1 +#define ERF_SC_PACKETISER_HEADER_HEADER_OFFSET_LBN 16 +#define ERF_SC_PACKETISER_HEADER_HEADER_OFFSET_WIDTH 8 +#define ERF_SC_PACKETISER_HEADER_HEADER_OFFSET_DEFAULT 0x4 +#define ERF_SC_PACKETISER_HEADER_PAYLOAD_OFFSET_LBN 24 +#define ERF_SC_PACKETISER_HEADER_PAYLOAD_OFFSET_WIDTH 8 +#define ERF_SC_PACKETISER_HEADER_PAYLOAD_OFFSET_DEFAULT 0x14 +#define ERF_SC_PACKETISER_HEADER_INDEX_LBN 32 +#define ERF_SC_PACKETISER_HEADER_INDEX_WIDTH 16 +#define ERF_SC_PACKETISER_HEADER_COUNT_LBN 48 +#define ERF_SC_PACKETISER_HEADER_COUNT_WIDTH 16 +#define ERF_SC_PACKETISER_HEADER_RESERVED_0_LBN 64 +#define ERF_SC_PACKETISER_HEADER_RESERVED_0_WIDTH 32 +#define ERF_SC_PACKETISER_HEADER_RESERVED_1_LBN 96 +#define ERF_SC_PACKETISER_HEADER_RESERVED_1_WIDTH 32 +#define ERF_SC_PACKETISER_HEADER_RESERVED_2_LBN 128 +#define ERF_SC_PACKETISER_HEADER_RESERVED_2_WIDTH 32 + + +/*------------------------------------------------------------*/ +/* + * ER_RX_SL_PACKETISER_PAYLOAD_WORD(128bit): + * + */ +#define ER_RX_SL_PACKETISER_PAYLOAD_WORD_SIZE 16 + +#define ERF_SC_PACKETISER_PAYLOAD_COUNTER_INDEX_LBN 0 +#define ERF_SC_PACKETISER_PAYLOAD_COUNTER_INDEX_WIDTH 24 +#define ERF_SC_PACKETISER_PAYLOAD_RESERVED_LBN 24 +#define ERF_SC_PACKETISER_PAYLOAD_RESERVED_WIDTH 8 +#define ERF_SC_PACKETISER_PAYLOAD_PACKET_COUNT_OFST 4 +#define ERF_SC_PACKETISER_PAYLOAD_PACKET_COUNT_SIZE 6 +#define ERF_SC_PACKETISER_PAYLOAD_PACKET_COUNT_LBN 32 +#define ERF_SC_PACKETISER_PAYLOAD_PACKET_COUNT_WIDTH 48 +#define ERF_SC_PACKETISER_PAYLOAD_PACKET_COUNT_LO_OFST 4 +#define ERF_SC_PACKETISER_PAYLOAD_PACKET_COUNT_LO_SIZE 4 +#define ERF_SC_PACKETISER_PAYLOAD_PACKET_COUNT_LO_LBN 32 +#define ERF_SC_PACKETISER_PAYLOAD_PACKET_COUNT_LO_WIDTH 32 +#define ERF_SC_PACKETISER_PAYLOAD_PACKET_COUNT_HI_OFST 8 +#define ERF_SC_PACKETISER_PAYLOAD_PACKET_COUNT_HI_SIZE 2 +#define ERF_SC_PACKETISER_PAYLOAD_PACKET_COUNT_HI_LBN 64 +#define ERF_SC_PACKETISER_PAYLOAD_PACKET_COUNT_HI_WIDTH 16 +#define ERF_SC_PACKETISER_PAYLOAD_BYTE_COUNT_OFST 10 +#define ERF_SC_PACKETISER_PAYLOAD_BYTE_COUNT_SIZE 6 +#define ERF_SC_PACKETISER_PAYLOAD_BYTE_COUNT_LBN 80 +#define ERF_SC_PACKETISER_PAYLOAD_BYTE_COUNT_WIDTH 48 +#define ERF_SC_PACKETISER_PAYLOAD_BYTE_COUNT_LO_OFST 10 +#define ERF_SC_PACKETISER_PAYLOAD_BYTE_COUNT_LO_SIZE 2 +#define ERF_SC_PACKETISER_PAYLOAD_BYTE_COUNT_LO_LBN 80 +#define ERF_SC_PACKETISER_PAYLOAD_BYTE_COUNT_LO_WIDTH 16 +#define ERF_SC_PACKETISER_PAYLOAD_BYTE_COUNT_HI_OFST 12 +#define ERF_SC_PACKETISER_PAYLOAD_BYTE_COUNT_HI_SIZE 4 +#define ERF_SC_PACKETISER_PAYLOAD_BYTE_COUNT_HI_LBN 96 +#define ERF_SC_PACKETISER_PAYLOAD_BYTE_COUNT_HI_WIDTH 32 + + +#endif /* _SYS_EFX_REGS_COUNTERS_PKT_FORMAT_H */ -- 2.30.2