Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1273159imm; Sun, 2 Sep 2018 16:50:36 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbQ9+GDTxZoYHkhY5ORbpn5I6WjDCZPUMq4fQD+sWM0rXBKSgqUiUx7rmJ3Fa0dVU42hbNn X-Received: by 2002:a63:3e8b:: with SMTP id l133-v6mr23370543pga.355.1535932236789; Sun, 02 Sep 2018 16:50:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535932236; cv=none; d=google.com; s=arc-20160816; b=fXvGdo102oqTdp8lvEN6BDlO3CqHE104607DCImedBHldtaiadl64o9xEGAnWfgVD+ Abb1fPChpNN9bmHKKVH2gtlPM3BMB9YXYunrYv53cTxQClJq/jkKn5zJlMbox35+tceP lSSuBotCQxD9akdNhBld4d63e2W8BfaS+4TZjE+pQASyp1k/VaJnquSmBp7TOZk/tSaP quWaSX8AvCBx0bTNVEp/59iqE9WEY8RtwyFgyGXHJoP+axw//Ee/NcDEji1aCxfqxR+M 9vFymdUw4Wu19frkLnMtI9oinwp6Otl5x8RpbQn4kJYH4NUE1oMtlTx4DsyBdB8ow+JU /u1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=sFaPtY6nI7qDQThR+HnBM/AIrP7kAf9zPQVSwd4WFro=; b=0R1bn5KRhPI/OEA3QhLe5jiBJBfv1B1mJS/KDYkklATASANNfsy1Qw3ig/jwHWU+ml kOQZQxnG9aEFyN33lb1K6BawNGVn/RKXeRhD9M3Msy+/KOCudryMpkPp0HT6wtMH/30k 6ju+e5MEK5YJVfFcgRX7yHNkCfrk3nRgmVd9kczwLtR6Ed7V4ZP2iyZ8YQFqjVQ8l6PE oV0PlZjDkSLB9E3MHOuZYXNM0NodgVjDp3HqjnWA4+UiiFl9AArJdwVTkiWC55m6Yxs9 2mutVsz6qr4Qr8YGBto4D9MicgNdjzTK2cX/Qv58aqR7HJhQAXsio4SPVyXDRBCX+q7B nPng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=UZuyQXp+; 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 u91-v6si16572889plb.73.2018.09.02.16.49.56; Sun, 02 Sep 2018 16:50: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=@gmail.com header.s=20161025 header.b=UZuyQXp+; 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 S1727295AbeICDsE (ORCPT + 99 others); Sun, 2 Sep 2018 23:48:04 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:38365 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727072AbeICDsE (ORCPT ); Sun, 2 Sep 2018 23:48:04 -0400 Received: by mail-pl1-f193.google.com with SMTP id u11-v6so7771989plq.5; Sun, 02 Sep 2018 16:30:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=sFaPtY6nI7qDQThR+HnBM/AIrP7kAf9zPQVSwd4WFro=; b=UZuyQXp+vZlyU+kv/moj5oJNA3T3olN85ySmDTxpWdqlGBEuKMpbZd63Q94ULZa1sW 37iulkiEntrNWIorUWcnwfxcMqlPVj4nLYtN9TpHC6MeOtWxdEa6Whuup3dav2n5aCzy yjSda13KgYgWnTf2AllkAjvbWFJMIdWQqUJAfasHnNk2yTp/PNDFb3/nHZintH8KxFq8 GThxBynawjbicOgw7/bLAihzs3o+vroBLcKpdNCIJwIKXp2IHRjEnkn+w1B12hIa6zbe oQBI7UcfQGWmzmg7Hf+KysfGlDkg5zOM9PlVasqQVb+V+oPPVPkJR9kk9ycG2iTSGENu zI6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=sFaPtY6nI7qDQThR+HnBM/AIrP7kAf9zPQVSwd4WFro=; b=oxNZk+eBhhFA73sSFJ3fvl/J5TkGn8oe+k3QjWs6IPdl6Tz/0a/mkVudenWpE9pZZ+ z/dcw+oKYTB7cUTh0XkrrPgOD9Z+LwJAd9YTAIE0cxwlCtlVsgIn1Wd5JK4Gc16TaOlh bIlFDQg8wkxCw3tgrthz3gPr1yvTqyux/IiPXWwbwKHMlB7LpqmVdauVBob8C1p7r4Kn AMOfmqZ1OWswCPqt/G6Tqexv8EEo9gaVc/FHgakv35gfftRKweU5pZKGcjd9wkKBPiyf y20iYY4wpF/PjZa6mH6NwsdkItnUTkiQauou04l6HBqlVPTIyLIJPgtvxeSZG4K/b4OY biog== X-Gm-Message-State: APzg51DGg5f/f+zifxvCZWnsui+xMLHVHpdMzfkBqgXuSfOlGyd4txFv 9Mm5V6UNhXedjJjg3KVlD1JYGpfH X-Received: by 2002:a17:902:8ec8:: with SMTP id x8-v6mr25700197plo.308.1535931036420; Sun, 02 Sep 2018 16:30:36 -0700 (PDT) Received: from localhost.localdomain ([211.196.191.92]) by smtp.gmail.com with ESMTPSA id d19-v6sm25345583pgi.50.2018.09.02.16.30.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 02 Sep 2018 16:30:35 -0700 (PDT) From: Taeung Song To: Daniel Borkmann , Alexei Starovoitov Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jakub Kicinski Subject: [PATCH bpf-next v2] libbpf: Remove the duplicate checking of function storage Date: Mon, 3 Sep 2018 08:30:07 +0900 Message-Id: <20180902233007.3003-1-treeze.taeung@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org After the commit eac7d84519a3 ("tools: libbpf: don't return '.text' as a program for multi-function programs"), bpf_program__next() in bpf_object__for_each_program skips the function storage such as .text, so eliminate the duplicate checking. Cc: Jakub Kicinski Signed-off-by: Taeung Song --- tools/lib/bpf/libbpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index 2abd0f112627..8476da7f2720 100644 --- a/tools/lib/bpf/libbpf.c +++ b/tools/lib/bpf/libbpf.c @@ -2336,7 +2336,7 @@ int bpf_prog_load_xattr(const struct bpf_prog_load_attr *attr, bpf_program__set_expected_attach_type(prog, expected_attach_type); - if (!bpf_program__is_function_storage(prog, obj) && !first_prog) + if (!first_prog) first_prog = prog; } -- 2.17.1