From patchwork Mon Mar 11 00:44:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrii Nakryiko X-Patchwork-Id: 1054082 Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=fb.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=fb.com header.i=@fb.com header.b="ALswcTfU"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 44HfWF2Y7zz9s4V for ; Mon, 11 Mar 2019 11:44:24 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727022AbfCKAoT (ORCPT ); Sun, 10 Mar 2019 20:44:19 -0400 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:36194 "EHLO mx0b-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726758AbfCKAoT (ORCPT ); Sun, 10 Mar 2019 20:44:19 -0400 Received: from pps.filterd (m0109331.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x2B0cV13022252 for ; Sun, 10 Mar 2019 17:44:18 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=facebook; bh=tfRD+comb/TbDh5iY2nxaPZTcPwMgLHSqGffZsxf94o=; b=ALswcTfUd2G/rMVl1sZVV7h4enhC7urwTUINlYPSj53qQEPppT3bkby03tqr+L3bYPCv CJUe+V2X90Yoj4SLZ4YT+xaOcgfJwQAYoAnxZvsJuisnlqhUW1/RC8IwSTKd5XR6ZvA5 0PeIP03RMb4G7naiUnzHNwcpOq1/z8uhOgs= Received: from mail.thefacebook.com ([199.201.64.23]) by mx0a-00082601.pphosted.com with ESMTP id 2r59f80d8y-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Sun, 10 Mar 2019 17:44:18 -0700 Received: from mx-out.facebook.com (2620:10d:c081:10::13) by mail.thefacebook.com (2620:10d:c081:35::128) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA) id 15.1.1713.5; Sun, 10 Mar 2019 17:44:17 -0700 Received: by dev101.prn2.facebook.com (Postfix, from userid 137359) id C8AC3861444; Sun, 10 Mar 2019 17:44:16 -0700 (PDT) Smtp-Origin-Hostprefix: dev From: Andrii Nakryiko Smtp-Origin-Hostname: dev101.prn2.facebook.com To: , , , , , , , CC: Andrii Nakryiko Smtp-Origin-Cluster: prn2c23 Subject: [PATCH bpf-next 0/2] Add fwd enum resolution for btf_dedup() Date: Sun, 10 Mar 2019 17:44:08 -0700 Message-ID: <20190311004410.3896503-1-andriin@fb.com> X-Mailer: git-send-email 2.17.1 X-FB-Internal: Safe MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-03-10_20:, , signatures=0 X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This patchset adds ability to resolve forward-declared enums into their corresponding full enum definition types during type deduplication, eliminating one of the reasons for having duplicated graphs of types. Andrii Nakryiko (2): btf: resolve enum fwds in btf_dedup selftests/bpf: add fwd enum resolution test for btf_dedup tools/lib/bpf/btf.c | 51 +++++++++++++++++++------- tools/testing/selftests/bpf/test_btf.c | 44 ++++++++++++++++++++++ 2 files changed, 82 insertions(+), 13 deletions(-)