From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 32FE9A0526; Wed, 8 Jul 2020 20:49:37 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 42FE81DCBC; Wed, 8 Jul 2020 20:49:36 +0200 (CEST) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2057.outbound.protection.outlook.com [40.107.21.57]) by dpdk.org (Postfix) with ESMTP id 8CCCE1DC6E for ; Wed, 8 Jul 2020 20:49:35 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MXErbGMmgwsFS8FeBIBNUFYbOWJ4Bzl2J7L3Kj0QpG6N+0lEPX14buIvZf0iGHa8qdg6IzM9midnlxOJJN3bXoIMmvIWoKR7or26XhfYqMuVI974s5C4aKEl1GLeUUnTfoqCSD5G+CXLcoYbaVlWBCvJ5TiXwggqwMNxzZy2MfpKGJGqb6W4qlnL02f5aYRwc4C17YkjJrj57PpO03H4NQ7l117wC24pKsAa/pEQ5ENGutV+SBsnz42YNhVW6ulV/CgMHaflxPe9tgc8jEuFBeOyU989+8qYz4Wx5JTBzrWvAQCJTaBHJC3gQ5UndjhF1KKmHSkBs8SzRkgrqs8/aA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Bi8tYF10LlbIw2dJUERI42KHsKJIG1A/nouUPfN/STo=; b=O4rMFVaOm87rOepONEnmvN0RjJ0vrXF6Sa3vV0kRe1fiQaNjfBM2/t3HFdJ078BYCxu5cZg9l8Mo5RPOREdY/Vd7UgUwJDL7BJjHlSFA7ZEDUODHyG3Bl0jL6mPAtyfNXvYji80Flf7UA1fJ0U3K4Y2oloydLnmkUbXQ6ttulDpUOfgVEnbQG0caxBqXw2Y75xaPDt1MJnGwqUfA+FAu+1diOnbJvZlArafW+zV2u606Q8nndAqoFBYiqGSBCGwboFY6wkueAwg+88/yqe5aCC8H3zDLDygJHeyNNrncRJ+U4B5Dvl5fGENbBTytKL8L1cK3QYjChXgoZhT2/8RR4A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Bi8tYF10LlbIw2dJUERI42KHsKJIG1A/nouUPfN/STo=; b=TxaK5HQ6rMu23T8c9J/xa6IaO6Qkke7glfWji6bnWeD+UNEWOkiWDzwA1XCtgjwPFKFug1GJZ318DEDaTkJ1TwqUTalovUyzBuvJjEwzC5B6EtVw3WRSptd4z9CKKItSzCidfH/kCeuOnm64R9C0H/11I0m5O5O61cZYPMpecWs= Received: from VI1PR04MB3168.eurprd04.prod.outlook.com (2603:10a6:802:6::10) by VI1PR0402MB2752.eurprd04.prod.outlook.com (2603:10a6:800:b1::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.23; Wed, 8 Jul 2020 18:49:34 +0000 Received: from VI1PR04MB3168.eurprd04.prod.outlook.com ([fe80::b077:1fe4:d352:b464]) by VI1PR04MB3168.eurprd04.prod.outlook.com ([fe80::b077:1fe4:d352:b464%7]) with mapi id 15.20.3153.029; Wed, 8 Jul 2020 18:49:34 +0000 From: Akhil Goyal To: Bing Zhao , "orika@mellanox.com" , "john.mcnamara@intel.com" , "marko.kovacevic@intel.com" , "thomas@monjalon.net" , "ferruh.yigit@intel.com" , "arybchenko@solarflare.com" , "olivier.matz@6wind.com" CC: "dev@dpdk.org" , "wenzhuo.lu@intel.com" , "beilei.xing@intel.com" , "bernard.iremonger@intel.com" Thread-Topic: [dpdk-dev] [PATCH v4 1/2] rte_flow: add eCPRI key fields to flow API Thread-Index: AQHWVHSCWCgheFecQE2839vHcqP1Aaj+A3GQ Date: Wed, 8 Jul 2020 18:49:33 +0000 Message-ID: References: <1593694422-299952-1-git-send-email-bingz@mellanox.com> <1594136219-133336-1-git-send-email-bingz@mellanox.com> <1594136219-133336-2-git-send-email-bingz@mellanox.com> In-Reply-To: <1594136219-133336-2-git-send-email-bingz@mellanox.com> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: mellanox.com; dkim=none (message not signed) header.d=none;mellanox.com; dmarc=none action=none header.from=nxp.com; x-originating-ip: [45.118.167.90] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 959f3f1d-0310-4f33-243d-08d8236fa826 x-ms-traffictypediagnostic: VI1PR0402MB2752: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:556; x-forefront-prvs: 04583CED1A x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: H0HqYgjcG83sFMcvxi/KkEKuCPugJ+YNT2BNRqhCeQ7ub9+2Ycr5XoJSiDnLB/HtepFxAjHNblX+m09Sz1M9S0WW99n4og4nSB+bwIF8NWHLBQpvxA6Z9vOntDHn7QSdM//s71pMieljI+UN4ny0o7z1/7eBYn6fHv+KuQma91r2fMZuQC2mxQBsff0YnJ0chaDRb1fppcu2PfgXpChQxNwD20bWxwIhZPeznv9IHlIBcLERhxums02wR4UwUiafm6VVX3KQsP3eFKQYKdPg9MJxiD8GweMWserTeiKAWEZvTqD6jS8rBalBbUrEgEffZOxCwTY3klPWKky+neMoiQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR04MB3168.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(346002)(376002)(366004)(39860400002)(136003)(396003)(54906003)(7696005)(33656002)(110136005)(66946007)(9686003)(316002)(55016002)(4326008)(66476007)(76116006)(64756008)(66446008)(66556008)(186003)(7416002)(8936002)(8676002)(26005)(6506007)(478600001)(83380400001)(5660300002)(2906002)(71200400001)(52536014)(44832011)(86362001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: LWLs5tfOmr0ZqI11Ezu2PTTiOpscVBYJVZaXkb7s9qQjYpcfS3SMbg4782YHKPKj4sqeLYRVa9SZzeqz+hzwLZsEeeHzL5ddkor5TMAESaiPtzGEHzX5lclmRAKUPfKp/RogxymddCQ2Zmk+jYzZNRfJZVsr0RPO2E0U+CvuWuOlGaQKr2kGGVbVhFxiuZ3scSDRm4RCMikic3ZmjmSCDFNDXWv29QKQbSV7tTStoVv26STC6s86WQbudegeBlWgNnqrDsqARvtR37KaBtv/qCAqw5+mdAKnoEIc0thGIS3qoa1OqQGUN9SVr41yfWNjSSt4q/JuM82tX/H0o2SDJz/C5lLMx9ULIm7ZkAxsZK7adQImj9Yx8xyc207veXT/UN8zhsq2T9b4dIOOpsdlATdb1IGV8naVSmMzsdKylGG68PRXcByUjzPjToApXOLWEASJzL7FfR6hUTJPv51ZHu6SsAHcPgVRuK/Uz/GgxQt3a73a45uiXzfq9w1Oa3Wf x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB3168.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 959f3f1d-0310-4f33-243d-08d8236fa826 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Jul 2020 18:49:34.1289 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: jKlZcbNWffMBj0MplDn3qN06sP1EfwRivNoeXHa2jeCG2UpM0g1G87pxeJqI0QAUecRD5TcMfwk0y1vF8c9G1Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0402MB2752 Subject: Re: [dpdk-dev] [PATCH v4 1/2] rte_flow: add eCPRI key fields to flow API X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" > +#ifdef __cplusplus > +extern "C" { > +#endif > + > +/** > + * eCPRI Protocol Revision 1.0, 1.1, 1.2, 2.0: 0001b > + * Other values are reserved for future > + */ > +#define RTE_ECPRI_REV_UPTO_20 1 > + > +/** > + * eCPRI message types in specifications > + * IWF* types will only be supported from rev.2 > + */ > +#define RTE_ECPRI_MSG_TYPE_IQ_DATA 0 > +#define RTE_ECPRI_MSG_TYPE_BIT_SEQ 1 > +#define RTE_ECPRI_MSG_TYPE_RTC_CTRL 2 > +#define RTE_ECPRI_MSG_TYPE_GEN_DATA 3 > +#define RTE_ECPRI_MSG_TYPE_RM_ACC 4 > +#define RTE_ECPRI_MSG_TYPE_DLY_MSR 5 > +#define RTE_ECPRI_MSG_TYPE_RMT_RST 6 > +#define RTE_ECPRI_MSG_TYPE_EVT_IND 7 > +#define RTE_ECPRI_MSG_TYPE_IWF_UP 8 > +#define RTE_ECPRI_MSG_TYPE_IWF_OPT 9 > +#define RTE_ECPRI_MSG_TYPE_IWF_MAP 10 > +#define RTE_ECPRI_MSG_TYPE_IWF_DCTRL 11 Should we have a comment for reserved and vendor specific message types as = well? > + > +/** > + * eCPRI Common Header > + */ > +RTE_STD_C11 > +struct rte_ecpri_common_hdr { > +#if RTE_BYTE_ORDER =3D=3D RTE_LITTLE_ENDIAN > + uint32_t size:16; /**< Payload Size */ > + uint32_t type:8; /**< Message Type */ > + uint32_t c:1; /**< Concatenation Indicator */ > + uint32_t res:3; /**< Reserved */ > + uint32_t revision:4; /**< Protocol Revision */ > +#elif RTE_BYTE_ORDER =3D=3D RTE_BIG_ENDIAN > + uint32_t revision:4; /**< Protocol Revision */ > + uint32_t res:3; /**< Reserved */ > + uint32_t c:1; /**< Concatenation Indicator */ > + uint32_t type:8; /**< Message Type */ > + uint32_t size:16; /**< Payload Size */ > +#endif > +} __rte_packed; > + > +/** > + * eCPRI Message Header of Type #0: IQ Data > + */ > +struct rte_ecpri_msg_iq_data { > + rte_be16_t pc_id; /**< Physical channel ID */ > + rte_be16_t seq_id; /**< Sequence ID */ > +}; > + > +/** > + * eCPRI Message Header of Type #1: Bit Sequence > + */ > +struct rte_ecpri_msg_bit_seq { > + rte_be16_t pc_id; /**< Physical channel ID */ > + rte_be16_t seq_id; /**< Sequence ID */ > +}; > + > +/** > + * eCPRI Message Header of Type #2: Real-Time Control Data > + */ > +struct rte_ecpri_msg_rtc_ctrl { > + rte_be16_t rtc_id; /**< Real-Time Control Data ID */ > + rte_be16_t seq_id; /**< Sequence ID */ > +}; > + > +/** > + * eCPRI Message Header of Type #3: Generic Data Transfer > + */ > +struct rte_ecpri_msg_gen_data { > + rte_be32_t pc_id; /**< Physical channel ID */ > + rte_be32_t seq_id; /**< Sequence ID */ > +}; > + > +/** > + * eCPRI Message Header of Type #4: Remote Memory Access > + */ > +RTE_STD_C11 > +struct rte_ecpri_msg_rm_access { > +#if RTE_BYTE_ORDER =3D=3D RTE_LITTLE_ENDIAN > + uint32_t ele_id:16; /**< Element ID */ > + uint32_t rr:4; /**< Req/Resp */ > + uint32_t rw:4; /**< Read/Write */ > + uint32_t rma_id:8; /**< Remote Memory Access ID */ > +#elif RTE_BYTE_ORDER =3D=3D RTE_BIG_ENDIAN > + uint32_t rma_id:8; /**< Remote Memory Access ID */ > + uint32_t rw:4; /**< Read/Write */ > + uint32_t rr:4; /**< Req/Resp */ > + uint32_t ele_id:16; /**< Element ID */ > +#endif > + rte_be16_t addr_m; /**< 48-bits address (16 MSB) */ > + rte_be32_t addr_l; /**< 48-bits address (32 LSB) */ > + rte_be16_t length; /**< number of bytes */ > +} __rte_packed; > + > +/** > + * eCPRI Message Header of Type #5: One-Way Delay Measurement > + */ > +struct rte_ecpri_msg_delay_measure { > + uint8_t msr_id; /**< Measurement ID */ > + uint8_t act_type; /**< Action Type */ Should we also add timestamp and compensation fields as well here? > +}; > + > +/** > + * eCPRI Message Header of Type #6: Remote Reset > + */ > +struct rte_ecpri_msg_remote_reset { > + uint8_t msr_id; /**< Measurement ID */ > + uint8_t act_type; /**< Action Type */ > +}; I think it is a copy paste error. It should have uint16_t reset_id and uint8_t reset_code_op > + > +/** > + * eCPRI Message Header of Type #7: Event Indication > + */ > +struct rte_ecpri_msg_event_ind { > + uint8_t evt_id; /**< Event ID */ > + uint8_t evt_type; /**< Event Type */ > + uint8_t seq; /**< Sequence Number */ > + uint8_t number; /**< Number of Faults/Notif */ > +}; Should we also define enums for evt_type and other fields in this file. > + > +/** > + * eCPRI Message Header Format: Common Header + Message Types > + */ > +RTE_STD_C11 > +struct rte_ecpri_msg_hdr { > + union { > + struct rte_ecpri_common_hdr common; > + uint32_t dw0; > + }; > + union { > + struct rte_ecpri_msg_iq_data type0; > + struct rte_ecpri_msg_bit_seq type1; > + struct rte_ecpri_msg_rtc_ctrl type2; > + struct rte_ecpri_msg_bit_seq type3; > + struct rte_ecpri_msg_rm_access type4; > + struct rte_ecpri_msg_delay_measure type5; > + struct rte_ecpri_msg_remote_reset type6; > + struct rte_ecpri_msg_event_ind type7; > + uint32_t dummy[3]; Why 3 dummy? IWF messages are 4. > + }; > +}; > + > +#ifdef __cplusplus > +} > +#endif > + > +#endif /* _RTE_ECPRI_H_ */ > diff --git a/lib/librte_net/rte_ether.h b/lib/librte_net/rte_ether.h > index 0ae4e75..184a3f9 100644 > --- a/lib/librte_net/rte_ether.h > +++ b/lib/librte_net/rte_ether.h > @@ -304,6 +304,7 @@ struct rte_vlan_hdr { > #define RTE_ETHER_TYPE_LLDP 0x88CC /**< LLDP Protocol. */ > #define RTE_ETHER_TYPE_MPLS 0x8847 /**< MPLS ethertype. */ > #define RTE_ETHER_TYPE_MPLSM 0x8848 /**< MPLS multicast ethertype. */ > +#define RTE_ETHER_TYPE_ECPRI 0xAEFE /**< eCPRI ethertype (.1Q supported)= . > */ >=20 > /** > * Extract VLAN tag information into mbuf > -- > 1.8.3.1