From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jakub Kicinski Subject: Re: [bpf-next V2 PATCH 01/14] xdp: base API for new XDP rx-queue info concept Date: Fri, 22 Dec 2017 16:14:43 -0800 Message-ID: <20171222161443.241332fc@cakuba.netronome.com> References: <151396262289.20006.1429172971820409456.stgit@firesoul> <151396269959.20006.11486855606275589519.stgit@firesoul> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Daniel Borkmann , Alexei Starovoitov , netdev@vger.kernel.org, dsahern@gmail.com, gospo@broadcom.com, bjorn.topel@intel.com, michael.chan@broadcom.com To: Jesper Dangaard Brouer Return-path: Received: from mail-qt0-f170.google.com ([209.85.216.170]:36335 "EHLO mail-qt0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756065AbdLWAOr (ORCPT ); Fri, 22 Dec 2017 19:14:47 -0500 Received: by mail-qt0-f170.google.com with SMTP id a16so38092039qtj.3 for ; Fri, 22 Dec 2017 16:14:46 -0800 (PST) In-Reply-To: <151396269959.20006.11486855606275589519.stgit@firesoul> Sender: netdev-owner@vger.kernel.org List-ID: On Fri, 22 Dec 2017 18:11:39 +0100, Jesper Dangaard Brouer wrote: > +struct xdp_rxq_info { > + struct net_device *dev; > + u32 queue_index; > + u32 reg_state; > +} ____cacheline_aligned; /* perf critical, avoid false-sharing */ I'm assuming this is cacheline_aligned, because of some stuff you will add here in the future for the completion path? (The comment could mention that this data is read-mostly.) Drivers are likely to already have a read-mostly (or unused-mostly) section of the rx ring structure. Would it be possible to define this in a way that would allow people who carefully lay out their data path structures to save cache space?