Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp113240ybc; Mon, 18 Nov 2019 21:29:08 -0800 (PST) X-Google-Smtp-Source: APXvYqx+pCmv15o6dcYgtSturk2J7Hahk7Nxwn6G1ZDO6kL1q97ln8Wtl8Pp7nobekE5xTZVtDFz X-Received: by 2002:a17:906:d71:: with SMTP id s17mr32104195ejh.312.1574141348307; Mon, 18 Nov 2019 21:29:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574141348; cv=none; d=google.com; s=arc-20160816; b=zBQf5f+o1a11za7i51qRtIYyacSMhka3SAFkrkK9kpfQmEO7bYAGUwM0fGq+0asytZ 73Hg6g6iMAfMl8vEIhhLnJvrrT2GOM8hkOrVHuPV1f786NQAwdQIlAxUQ2Tp5S3Y1Ju5 vwa+3NFwuIYyfvcQR7hX2hveaNcG+HjYpa9ZFjrcGzO/aUwaZGKrsRUwA0/i1vbUZGZH aQq7zelV3GqRG2FP1bdcVnpxOBHHwJFN2Sk4kb+71sFGkAEpnZKJ7GZKO20PXTXzXESC nTNZHCYDL9v4ADaMlI2i8Qg9lEeF+/jwKDj5PXBOIcIkH2IkC6E8l6wh24V9Ze+fYgeU fI6A== 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=podFF2nwPATgk6Vyaa+JKA//o6jLZZVDQvx/NXLG1qw=; b=iBp7INEfpqk9BD0ON78M+OsxFQZdfGqP76ZR+sBtQAwh8QnV8et0PDBUp2ONdhx1NS cKpTqatR7lC6tgewdNrgVApBCeORgI4/c9tUtKBkWoS7SombClRNvFR1Gr2MhUdIBTZC vlL0GUCVwBAHMy2HxUv2DULBu2WdIawYeLv+Nn9J6pEQSA6z0zUZnSjieREanucKDIZw GGkD5mUWc3c/xmqcm0jB1bXVv9uZTrog/X6zMx3vwVYFAPxPkA7V3Ov0OKxsAIpnOePy ruVkg1PMEzcts2F8Zzv8gz4b8GaumBe48Zb4claAtiObcOaAd1icFFX/WXs8/jd3x22W L63w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=KyWCOhP8; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d47si16452287ede.139.2019.11.18.21.28.44; Mon, 18 Nov 2019 21:29:08 -0800 (PST) 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=@google.com header.s=20161025 header.b=KyWCOhP8; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728573AbfKSF0b (ORCPT + 99 others); Tue, 19 Nov 2019 00:26:31 -0500 Received: from mail-qk1-f193.google.com ([209.85.222.193]:40649 "EHLO mail-qk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728572AbfKSF0a (ORCPT ); Tue, 19 Nov 2019 00:26:30 -0500 Received: by mail-qk1-f193.google.com with SMTP id z16so16749005qkg.7 for ; Mon, 18 Nov 2019 21:26:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=podFF2nwPATgk6Vyaa+JKA//o6jLZZVDQvx/NXLG1qw=; b=KyWCOhP8jnpTna7LokuJ3F0YPjpGUTp7v8hiLdPCgezIrdQViDb5ELCsIgqA+PbW7V 3hfj6V5icMIBejEYWnkhZfwtBaL9nKmrwhkhajivZ5Yy8fDRwTR7nNSViN48nzdzR4RL z0UjUmwB1jqafeMb0lIDHDKFQAyNgYrmApymj8vZ2y5GfYY8Ag7Fqahe3sB9XLqxmTcA bdjaL5FGV9B20YEyeHawFdceEettYdOYR8a1LJDxavzTYLJV+3OPThmSgCSxaKp45FfS oWtmlStL+Ct/bbTpMr6kEjr71Nse3C8LetBocRbMpqYjHPgmtAFxSdcNI8k8ju5qZUa2 m35Q== 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=podFF2nwPATgk6Vyaa+JKA//o6jLZZVDQvx/NXLG1qw=; b=MsGFRFaeS48uxztxHdIJN6RNzOXi6qmXqCD0xbvLVIqxx49Wn/ZoO/w69yDA6AoKJs wDwP4tXH4dlNl8LcLrfL4E0GM7WvUYr7y3W2ZfQCj8rCz2NdRx12ejE/KK0ExwkqF2ev 2pe2e6ZW5CH8Y2iTmBrLfT8ld/9J5vv35CvpEbLlcez4k+ebfMvyEbmdYarJm8OxmywZ fh0VxzS4oAx1d2xgWgPyejddQ893d4XQJvAH8X9hUHabtdSw+XHjlAWCAjFLdL3+AdnP 8dAbPoZWCX4LaZZNw9FHPLaCsGUooKFgRj1q/ijmDaostdLS7AnVKK1WSFzCXbx3K6q5 92rA== X-Gm-Message-State: APjAAAUwH+/05Cm5BpY94VkfOKKTTIr5VlgNyUEOcU+ZSpsYWfEuNun6 AhTr79tuAk2TQOx4orJgW5gANyD2Ra9DaTakzScHxg== X-Received: by 2002:a37:94e:: with SMTP id 75mr27389233qkj.49.1574141188100; Mon, 18 Nov 2019 21:26:28 -0800 (PST) MIME-Version: 1.0 References: <20191119014357.98465-1-brianvv@google.com> <20191119014357.98465-6-brianvv@google.com> <20191119042012.3wpj5porwkntpfm4@ast-mbp.dhcp.thefacebook.com> In-Reply-To: <20191119042012.3wpj5porwkntpfm4@ast-mbp.dhcp.thefacebook.com> From: Brian Vazquez Date: Mon, 18 Nov 2019 21:26:17 -0800 Message-ID: Subject: Re: [PATCH bpf-next 5/9] bpf: add batch ops to all htab bpf map To: Alexei Starovoitov Cc: Brian Vazquez , Alexei Starovoitov , Daniel Borkmann , "David S . Miller" , Yonghong Song , Stanislav Fomichev , Petar Penkov , Willem de Bruijn , 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, Nov 18, 2019 at 8:35 PM Alexei Starovoitov wrote: > > On Mon, Nov 18, 2019 at 05:43:53PM -0800, Brian Vazquez wrote: > > From: Yonghong Song > > > > htab can't use generic batch support due some problematic behaviours > > inherent to the datastructre, i.e. while iterating the bpf map a > > concurrent program might delete the next entry that batch was about to > > use, in this case there's no easy solution to retrieve the next entry > > and the issua has been discussed multiple times (see [1] and [2]). > > The only way hmap can be traversed without the problem previously > > exposed is by making sure that the map is traversing entire buckets. > > This commit implements those strict requirements for hmap, the > > implementation follows the same interaction that generic support with > > some exceptions: > > > > - If keys/values buffer are not big enough to traverse a bucket, > > ENOSPC will be returned. > > - out_batch contains the value of the next bucket in the iteration, not > > the next key, but this is transparent for the user since the user > > should never use out_batch for other than bpf batch syscalls. > > > > Note that only lookup and lookup_and_delete batch ops require the hmap > > specific implementation and update/delete batch ops can be the generic > > ones. > > > > [1] https://lore.kernel.org/bpf/20190724165803.87470-1-brianvv@google.com/ > > [2] https://lore.kernel.org/bpf/20190906225434.3635421-1-yhs@fb.com/ > > > > Co-authored-by: Brian Vazquez > > Signed-off-by: Brian Vazquez > > Signed-off-by: Yonghong Song > > SOB order is not quite correct. > If the patch was mainly developed by Yonghong it should have his 'From:' > then his SOB and then your SOB. > You can drop Co-authored-by field. > Thanks for clarifying, will fix in v2. > Patch 2 was also mainly done by Yonghong or not ? > If so it should have his 'From:' field.6504484251 Generic support was done by me, but will double check the rest of the patches and fix them if needed.