Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3179868ybd; Mon, 24 Jun 2019 21:06:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqwzKET4F3BZWPosP8U+obhjRz4dQEbUYyvPxrctMPG+K9Trljd8oWS/dvXmZChnUMjJvXkh X-Received: by 2002:a17:902:868f:: with SMTP id g15mr151269243plo.67.1561435596912; Mon, 24 Jun 2019 21:06:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561435596; cv=none; d=google.com; s=arc-20160816; b=W5kKAtFB77UAfY9AcTuseZNqnL5WhBPuBrmHcm/R219NqPw64luFqRXUN2fH5IBlpA +09aBOIRjNi26hs+xtinkWbpacDRUhDn/Hw621xPlFkaRDs+OkC3sFg342FSj5hQmY/B neLYbGT+OT6450XmNHjbRLK/Z575s+PFgVcLZy7Mjo5F6aTrMYOPEMsqiJpymlcwMEpm /Mqgm8oyszIhR88Hhv2C1hjZAKomvVokDcHhTxmjziVVwzw1ipZMultfXIn0+JAwMDmJ cMJyLSU/gVQW7iIWsK8XCqTCmFrWXY4x794jpZLzsEiqIRz8jDKYKBa2Yn66a9ykOCKU JLHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=idMODAcOv2Dt8ZWy2wPt4Z83ta1OwJTt0jsnz2NfzUI=; b=WYFLXDlWpKya76WPvGyuMXKpzr2PoS3im0SeMWdHeXXX/JtjgWhLnVs0vd+d9tP9Jw ayNPjacvq6tNl2I6kHlx4WUCWdBj2sNBx+vMhPR7VFimgJw0xbprh8toc450ngX5hdOo yzydDB6nEvPUWba8yjRzwt075cU5fX1nP318OLfb2DA6/D3Oqhyc0DtNQ7JnxFtHVMB8 6lw7PntozFZMHFusXqzmasVSmu0QuGG3nHmn75wC2THPcSBqbp7NXTViUKznBk38+iGZ jcQMl3Fc6Tir4gx1JYEqyeclYIrXNwMRav1vw1n8QGimaxakQqRNzvXztFpkyeK7sf48 owig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@netronome-com.20150623.gappssmtp.com header.s=20150623 header.b=oO6ZS5eq; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w5si1522322pjt.86.2019.06.24.21.06.20; Mon, 24 Jun 2019 21:06:36 -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=@netronome-com.20150623.gappssmtp.com header.s=20150623 header.b=oO6ZS5eq; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730056AbfFYAOZ (ORCPT + 99 others); Mon, 24 Jun 2019 20:14:25 -0400 Received: from mail-qk1-f195.google.com ([209.85.222.195]:44763 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730020AbfFYAOW (ORCPT ); Mon, 24 Jun 2019 20:14:22 -0400 Received: by mail-qk1-f195.google.com with SMTP id p144so11186612qke.11 for ; Mon, 24 Jun 2019 17:14:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :organization:mime-version:content-transfer-encoding; bh=idMODAcOv2Dt8ZWy2wPt4Z83ta1OwJTt0jsnz2NfzUI=; b=oO6ZS5eqyA9LygqsicelqXcxs1lPMoD+hODhPKrOyskzS0p0gL80ydnDZrFAymyJQk rzd7Tq31z91+DWytz5dz1NMQP7SexeLme2wMe62wSN8FxM2UxkVxnMx5u7cW2E8+o3fb FEdGrmR8gQO/igyF70T5H0z9p29Fs5JZjqwAlqR3dmuNL2cQqMD9RWgknn/MYFMDMIcW syZTrU8mWL3t0vlnX6LWJOIxY9ePxCFhVolT59fJfRSF+EcYaYfggmkqPT4ABF9IlQr4 WVdJeA+WNx3xGQdLAxckPCN24+7hdY5rHhpc3RL4Y5gsjzstgINbBtL3Mu0xYMm+LzbV 8JBQ== 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:organization:mime-version:content-transfer-encoding; bh=idMODAcOv2Dt8ZWy2wPt4Z83ta1OwJTt0jsnz2NfzUI=; b=Rj69dLfOVQ8qS81xsd9wKoSZ7SoEEoE+rb5i10WhdgAQ0aTcZdrQnSuqw2DN7v8zq6 yL4Sv9P7sLV7pqKqMWDWS5moR22my2+kvlsi9AoPtug1v90gulMNM080gkX2CxLA/Pfn LT2Bu09/jkZMFyUMUKB1CsEyO2HArhIBbAs/B/OlZwCVwyUJT5gnUNpmOf+FzhxNhV3s tlHiRr9EJNBtMRiHWcDVNtfKYcmon3h6fMIZa7VGK4vPF0c9d29CLfCnKVcex/MxomcU 0ZCewK4GltfNXRiboEoxNsSXPmp1cKQ/GPXNv6BinNI5JlOHWYgot9IcOfiSSF9crnSI UXjQ== X-Gm-Message-State: APjAAAU6Ol7Gkxtq1BY7veOzh20dtOyVOc9QgeG8sUwVrB0tvVPJv7/x Me27LWKDMmc8IC31ZaR3lblUgA== X-Received: by 2002:a37:a2d8:: with SMTP id l207mr18964343qke.492.1561421661964; Mon, 24 Jun 2019 17:14:21 -0700 (PDT) Received: from cakuba.netronome.com ([66.60.152.14]) by smtp.gmail.com with ESMTPSA id s11sm7357466qte.49.2019.06.24.17.14.20 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 24 Jun 2019 17:14:21 -0700 (PDT) Date: Mon, 24 Jun 2019 17:14:16 -0700 From: Jakub Kicinski To: Brian Vazquez 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 Subject: Re: [RFC PATCH 2/6] bpf: add BPF_MAP_DUMP command to access more than one entry per call Message-ID: <20190624171416.2a39f4c7@cakuba.netronome.com> In-Reply-To: References: <20190621231650.32073-1-brianvv@google.com> <20190621231650.32073-3-brianvv@google.com> <20190624154558.65c31561@cakuba.netronome.com> Organization: Netronome Systems, Ltd. MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 24 Jun 2019 16:35:05 -0700, Brian Vazquez wrote: > 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; > }; Ah, okay.