From patchwork Wed Jan 16 01:07:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonghong Song X-Patchwork-Id: 1025578 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="AO0ivqo9"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 43fTbV2qxcz9sDT for ; Wed, 16 Jan 2019 12:08:06 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727133AbfAPBHv (ORCPT ); Tue, 15 Jan 2019 20:07:51 -0500 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:55162 "EHLO mx0b-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726841AbfAPBHu (ORCPT ); Tue, 15 Jan 2019 20:07:50 -0500 Received: from pps.filterd (m0148460.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x0G14fb1004581 for ; Tue, 15 Jan 2019 17:07:49 -0800 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=Gy50ttPK4NMct6BR1qUTXQJMh4jTKQDxGvV03abHk7k=; b=AO0ivqo9h/sTbChOEU/AW+dshPe9B6Yp6g3/U8tynkDMcF3srsVfTCzxbf8jraaIT0UK hqaMbCMj+BAugiOzICJbFrhuEhX/AxyO5zhlwbNV+JohXhdMxo7ljPvgX9CUVyFtCJ1v MkjktPh6Rwi+jJ9urysMnfGmZIN3WVEuSf4= Received: from maileast.thefacebook.com ([199.201.65.23]) by mx0a-00082601.pphosted.com with ESMTP id 2q1rpc8b8x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Tue, 15 Jan 2019 17:07:49 -0800 Received: from mx-out.facebook.com (2620:10d:c0a1:3::13) by mail.thefacebook.com (2620:10d:c021:18::173) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA) id 15.1.1531.3; Tue, 15 Jan 2019 17:07:48 -0800 Received: by devbig003.ftw2.facebook.com (Postfix, from userid 128203) id E446737028EE; Tue, 15 Jan 2019 17:07:46 -0800 (PST) Smtp-Origin-Hostprefix: devbig From: Yonghong Song Smtp-Origin-Hostname: devbig003.ftw2.facebook.com To: CC: Alexei Starovoitov , Daniel Borkmann , , Yonghong Song Smtp-Origin-Cluster: ftw2c04 Subject: [PATCH bpf-next 0/5] bpf: support __int128 in BTF Date: Tue, 15 Jan 2019 17:07:46 -0800 Message-ID: <20190116010746.3620112-1-yhs@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-01-15_09:, , 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 Previous maximum supported integer bit width is 64. But the __int128 type has been supported by most (if not all) 64bit architectures including bpf for both gcc and clang. The kernel itself uses __int128 for x64 and arm64. Some bcc tools are using __int128 in bpf programs to describe ipv6 addresses. Without 128bit int support, the vmlinux BTF won't work and those bpf programs using __int128 cannot utilize BTF. This patch set implemented BTF __int128 support. Patch #1 added __int128 support in the kernel. Patch #2 added raw test for __int128 in test_btf. Patch #3 refactored test_btf bpffs pretty print test to allow different map value structures. Patch #4 added bpffs pretty print test for __int128. Patch #5 added __int128 support in bpftool map pretty dumper. Yonghong Song (5): bpf: btf: support 128 bit integer type tools/bpf: add int128 raw test in test_btf tools/bpf: refactor test_btf pretty printing for multiple map value formats tools/bpf: add bpffs pretty print test for int128 tools/bpf: support __int128 in bpftool map pretty dumper kernel/bpf/btf.c | 104 +++++++-- tools/bpf/bpftool/btf_dumper.c | 98 +++++++-- tools/testing/selftests/bpf/test_btf.c | 284 +++++++++++++++++++++---- 3 files changed, 418 insertions(+), 68 deletions(-)