From patchwork Mon Feb 7 13:14:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Sitnicki X-Patchwork-Id: 12737258 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1B3D8C433EF for ; Mon, 7 Feb 2022 13:47:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1388043AbiBGNqZ (ORCPT ); Mon, 7 Feb 2022 08:46:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1449004AbiBGNPE (ORCPT ); Mon, 7 Feb 2022 08:15:04 -0500 Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B3D7C043181 for ; Mon, 7 Feb 2022 05:15:03 -0800 (PST) Received: by mail-lj1-x230.google.com with SMTP id z20so19532810ljo.6 for ; Mon, 07 Feb 2022 05:15:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudflare.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ogTHEJ6u2M62tUs2AjfjDpWnGrLDSdZkHRs0/05Ftio=; b=IcucMnOntR53bFU9rFuJNUllXAos1otMSmN+SCvxVFHf77e2OHIhJJYbY5CKnsChN7 xgoCeHz7NBRTmyXx6Fo2+YDc3JQU3RgeyVwpN+0E2zrbaKurY+z0rTlrvAhZY/4yrNWQ 4Tftbk7WksSPA42zgpq7rlE6MoPkPuk9jahog= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ogTHEJ6u2M62tUs2AjfjDpWnGrLDSdZkHRs0/05Ftio=; b=7ggSHmx4iXF3+zJ2+kNGDOTgUYug0Tjn6NG/Elox3ANwWy3DfIp7ZgTCCDzEX/XqFJ OAKBm4RgyuLzf3UNodlInt5lvr6IsHWaNRzfW+gMfTqtUWlM7BFexarheFmMAawNZ5oh C529H1sIdlSlSvZJSGSVGW5eXM1CS9c2HumlLDNkWr8OwXaDkcb8AePTwaQqS3mZoN4t HjO6ajKO4d6qvYaIWUzUSJrWyzUR4LCL2O3KBSaL9Ff1INQmTNa40Y4USui1+mh2wV9k R8+QyRSzICmKKsv66oBnSfAIL3Axg6d4bqyGGVrXA6nRGEIfeIX0PRxbGT9laYEGG7lW lBgg== X-Gm-Message-State: AOAM531PCUnE3ABUFGQXsAFhTTa+nALl413WPvVgYD9OLHWgesCPSH2p h4OM+WdqFcBKHG1Pv8L/npS+dwRuNbh5Tg== X-Google-Smtp-Source: ABdhPJxmwcxQe/2G1oOhTH9jv/pfwdnFtMio0JqRY44WvhOAjdpwfOKMwD3WKiw0bTLOVcb/u4fDxg== X-Received: by 2002:a2e:8948:: with SMTP id b8mr3398982ljk.36.1644239700826; Mon, 07 Feb 2022 05:15:00 -0800 (PST) Received: from cloudflare.com (user-5-173-137-68.play-internet.pl. [5.173.137.68]) by smtp.gmail.com with ESMTPSA id z5sm657415lft.210.2022.02.07.05.15.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Feb 2022 05:15:00 -0800 (PST) From: Jakub Sitnicki To: bpf@vger.kernel.org Cc: netdev@vger.kernel.org, Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , kernel-team@cloudflare.com Subject: [PATCH bpf-next 0/2] Split bpf_sk_lookup remote_port field Date: Mon, 7 Feb 2022 14:14:57 +0100 Message-Id: <20220207131459.504292-1-jakub@cloudflare.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: bpf@iogearbox.net Following the recent split-up of the bpf_sock dst_port field, apply the same to technique to the bpf_sk_lookup remote_port field to make uAPI more user friendly. Jakub Sitnicki (2): bpf: Make remote_port field in struct bpf_sk_lookup 16-bit wide selftests/bpf: Cover 4-byte load from remote_port in bpf_sk_lookup include/uapi/linux/bpf.h | 3 ++- net/core/filter.c | 3 ++- tools/include/uapi/linux/bpf.h | 3 ++- tools/testing/selftests/bpf/progs/test_sk_lookup.c | 6 ++++++ 4 files changed, 12 insertions(+), 3 deletions(-)