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=-7.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no 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 0F086C11F64 for ; Mon, 28 Jun 2021 20:14:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EA6A161CBC for ; Mon, 28 Jun 2021 20:14:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234054AbhF1URL (ORCPT ); Mon, 28 Jun 2021 16:17:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232014AbhF1URL (ORCPT ); Mon, 28 Jun 2021 16:17:11 -0400 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D289C061574; Mon, 28 Jun 2021 13:14:44 -0700 (PDT) Received: by mail-ej1-x632.google.com with SMTP id o11so18888068ejd.4; Mon, 28 Jun 2021 13:14:44 -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; bh=zdPs58wcAuPAnNalGg5J4lyyztWTzk7zaRQZ5k0nKeI=; b=UkpM7K61kor99zTc/7KZs9Sr9xJWWNL+cHTSHNbmGYibhcUtWx6/CmZxbQhrBk/F9U c+l0W95A1kOGdwb7o9I3ciAWTpYaUVvjuLqgk3dyLe7/v4iyns0qI2sD8MtUQuQyP3p4 G0FHgxjVzZFvuzsYTaHaUlc5UdquE12/SDv3Fs4gW6oao+8Of8KcQGMPQPsYQdi5yBvY m5bpuIdlb2KVhVTYVqZN+yYgAcQqFoGWE5Hpd9yXGHnOqFXWjNoaTGi2fQkHCYzZhCjl oeczLfPoJXEl1FtJeRTVKNZJlNBc554h2qQlTNLWXcn6nPz3fPDRwJYR8vYBGqWVQUek lErw== 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; bh=zdPs58wcAuPAnNalGg5J4lyyztWTzk7zaRQZ5k0nKeI=; b=AxhWzqX+HEgW+WWq83QREURPiz+HOACTeB/k3pktGTAcfdZpVDaQjDH8FuE04xdtpx vdjUcPJV9Is429yjD9K1BJekgEXLRwO8OgKjgqO6Y00cUb47MBh3H78rKqYxvEfo+YP9 WPxJywOA0ev+wQUdi1K4cdahe9u1quJ7DWfiprvS4W6/rEGP9oDHryEKedmKC/f3CmuS ybfC1fZPp4u7erscuvZVgdkWat37wXeEppRbqHk3QH7H5SGq6DB+oF+uA5BqHJy07/MB vh4w60W9bnPVOjAwCcwT/xHilqCd1mrxSCdocmO1CR0/w0BoBgdiYucTBXc1E/GJACdl 0TWA== X-Gm-Message-State: AOAM530zMYouHGchTGBz7VgMnT5CUGuA9r/4ZSYa6+WQCgvjY5VK+UDE PVyR2CTcjmSwF3Krpi7vafGkJbYvtJb6MUnyGjY= X-Google-Smtp-Source: ABdhPJx1mkhEM+RWmaAl8527gWYv1j9Y0Qe0LxpHrFe6mm7dOgUgvq3OZq4HnwYsFMhSf00Le1njz4I2Vmg9F6Zrz94= X-Received: by 2002:a17:906:dbe1:: with SMTP id yd1mr26542431ejb.114.1624911282417; Mon, 28 Jun 2021 13:14:42 -0700 (PDT) MIME-Version: 1.0 References: <1316f3ef2763ff4c02244fb726c61568c972514c.1623674025.git.lorenzo@kernel.org> In-Reply-To: <1316f3ef2763ff4c02244fb726c61568c972514c.1623674025.git.lorenzo@kernel.org> From: Alexander Duyck Date: Mon, 28 Jun 2021 13:14:31 -0700 Message-ID: Subject: Re: [PATCH v9 bpf-next 02/14] xdp: introduce flags field in xdp_buff/xdp_frame To: Lorenzo Bianconi Cc: bpf , Netdev , lorenzo.bianconi@redhat.com, David Miller , Jakub Kicinski , Alexei Starovoitov , Daniel Borkmann , shayagr@amazon.com, "Jubran, Samih" , John Fastabend , David Ahern , Jesper Dangaard Brouer , Eelco Chaudron , Jason Wang , Saeed Mahameed , Maciej Fijalkowski , "Karlsson, Magnus" , Tirthendu Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org On Mon, Jun 14, 2021 at 5:50 AM Lorenzo Bianconi wrote: > > Introduce flags field in xdp_frame/xdp_buffer data structure > to define additional buffer features. At the moment the only > supported buffer feature is multi-buffer bit (mb). Multi-buffer bit > is used to specify if this is a linear buffer (mb = 0) or a multi-buffer > frame (mb = 1). In the latter case the shared_info area at the end of > the first buffer will be properly initialized to link together > subsequent buffers. > > Signed-off-by: Lorenzo Bianconi Instead of passing this between buffers and frames I wonder if this wouldn't be better to place in something like the xdp_mem_info structure since this is something that would be specific to how the device is handling memory anyway. You could probably split the type field into a 16b type and a 16b flags field. Then add your bit where 0 is linear/legacy and 1 is scatter-gather/multi-buffer.