Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3171686ybd; Mon, 24 Jun 2019 20:55:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqxYDW9q2AiBK87Hc8A/RwrOJaL9VCecsAg2ZHPiRTf6oYir/80jBMsRF1oHmN+m82WEVNE+ X-Received: by 2002:a63:90c8:: with SMTP id a191mr27797805pge.112.1561434944673; Mon, 24 Jun 2019 20:55:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561434944; cv=none; d=google.com; s=arc-20160816; b=lRDYY2ZeyVgfuBEXbf+J+AfnQbfemERnS+7aztds7qH4dwE2qHBcgBc2y9egB1SYYq RwbDwh2OhE+ymET6hAOaYAeJDnSBFN71RChlWGCITAb8Q1uyfhLjgsNEoiqGWNOxCcMu lM9AScv2XoCPAtUmn0Rz5iXFoKBjVkxyzYcw42Ms8FKNatQR+Ao5bfXXEz0t4be9rrhy g26TnA1ii3kmrncDGxbTiFLL05EW4PgSbjnvjRfjA+VjoeLlSXQyJXvZaPOQ7A3JNpBt XoaX1DGyiXftQR0giFmBg9GImptkODawoWpu75CBuKza+Ws64Ccru5wRhShT+IcCYnw3 rWZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=IvGfUsEsPfILP2JsuYFvKK2rmUrap93sJGjxp5w61WY=; b=EItt95IfpY8Mjw44h6QcMsCFP3PUgO++FSIed+HibGB0wHHJPlTB6V2LltSBZ+H6/6 98bE7M210CmUVsmAzn+/ug+eR91hPWRPSTvNQ4I5+C3iB6ZOLVZcQtMo5jxYAg5sPDJF j8g3trim5bE8KmklI8RqOh+7MCStaOlamhkrl7pgQ9xdf0zfjcQaOH9jGyO2fK8D7F58 I9iN93saHjrogy+mIhp8Yd3v2Aem02JsCessNpJOlkRuThWyH9yj2TiWBV2dwHa2QOgk tKU+u+QiUsMAms+HVC4qNQsP3BWetFSQ7OC6cWJEqIkMCJaPuFOztdoyWBXA8fyFNubl T/ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZexGESd2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k3si11687538pll.343.2019.06.24.20.55.29; Mon, 24 Jun 2019 20:55:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZexGESd2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728507AbfFXXfU (ORCPT + 99 others); Mon, 24 Jun 2019 19:35:20 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:37021 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726424AbfFXXfT (ORCPT ); Mon, 24 Jun 2019 19:35:19 -0400 Received: by mail-lj1-f196.google.com with SMTP id 131so14301585ljf.4; Mon, 24 Jun 2019 16:35:17 -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=IvGfUsEsPfILP2JsuYFvKK2rmUrap93sJGjxp5w61WY=; b=ZexGESd2sbrcoHawQOWaaPxCngJqUh4OV23ETrO6o22YScx//Qbj3/ocqGOZGCIZUy GcPca+zC8Su66++qVCX4TpMs09R0syQMTjIiTJ1pRuHX7QLOgmVrO3Q9Nu4R9rNkeDPV hMibTNmHxr+H8W/p3iZdoQOocQehqUdjwdQvp61vga2WviZUNEqIUbp/q4dHrtLLQd5X Fky8UBT+kRcLF7pcMANeuMYWvnW1SfpD0cI+Ti+cMwELgxMX7vigpZiec4T/yxfoE9wB uedXRbL4KWsG7gYBhBigccWi/R6cCl68qR3obOdIbWTgnYD2rsUBwM3BsZk2WnGlsvrr 7oSA== 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=IvGfUsEsPfILP2JsuYFvKK2rmUrap93sJGjxp5w61WY=; b=K7XTBp8pxOw62zx0najiSZ20/QpTT9VmGhmBJi+kahiSEqKiqVjHoRKfAcYtMM8AAZ hm9btwLdDo+3eqsvuuvtl2xma6P81Ol24+Wq/x46iPqNT6rqhGK9Q77ZiomuhomQFY5y u78E+3+1Z6rrl4yXUiiLfhE71c7jarKc4mUorjxjWoHHDToGDNz/uRqUYX2/HkOJ4E2M hOE5+Z1pJQbyVGLEdQjQVDZCMdxaqWMcO5b4mJZtT0bT0OCMjTWkTSxeGdnHbaXDNHKd P23AqqksU5eGmetpDxTr3RD2Zj4/j2QpEQ3o7TNLs9KXPg8RZp7/jH7h5HgrS9l0DjSP m8Dw== X-Gm-Message-State: APjAAAUWgsXidzGfApbBvFRv96LDBBOXju7YbPrtMQiUhJw+Ky6ScT60 Q8i2Jjclvky4u05HOpEExSWcrvQrvEikOR3ZzZ8= X-Received: by 2002:a2e:b047:: with SMTP id d7mr10251853ljl.8.1561419316476; Mon, 24 Jun 2019 16:35:16 -0700 (PDT) MIME-Version: 1.0 References: <20190621231650.32073-1-brianvv@google.com> <20190621231650.32073-3-brianvv@google.com> <20190624154558.65c31561@cakuba.netronome.com> In-Reply-To: <20190624154558.65c31561@cakuba.netronome.com> From: Brian Vazquez Date: Mon, 24 Jun 2019 16:35:05 -0700 Message-ID: Subject: Re: [RFC PATCH 2/6] bpf: add BPF_MAP_DUMP command to access more than one entry per call To: Jakub Kicinski Cc: Brian Vazquez , Alexei Starovoitov , Daniel Borkmann , "David S . Miller" , Stanislav Fomichev , Willem de Bruijn , Petar Penkov , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 24, 2019 at 3:46 PM Jakub Kicinski wrote: > > On Fri, 21 Jun 2019 16:16:46 -0700, Brian Vazquez wrote: > > @@ -385,6 +386,14 @@ union bpf_attr { > > __u64 flags; > > }; > > > > + struct { /* struct used by BPF_MAP_DUMP command */ > > + __u32 map_fd; > > There is a hole here, perhaps flags don't have to be 64 bit? The command implementation is wrapping BPF_MAP_*_ELEM commands, I would expect this one to handle the same flags which are 64 bit. Note that there's a hole in the anonymous structure used by the other commands too: struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */ __u32 map_fd; __aligned_u64 key; union { __aligned_u64 value; __aligned_u64 next_key; }; __u64 flags; };