Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp5479171rwp; Mon, 17 Jul 2023 05:04:04 -0700 (PDT) X-Google-Smtp-Source: APBJJlHbZf6ZowSO7VOl45DJfvbIGqsICuvTnyyYZ9BAfBsOBauGE2/h7vGnKSJ02S31pl3DFciP X-Received: by 2002:aa7:c74d:0:b0:51d:f37b:1b4e with SMTP id c13-20020aa7c74d000000b0051df37b1b4emr10162332eds.19.1689595443874; Mon, 17 Jul 2023 05:04:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689595443; cv=none; d=google.com; s=arc-20160816; b=Onf17WMrPPlvgsU62xaA4qG/QtA4CgDGvSYDJJvydO6zR0G03+inJJ2X7ik06R4hhc 3ImK9rxGtXNcdjlCHniGgNwdWWrTHhBP/Zv8SGus2LgFY59D3zqsdT9w5vsrIkTF02+O P9R726o3jcPkj1zXjhx/p2MexTqM6qO+DtVXngSyz5YVP7bgPoRqsOcEUI/NGuLQD9WC mLRFraE40sqZ4aBXpx/8ljw4MtC/nphFwqPVhJFb/JL5sz3HkJ2M118I9/dCnM1dK41S zyrfsPPU1xV1URIKMOG3WQv4dX3L0qloH84BpbpU42hdqraX7JvTIuKfKdEETx92IzKd 9gyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=ZKTphFs/0fUMI6x6m+ZFbX49TRFXCAOA52jjQxvzeo8=; fh=YdAhxi0bx/OySu0JO8LdM4GJk2EzSySwAjphKrwyQzo=; b=SP5wo7NhjLXA6uf9n3PmzgIGUWPLa+Ds4hh+eOpRKmYP8Ptrw8wYq0hiY+JrzLGvur T8duHLX0zX7LrdgOSMLe07DrbaYQosjV17XGjRLlp3tqKeEvTTW2r7FqgDHSC5uWBDN4 8R6u/LTZXmMLxvhNxSl34w/a8KD1+6oNfPs1enAfKrPHqPtzH0WW7yDI31H6pTL8lmDb QVV97pe1ljv183JKUd+vdlVAAOocodgOk/HgQ1uGfM/HvegxxNcpwPmZHLtMwtdkIlaB xpSrVXfss7rUq251Q2QQ5vjlgkvOmb5GxesZpvGUdDfcHCPZ8q8GaavBijXVVclNbR2W Y+2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@isovalent.com header.s=google header.b=QYSbwMA+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=isovalent.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f9-20020a056402150900b005219bddd8cesi560855edw.393.2023.07.17.05.03.38; Mon, 17 Jul 2023 05:04:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@isovalent.com header.s=google header.b=QYSbwMA+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=isovalent.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230239AbjGQLmL (ORCPT + 99 others); Mon, 17 Jul 2023 07:42:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229802AbjGQLmI (ORCPT ); Mon, 17 Jul 2023 07:42:08 -0400 Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E85ABF for ; Mon, 17 Jul 2023 04:42:01 -0700 (PDT) Received: by mail-lj1-x22a.google.com with SMTP id 38308e7fff4ca-2b741cf99f8so64790871fa.0 for ; Mon, 17 Jul 2023 04:42:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=isovalent.com; s=google; t=1689594120; x=1692186120; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=ZKTphFs/0fUMI6x6m+ZFbX49TRFXCAOA52jjQxvzeo8=; b=QYSbwMA+9+0U1iPPhZdTiMrew32RjYNuoUXQ6XvY6T4k4RDyS+EpVKrFJNRbwyLBhm feXtYMeVmswrIvAsVK2UZKlPxXhoLtpKIhZ1zgv3WtUAyQxe4TEmoaVCiALplF8mIWsC 4hCW/LKPlzZGxI3cgrxkgXqrUnm0sw2jstpQabiy8OBmcfhY/qRhJLrFWjCBC0BlFZKC e3/mS3uLLida7lprgFw766suZ2akD1y/OfKdrUqsoUKDoGljr2zDC2OyGKgwTjbJwCak Svr+Pu7MxeI148S7BrhN1CSfEYfahmvMM2ysCsZrD0peo/sH0Bba6HJ4H5CnEreKMpWe cuuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689594120; x=1692186120; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ZKTphFs/0fUMI6x6m+ZFbX49TRFXCAOA52jjQxvzeo8=; b=Wtk0fO5PvUybaodXuJPpRZPp0jxYHJPYTVOWYiU5pqhgUAJTzGiQMZviP4pCGXGrra O2XUUjfEWkITLgXlgvoeeyLOZXoupPdDmHNvnpgC3l1vQLrUinAuJedB2V4Enjv5yA1/ kRll0ioCLLOMVilnNWvbQRnjETBqht3qu1lAJZaMfFf3wqs6JPKvxTrlWwJc5U3e8a8p w04AxT3xAHAs+O61J46ac7pAhiIhz2AvjB39c6udyXWR+GAPiTI51q5JrBAPeXvXy1zq QBeitLSZ4dW1/6Kyq0Rc1kmgb/XFXbheB+wgBSqx/wJwmlJ4maj4wZH+yDXT65/nDMmn CnFw== X-Gm-Message-State: ABy/qLYE5vGmYhJnSP9P2s2rKk81hfgPQrRILXiAY4uOCJwMc9oJ10zi J/bmLDF1AHf4fv44PcJMBoLQoQ== X-Received: by 2002:a2e:9c93:0:b0:2b6:e618:b593 with SMTP id x19-20020a2e9c93000000b002b6e618b593mr8066901lji.31.1689594119785; Mon, 17 Jul 2023 04:41:59 -0700 (PDT) Received: from zh-lab-node-5.home ([2a02:168:f656:0:1ac0:4dff:fe0f:3782]) by smtp.gmail.com with ESMTPSA id v9-20020a05600c214900b003fbc9371193sm7946725wml.13.2023.07.17.04.41.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jul 2023 04:41:59 -0700 (PDT) From: Anton Protopopov To: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Brian Vazquez , Hou Tao , Joe Stringer , bpf@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Anton Protopopov Subject: [PATCH bpf-next 0/2] fix setting return values for htab batch ops and docs Date: Mon, 17 Jul 2023 11:43:05 +0000 Message-Id: <20230717114307.46124-1-aspsk@isovalent.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is a small follow up to the conversation with Hou in the following thread: https://lore.kernel.org/bpf/20230705160139.19967-1-aspsk@isovalent.com/T/#u Namely, the conversation was about that comments in describing the return values from the batch operations are not 100% obvious. I tried to make comments more clear. While doing this I also found that this is better to patch how __htab_map_lookup_and_delete_batch sets return values: the output parameter count could be set to non-zero in case of error, which may confuse some userspace apps (as errno && non-zero counter is considered a partially successful operation for batch ops). Anton Protopopov (2): bpf: fix setting return values for htab batch ops bpf: update uapi/linux/bpf.h docs on the batch map ops include/uapi/linux/bpf.h | 22 ++++++++++++---------- kernel/bpf/hashtab.c | 14 +++++++------- 2 files changed, 19 insertions(+), 17 deletions(-) -- 2.34.1