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 17996A2EFC for ; Tue, 15 Oct 2019 18:47:29 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A2B4C1EDA4; Tue, 15 Oct 2019 18:47:28 +0200 (CEST) Received: from mail-pf1-f193.google.com (mail-pf1-f193.google.com [209.85.210.193]) by dpdk.org (Postfix) with ESMTP id 355421EDA2 for ; Tue, 15 Oct 2019 18:47:27 +0200 (CEST) Received: by mail-pf1-f193.google.com with SMTP id a2so12830567pfo.10 for ; Tue, 15 Oct 2019 09:47:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Cxd++R6opTpMpxsRoMcRavNRWhO5LCWy684IaW6ODHM=; b=R/7rCQjIJxaqNDv4U9rS3b0ItdI/jTy5J0QVYM3b/qffk6VyyFerzyFaMKI06Ap4IZ Nn0xKIPRBF81tlh5mpUtJECODuzhmomB+Ojv+da89gcmGx867BF4vQ+STG7H9SIge2hD VojaXs/75HUZoQrGK3DEb2NvwZcSUpOVdZ8ERkslx0KUtEM7eU2PI08OP5ChG7HjGnrg SW646DA8dPU3v3gk/DbLSibSEj//Um4Pz6vKrbNgkDJiqjyDDFdY2MVlqA5hegGXLaOq oWAIxKLmniyYIWzSrS+xPJGQmYdOvuKfW7oKwJ7rJlaQ9Ka7UeMibqYmx7mecdHYYH1b ExAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Cxd++R6opTpMpxsRoMcRavNRWhO5LCWy684IaW6ODHM=; b=krMcFYOeB+lBckpTJqsYFoJrqAY0nEvMUN4SYR/sdtY5M9/gtFrjqpRpkeo6Gncm27 zQOFSKCbhoGxpfGRFgzgCVT0t+eAel2tCBKZdnAK+tYwT2Ma8wSlRjexZrMVBSQlmg0m awFUaNd+Q4ErswRZFzRtBCAbHpBM0CDQwqazYPRMqZnPUKdg58YDvWkH4FP3n+supfqu MtUkR3VEA6tlwiFpce47OSc7fIw9ir9tJgwtKAeCs8GgxwGQ9iL3OQkzCClaUq6WtzSX Mg1FN+WWDsXPLEvsreHQ4ZXnDyrqF+SuFV1LkRq47X/0p3c87/D00BSZ11EiUpNnN6G4 nrAw== X-Gm-Message-State: APjAAAW3aFQOI3yDWEMQy4DD6tkQT1uOYLAnEfRsNApY9EeDemGS/rOQ Oh9KpzV4qjMwP8hXGU8+wCJYVg== X-Google-Smtp-Source: APXvYqwD0RcfW/s5TOkq372tewuOxF6oBDcfMJHAz9QqVAJuD/xCCH8PbKZjNc6hZhSagm0C0yr/2g== X-Received: by 2002:a62:3387:: with SMTP id z129mr38064780pfz.253.1571158046217; Tue, 15 Oct 2019 09:47:26 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id q88sm22173044pjq.9.2019.10.15.09.47.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Oct 2019 09:47:26 -0700 (PDT) Date: Tue, 15 Oct 2019 09:47:17 -0700 From: Stephen Hemminger To: Cc: Adrien Mazarguil , John McNamara , Marko Kovacevic , Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko , , Message-ID: <20191015094717.052d0993@hermes.lan> In-Reply-To: <20191014042956.18616-1-kirankumark@marvell.com> References: <20191014042956.18616-1-kirankumark@marvell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] ethdev: add HIGIG2 key field 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" On Mon, 14 Oct 2019 09:59:56 +0530 wrote: > +/** > + * RTE_FLOW_ITEM_TYPE_HIGIG2 > + * Matches higig2 header. > + */ > +struct rte_higig2_frc { > + uint32_t ksop:8; > + uint32_t resv:3; > + uint32_t mcst:1; > + uint32_t tc:4; > + uint32_t dst_modid:8; > + uint32_t dst_pid:8; > + uint32_t src_modid:8; > + uint32_t src_pid:8; > + uint32_t lbid:8; > + uint32_t dp:2; > + uint32_t resv1:3; > + uint32_t ppd_type:3; > +} __attribute__((packed)); > + > +struct rte_higig2_ppt_type0 { > + uint32_t dst_t:1; > + uint32_t dst_tgid:3; > + uint32_t ingress_tagged:1; > + uint32_t mirror_only:1; > + uint32_t mirror_done:1; > + uint32_t mirror:1; > + uint32_t res:2; > + uint32_t l3:1; > + uint32_t label_present:1; > + uint32_t vc_label2:4; > + uint32_t vc_label1:8; > + uint32_t vc_label0:8; > + uint32_t vid_high:8; > + uint32_t vid_low:8; > + uint32_t pfm:2; > + uint32_t src_t:1; > + uint32_t res1:2; > + uint32_t opcode:3; > + uint32_t hdr_ext_len:3; > + uint32_t res2:5; > +} __attribute__((packed)); > + > +struct rte_higig2_ppt_type1 { > + uint32_t classification:16; > + uint32_t resv:16; > + uint32_t vid:16; > + uint32_t pfm:2; > + uint32_t src_t:1; > + uint32_t resv1:2; > + uint32_t opcode:3; > + uint32_t hdr_ext_len:3; > + uint32_t resv2:5; > +} __attribute__((packed)); > + > +RTE_STD_C11 > +struct rte_flow_item_higig2_hdr { > + struct rte_higig2_frc fcr; > + union { > + struct rte_higig2_ppt_type0 ppt0; > + struct rte_higig2_ppt_type1 ppt1; > + }; > +} __attribute__((packed)); > + > +/** Default mask for RTE_FLOW_ITEM_TYPE_HIGIG2. */ > +#ifndef __cplusplus > +static const struct rte_flow_item_higig2_hdr rte_flow_item_higig2_hdr_mask = { > + .ppt1.classification = 0xffff, > + .ppt1.vid = 0xfff, > +}; > +#endif > + Why do all these structures have to be packed. They are all uint32.