From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0E056C19759 for ; Thu, 1 Aug 2019 06:59:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B8FE92089E for ; Thu, 1 Aug 2019 06:59:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="mCKdDGmv" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729661AbfHAG7g (ORCPT ); Thu, 1 Aug 2019 02:59:36 -0400 Received: from mail-qt1-f194.google.com ([209.85.160.194]:41055 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729561AbfHAG7g (ORCPT ); Thu, 1 Aug 2019 02:59:36 -0400 Received: by mail-qt1-f194.google.com with SMTP id d17so69052641qtj.8; Wed, 31 Jul 2019 23:59:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=o6bbI+5Bc/kSGDNfHGa5kyM396+R4ZLjYLFH+qxl3I0=; b=mCKdDGmvB7LBrBBWAWulBdGvfYugUE4jjKGlYaTkK0GSWrW7WO+/bhp4B3b4tRmE5y lwsivNJhXch0SaIncLCcHm8f6fwKFBFLoz7UaRfdum4ciebvBcVLf3IZVmyFEccPT/ZW DNLcqvwFNG0BGLUq7lCoxQH3F4Jg1JTYtttgPuVYYWqyTLW2YtsR3yjApvmUUqM9/QCe on5fqVSoBGwl+vkvOyVY7Um+osQM1ZAkrGcQlNcSjpSo7s9uquHpkvT6LS3nposaynlE j3tLPY/ykuKQ/U4yj5k05lawxPPDPksh/ufyYAR5SK9it1tBWT7bD8f3KIn13jXOzpm1 yvhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=o6bbI+5Bc/kSGDNfHGa5kyM396+R4ZLjYLFH+qxl3I0=; b=iNF1M1hi6a0qMIx4KiF9MTnfGageYkVNZ/MsiXM4/8+nCnKq4us9NmpyLAswWzX0/4 qSVY2+dVuIRCyJ19MNwS0gSYC3MUOBopxR62qdQfcp+U//lz9nHqCnueSENFz9N9O+x9 QNEu18b8UNuqySvcdXEIcBSx1xGtlIeBEnRHZpnEzVcKROdHrpgtNxE+ddpMFJmMOMiH ySaN4PfqDCo188kJx3Uk/oCEFs5yMNnVsGqtYhzxCrfmiOii3zN/oNH/M4fppX8b9MZu vPFIJUKIa+USdzWFh9ilMvCWjqLHredztAGc4lR9UvDAG3jrurslYuJc48oz8zx0j1Qr wXWw== X-Gm-Message-State: APjAAAUVWH1IM/KpYyhacYtZFRqps9vGJ5Z5fcml8UO4uHmDrbfXBKjG KIe4cVhLf9h0Ij7e7Mv3nd4Y0nYm2bPnptIJzETWNyVxS1WCOzZz X-Google-Smtp-Source: APXvYqzK9K9kBzbQ/q3/M0oJLL8NuX6Hcl96T2xrcl6H75pRe3Ik/Djw7Tn1dY3BiE2ppNKPJ1gEsIhYBHNsKiaV2mM= X-Received: by 2002:ac8:6601:: with SMTP id c1mr82633846qtp.93.1564642775046; Wed, 31 Jul 2019 23:59:35 -0700 (PDT) MIME-Version: 1.0 References: <20190724051043.14348-1-kevin.laatz@intel.com> <20190730085400.10376-1-kevin.laatz@intel.com> <20190730085400.10376-4-kevin.laatz@intel.com> In-Reply-To: From: Andrii Nakryiko Date: Wed, 31 Jul 2019 23:59:23 -0700 Message-ID: Subject: Re: [Intel-wired-lan] [PATCH bpf-next v4 03/11] libbpf: add flags to umem config To: =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= Cc: Kevin Laatz , Netdev , Alexei Starovoitov , Daniel Borkmann , =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= , "Karlsson, Magnus" , Jakub Kicinski , Jonathan Lemon , Saeed Mahameed , Maxim Mikityanskiy , Stephen Hemminger , Bruce Richardson , ciara.loftus@intel.com, intel-wired-lan , bpf Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: bpf-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org On Wed, Jul 31, 2019 at 8:21 AM Bj=C3=B6rn T=C3=B6pel wrote: > > On Tue, 30 Jul 2019 at 19:43, Kevin Laatz wrote: > > > > This patch adds a 'flags' field to the umem_config and umem_reg structs= . > > This will allow for more options to be added for configuring umems. > > > > The first use for the flags field is to add a flag for unaligned chunks > > mode. These flags can either be user-provided or filled with a default. > > > > Signed-off-by: Kevin Laatz > > Signed-off-by: Ciara Loftus > > > > --- > > v2: > > - Removed the headroom check from this patch. It has moved to the > > previous patch. > > > > v4: > > - modified chunk flag define > > --- [...] > > diff --git a/tools/lib/bpf/xsk.h b/tools/lib/bpf/xsk.h > > index 833a6e60d065..44a03d8c34b9 100644 > > --- a/tools/lib/bpf/xsk.h > > +++ b/tools/lib/bpf/xsk.h > > @@ -170,12 +170,14 @@ LIBBPF_API int xsk_socket__fd(const struct xsk_so= cket *xsk); > > #define XSK_UMEM__DEFAULT_FRAME_SHIFT 12 /* 4096 bytes */ > > #define XSK_UMEM__DEFAULT_FRAME_SIZE (1 << XSK_UMEM__DEFAULT_FRAME= _SHIFT) > > #define XSK_UMEM__DEFAULT_FRAME_HEADROOM 0 > > +#define XSK_UMEM__DEFAULT_FLAGS 0 > > > > struct xsk_umem_config { > > __u32 fill_size; > > __u32 comp_size; > > __u32 frame_size; > > __u32 frame_headroom; > > + __u32 flags; > > And the flags addition here, unfortunately, requires symbol versioning > of xsk_umem__create(). That'll be the first in libbpf! :-) xsk_umem_config is passed by pointer to xsk_umem__create(), so this doesn't break ABI, does it? > > > Bj=C3=B6rn > > > }; > > > > /* Flags for the libbpf_flags field. */ > > -- > > 2.17.1 > > > > _______________________________________________ > > Intel-wired-lan mailing list > > Intel-wired-lan@osuosl.org > > https://lists.osuosl.org/mailman/listinfo/intel-wired-lan From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrii Nakryiko Date: Wed, 31 Jul 2019 23:59:23 -0700 Subject: [Intel-wired-lan] [PATCH bpf-next v4 03/11] libbpf: add flags to umem config In-Reply-To: References: <20190724051043.14348-1-kevin.laatz@intel.com> <20190730085400.10376-1-kevin.laatz@intel.com> <20190730085400.10376-4-kevin.laatz@intel.com> Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: intel-wired-lan@osuosl.org List-ID: On Wed, Jul 31, 2019 at 8:21 AM Bj?rn T?pel wrote: > > On Tue, 30 Jul 2019 at 19:43, Kevin Laatz wrote: > > > > This patch adds a 'flags' field to the umem_config and umem_reg structs. > > This will allow for more options to be added for configuring umems. > > > > The first use for the flags field is to add a flag for unaligned chunks > > mode. These flags can either be user-provided or filled with a default. > > > > Signed-off-by: Kevin Laatz > > Signed-off-by: Ciara Loftus > > > > --- > > v2: > > - Removed the headroom check from this patch. It has moved to the > > previous patch. > > > > v4: > > - modified chunk flag define > > --- [...] > > diff --git a/tools/lib/bpf/xsk.h b/tools/lib/bpf/xsk.h > > index 833a6e60d065..44a03d8c34b9 100644 > > --- a/tools/lib/bpf/xsk.h > > +++ b/tools/lib/bpf/xsk.h > > @@ -170,12 +170,14 @@ LIBBPF_API int xsk_socket__fd(const struct xsk_socket *xsk); > > #define XSK_UMEM__DEFAULT_FRAME_SHIFT 12 /* 4096 bytes */ > > #define XSK_UMEM__DEFAULT_FRAME_SIZE (1 << XSK_UMEM__DEFAULT_FRAME_SHIFT) > > #define XSK_UMEM__DEFAULT_FRAME_HEADROOM 0 > > +#define XSK_UMEM__DEFAULT_FLAGS 0 > > > > struct xsk_umem_config { > > __u32 fill_size; > > __u32 comp_size; > > __u32 frame_size; > > __u32 frame_headroom; > > + __u32 flags; > > And the flags addition here, unfortunately, requires symbol versioning > of xsk_umem__create(). That'll be the first in libbpf! :-) xsk_umem_config is passed by pointer to xsk_umem__create(), so this doesn't break ABI, does it? > > > Bj?rn > > > }; > > > > /* Flags for the libbpf_flags field. */ > > -- > > 2.17.1 > > > > _______________________________________________ > > Intel-wired-lan mailing list > > Intel-wired-lan at osuosl.org > > https://lists.osuosl.org/mailman/listinfo/intel-wired-lan