Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Linux/drivers/net/ethernet/freescale/enetc/   (Open Source Betriebssystem Version 6.17.9©)  Datei vom 24.10.2025 mit Größe 2 kB image not shown  

Quelle  ntmp_private.h   Sprache: C

 
/* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */
/*
 * NTMP table request and response data buffer formats
 * Copyright 2025 NXP
 */


#ifndef __NTMP_PRIVATE_H
#define __NTMP_PRIVATE_H

#include <linux/bitfield.h>
#include <linux/fsl/ntmp.h>

#define NTMP_EID_REQ_LEN 8
#define NETC_CBDR_BD_NUM 256

union netc_cbd {
 struct {
  __le64 addr;
  __le32 len;
#define NTMP_RESP_LEN  GENMASK(19, 0)
#define NTMP_REQ_LEN  GENMASK(31, 20)
#define NTMP_LEN(req, resp) (FIELD_PREP(NTMP_REQ_LEN, (req)) | \
    ((resp) & NTMP_RESP_LEN))
  u8 cmd;
#define NTMP_CMD_DELETE  BIT(0)
#define NTMP_CMD_UPDATE  BIT(1)
#define NTMP_CMD_QUERY  BIT(2)
#define NTMP_CMD_ADD  BIT(3)
#define NTMP_CMD_QU  (NTMP_CMD_QUERY | NTMP_CMD_UPDATE)
  u8 access_method;
#define NTMP_ACCESS_METHOD GENMASK(7, 4)
#define NTMP_AM_ENTRY_ID 0
#define NTMP_AM_EXACT_KEY 1
#define NTMP_AM_SEARCH  2
#define NTMP_AM_TERNARY_KEY 3
  u8 table_id;
  u8 ver_cci_rr;
#define NTMP_HDR_VERSION GENMASK(5, 0)
#define NTMP_HDR_VER2  2
#define NTMP_CCI  BIT(6)
#define NTMP_RR   BIT(7)
  __le32 resv[3];
  __le32 npf;
#define NTMP_NPF  BIT(15)
 } req_hdr; /* NTMP Request Message Header Format */

 struct {
  __le32 resv0[3];
  __le16 num_matched;
  __le16 error_rr;
#define NTMP_RESP_ERROR  GENMASK(11, 0)
#define NTMP_RESP_RR  BIT(15)
  __le32 resv1[4];
 } resp_hdr; /* NTMP Response Message Header Format */
};

struct ntmp_dma_buf {
 struct device *dev;
 size_t size;
 void *buf;
 dma_addr_t dma;
};

struct ntmp_cmn_req_data {
 __le16 update_act;
 u8 dbg_opt;
 u8 tblv_qact;
#define NTMP_QUERY_ACT  GENMASK(3, 0)
#define NTMP_TBL_VER  GENMASK(7, 4)
#define NTMP_TBLV_QACT(v, a) (FIELD_PREP(NTMP_TBL_VER, (v)) | \
     ((a) & NTMP_QUERY_ACT))
};

struct ntmp_cmn_resp_query {
 __le32 entry_id;
};

/* Generic structure for request data by entry ID  */
struct ntmp_req_by_eid {
 struct ntmp_cmn_req_data crd;
 __le32 entry_id;
};

/* MAC Address Filter Table Request Data Buffer Format of Add action */
struct maft_req_add {
 struct ntmp_req_by_eid rbe;
 struct maft_keye_data keye;
 struct maft_cfge_data cfge;
};

/* MAC Address Filter Table Response Data Buffer Format of Query action */
struct maft_resp_query {
 __le32 entry_id;
 struct maft_keye_data keye;
 struct maft_cfge_data cfge;
};

/* RSS Table Request Data Buffer Format of Update action */
struct rsst_req_update {
 struct ntmp_req_by_eid rbe;
 u8 groups[];
};

#endif

Messung V0.5
C=98 H=91 G=94

¤ Dauer der Verarbeitung: 0.0 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.