From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-f65.google.com (mail-ed1-f65.google.com [209.85.208.65]) by dpdk.org (Postfix) with ESMTP id E61911B433 for ; Mon, 1 Oct 2018 19:01:13 +0200 (CEST) Received: by mail-ed1-f65.google.com with SMTP id g26-v6so14918900edp.0 for ; Mon, 01 Oct 2018 10:01:13 -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=Ybk1J7wE3S5HycnKH7QITJA8e6yQ51KL7USxL7C63sE=; b=Yn01UVNJ7Imd6icnG2Fg2J2wkNe+/rq6Lkn98eoOeH+evR5aDfZq850RXx8fLwilgi ATqpBkg9zaQc5TT3wY4G6KKgwBDUB9+7xHXzHhWiq8qo0pv3W9BWEwIayPkniXs1301R VQDzacMq2EzuKWZxrdQvkAfRIAHDmQAB4l7b0xOmiSEy7lU5CTqKmf+2OZUwcN9jNWrE Y7pHIR7iRu3mEBrEhjX0WC0Q9eHVI7BfKZLQn+nIbIvEdPJ9MPcXq8fu2eb0X5/0Q927 tdD4SVKFLluwWkCez9riuAbB8Pq2YIHlyoXvZm3YsT3F0Sr0z5trt6ZgUGzC/qHvxWHt l/1Q== 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=Ybk1J7wE3S5HycnKH7QITJA8e6yQ51KL7USxL7C63sE=; b=S9zjAt4RRvqHEOK6bhykSA5tch6iIYO/67tExDNnORnH1T3uPRRHdoTrukwrJLwl/R aLMJL36iWBCy21WTyVol9SWDu3SfiIIvUp3Cy5MsZmFcz0Hv5JBMwC0Fa8btObAB13kU MaQ80nSb08fou1IUxO4hxqQYC4ygn6Rkf2/L2hfpiSO7GEZuOYds2tPnGlySeUMrD2px SsLhQErrjQVqBpGUAl84Irxg1qeD/otW7HZoxGyL2WRw5if9+3fKMfs1mDwMfXbYYVUN tFAcSskUwhZMk6+DstL1d4iAGzfJkbRlIdwKF5xOn/8jAGkyOtes76VG+eOliDV290B+ rV6A== X-Gm-Message-State: ABuFfoiL4lxz8sLvDvphL0xNBpumHgeNU/YS2mXQmFwZMYRkSRX5yDOE sHO+su/jS2G1pOtcl9ghgzFOEg== X-Google-Smtp-Source: ACcGV600eYdyd2geQeWY88cdx6iXL7VID2cCfTqT0a+I80oUL9I4XtgsqFkz9m0BCPr8C1GBu4Wj4Q== X-Received: by 2002:aa7:ca17:: with SMTP id y23-v6mr18903876eds.285.1538413273261; Mon, 01 Oct 2018 10:01:13 -0700 (PDT) Received: from shemminger-XPS-13-9360 ([89.27.154.13]) by smtp.gmail.com with ESMTPSA id ay6-v6sm2209483ejb.4.2018.10.01.10.01.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 01 Oct 2018 10:01:13 -0700 (PDT) Date: Mon, 1 Oct 2018 19:01:09 +0200 From: Stephen Hemminger To: Anatoly Burakov Cc: dev@dpdk.org, John McNamara , Marko Kovacevic , Bruce Richardson , laszlo.madarassy@ericsson.com, laszlo.vadkerti@ericsson.com, andras.kovacs@ericsson.com, winnie.tian@ericsson.com, daniel.andrasi@ericsson.com, janos.kobor@ericsson.com, geza.koblo@ericsson.com, srinath.mannam@broadcom.com, scott.branden@broadcom.com, ajit.khaparde@broadcom.com, keith.wiles@intel.com, thomas@monjalon.net, shreyansh.jain@nxp.com, shahafs@mellanox.com, arybchenko@solarflare.com, alejandro.lucero@netronome.com Message-ID: <20181001190109.2b71f3d0@shemminger-XPS-13-9360> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v8 01/21] mem: add length to memseg list 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: , X-List-Received-Date: Mon, 01 Oct 2018 17:01:14 -0000 On Mon, 1 Oct 2018 13:56:09 +0100 Anatoly Burakov wrote: > diff --git a/lib/librte_eal/common/include/rte_eal_memconfig.h b/lib/librte_eal/common/include/rte_eal_memconfig.h > index aff0688dd..1d8b0a6fe 100644 > --- a/lib/librte_eal/common/include/rte_eal_memconfig.h > +++ b/lib/librte_eal/common/include/rte_eal_memconfig.h > @@ -30,6 +30,7 @@ struct rte_memseg_list { > uint64_t addr_64; > /**< Makes sure addr is always 64-bits */ > }; > + size_t len; /**< Length of memory area covered by this memseg list. */ > int socket_id; /**< Socket ID for all memsegs in this list. */ > uint64_t page_sz; /**< Page size for all memsegs in this list. */ > volatile uint32_t version; /**< version number for multiprocess sync. */ If you are going to break ABI, why not try and rearrange to eliminate holes: Output of pahole (on x86 64 bit): struct rte_memseg_list { union { void * base_va; /* 0 8 */ uint64_t addr_64; /* 0 8 */ }; /* 0 8 */ size_t len; /* 8 8 */ int socket_id; /* 16 4 */ /* XXX 4 bytes hole, try to pack */ uint64_t page_sz; /* 24 8 */ volatile uint32_t version; /* 32 4 */ /* XXX 4 bytes hole, try to pack */ struct rte_fbarray memseg_arr; /* 40 96 */ /* XXX last struct has 4 bytes of padding */ /* size: 136, cachelines: 3, members: 6 */ /* sum members: 128, holes: 2, sum holes: 8 */ /* paddings: 1, sum paddings: 4 */ /* last cacheline: 8 bytes */ };