Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp511136ybc; Fri, 22 Nov 2019 08:39:03 -0800 (PST) X-Google-Smtp-Source: APXvYqwQu3FwCoN2oEFUoOQ5DdgJxdUjvLowPBVl9j5z62zUN8U6hcsbXhKzy9b36ZqUEuhJ2LrI X-Received: by 2002:a17:906:9482:: with SMTP id t2mr6396922ejx.38.1574440743174; Fri, 22 Nov 2019 08:39:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574440743; cv=none; d=google.com; s=arc-20160816; b=E3V+OPYsvredFXay6QcH7jOpV551S7A8qjZ4iedCpPoXP1ZhI2l+EG0ArhFBHk3fNs 7rqeJ8InAcVOoUTVFom/4OuEyUHtd9LrXu34HUV/ohxTLjlT+11JpD6S599kIYpDev4T xQOZgCFST3q9882z5elWL9yA5DR8Scb4FuP3l4nfZc7xOrVqBscI8CS5MIuPm2AV8bgT V/6izmm+pd25DzBJtydCE1+gd4Ci14m83wXm7WrhMjMmlH8SnTcTXE6PvgzkR4V/CBmm 9K0seBXd4mBpF5XyhzUeWejI6IXBwELOa/Pg4vpApjdz43Vyv/3GA7u9vMBJmzOhV50h OzUA== 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 :subject:references:in-reply-to:message-id:cc:to:from:date :dkim-signature; bh=D+UWHveIo6FHihN6iLKYJHZLO5XGbq5iDrl2TrjPdEY=; b=dM+fcBz4tfZuEZZ4GrtScPqwF8I5E8lOwABYaI3EUvPRzhiOi7+cTFDo63KQYyY2xe Pgj7qt8+wOTPmO3Dye7zskJ0NtsaSRox37+0OjRkjTGy3bWSZXiTkfKwM4D5THlbVt7M mo2xa7o/DEzqffOoX/WewebDSjxfUqWGtA+cGioQOdClUpoVNgECsk4Q7EZ9JKI9k+an DMzj3rfSPcO4tyKCkB8nIYYNZ4D1Qs8Obba0D6DX+MapAF+Mf+18bpbDvigDgktjkLsj GBJ5bj6fv2y2dpSkOPs8QYn8JQ2G/YlpQ5gXcaThHMX4baPNtj5kOQiMEC2KH99s3L3Q /YAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=NudE6m8b; 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 m19si1427630ejj.437.2019.11.22.08.38.38; Fri, 22 Nov 2019 08:39:03 -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=@gmail.com header.s=20161025 header.b=NudE6m8b; 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 S1727489AbfKVQgx (ORCPT + 99 others); Fri, 22 Nov 2019 11:36:53 -0500 Received: from mail-pj1-f67.google.com ([209.85.216.67]:43296 "EHLO mail-pj1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726046AbfKVQgx (ORCPT ); Fri, 22 Nov 2019 11:36:53 -0500 Received: by mail-pj1-f67.google.com with SMTP id a10so3248187pju.10; Fri, 22 Nov 2019 08:36:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:message-id:in-reply-to:references:subject :mime-version:content-transfer-encoding; bh=D+UWHveIo6FHihN6iLKYJHZLO5XGbq5iDrl2TrjPdEY=; b=NudE6m8b0+C+lesIyiJH3cHlgQpOtb7ed8r1UbZEKDp1CojGwyAuVqi5+C4HahBwYI XXIjTX+l+hI/0RBqOcx9Lr9UnNyETGfmX1GNzSxWe0TAskD4zPkJQoiYxgg4TpDRNscH oItXkG+61ojThm4Zc6eYDlB8fezXD4IShCECXE70Esfd6Ed+UNTpJjsdWt4CJchHJZzo 1PdmYpFmR/T2JnzrKEK/7EZb9AmaorQurRGRNK2BPMTiJel7Qtr4oo+KAlkzBYzwZ93+ OGyV3SKNUHfoykoAhgE4Vk3bSTZJe0wbN/sj95nGqORZZ5XrotjM4+ywa0CEJJqwRjMc oThg== 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:message-id:in-reply-to :references:subject:mime-version:content-transfer-encoding; bh=D+UWHveIo6FHihN6iLKYJHZLO5XGbq5iDrl2TrjPdEY=; b=kr2yg4kJv4KNjjll4BR5Qjq7udBcDKHmNc3hjyN/tDppCm7yV4DQZRdVNWjjhdPbuM xESOHvGMxruB5ZrEA2NBcBPf6nry1QoFy6iHRVd+598uc7L2oENEl6PWonEkORolIUa4 V4qfAABrXsRrY1hhagXxK5CEuoL4tn7wH1byVboICTOS814fgSF2QooeE42Upx26HhV5 univh/2D9BV7hAgjl1xVUOoeczBoWXNX1jhY+ORc67stehZEM/2MU+dZLSYiC5QIf/Ta c4gtVBFRGVXNrJu+Pcd+OoFWh+Yz5TzTQExiIjpGS8VmMEhG8EDh5b2fahi7mkCSlYAA NdpA== X-Gm-Message-State: APjAAAV6GGknY3moUNksnTXRSfWK4tU1EDYWvDCNaVw3THRbkSGcRYWH XCH3PUEDTmKlXN7A5TUjrYNdxbyU X-Received: by 2002:a17:90a:25ea:: with SMTP id k97mr19433680pje.110.1574440612634; Fri, 22 Nov 2019 08:36:52 -0800 (PST) Received: from localhost (198-0-60-179-static.hfc.comcastbusiness.net. [198.0.60.179]) by smtp.gmail.com with ESMTPSA id d11sm6612582pgq.67.2019.11.22.08.36.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2019 08:36:51 -0800 (PST) Date: Fri, 22 Nov 2019 08:36:50 -0800 From: John Fastabend To: Brian Vazquez , Brian Vazquez , Alexei Starovoitov , Daniel Borkmann , "David S . Miller" Cc: Yonghong Song , Stanislav Fomichev , Petar Penkov , Willem de Bruijn , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, Brian Vazquez Message-ID: <5dd80ea2da121_690a2ae784a225c44f@john-XPS-13-9370.notmuch> In-Reply-To: <20191119193036.92831-2-brianvv@google.com> References: <20191119193036.92831-1-brianvv@google.com> <20191119193036.92831-2-brianvv@google.com> Subject: RE: [PATCH v2 bpf-next 1/9] bpf: add bpf_map_{value_size,update_value,map_copy_value} functions Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Brian Vazquez wrote: > This commit moves reusable code from map_lookup_elem and map_update_elem > to avoid code duplication in kernel/bpf/syscall.c. > > Signed-off-by: Brian Vazquez > --- > kernel/bpf/syscall.c | 271 ++++++++++++++++++++++++------------------- > 1 file changed, 151 insertions(+), 120 deletions(-) > Nice bit of cleanup. Acked-by: John Fastabend