From patchwork Wed Feb 1 17:31:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jesper Dangaard Brouer X-Patchwork-Id: 13124803 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 63A81C636CD for ; Wed, 1 Feb 2023 17:36:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231612AbjBARgo (ORCPT ); Wed, 1 Feb 2023 12:36:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231635AbjBARgh (ORCPT ); Wed, 1 Feb 2023 12:36:37 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31D747DBCA for ; Wed, 1 Feb 2023 09:35:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675272903; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5X1LhIlH+FTe7KXfPlTsNNBHQmiO7Yhp41s5mysUZys=; b=bSqcju8ffPMoUygVHcuAKGhRKMHvhE7ZpKNsNLw+o8pDrH6RonCYALg558/Zkp4AUwwpM2 HDBop7jrkGgpg0yXcQJ7j4FN4pEJ2g+RfXISuPhlsvQj8IGsRGw/s0m7o/SVYFn2M2+9Np o6QT+K5aWYEz2pBca2MJIV1jrKWtq/w= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-62-VbRmtSLFOpW7LAw_BFKHYQ-1; Wed, 01 Feb 2023 12:31:48 -0500 X-MC-Unique: VbRmtSLFOpW7LAw_BFKHYQ-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0F0F4857A94; Wed, 1 Feb 2023 17:31:47 +0000 (UTC) Received: from firesoul.localdomain (ovpn-208-9.brq.redhat.com [10.40.208.9]) by smtp.corp.redhat.com (Postfix) with ESMTP id 996A0492B01; Wed, 1 Feb 2023 17:31:46 +0000 (UTC) Received: from [192.168.42.3] (localhost [IPv6:::1]) by firesoul.localdomain (Postfix) with ESMTP id 3DD2D300005EE; Wed, 1 Feb 2023 18:31:45 +0100 (CET) Subject: [PATCH bpf-next V2 0/4] selftests/bpf: xdp_hw_metadata fixes series From: Jesper Dangaard Brouer To: bpf@vger.kernel.org, Stanislav Fomichev Cc: Jesper Dangaard Brouer , netdev@vger.kernel.org, martin.lau@kernel.org, ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, martin.lau@linux.dev, song@kernel.org, yhs@fb.com, john.fastabend@gmail.com, dsahern@gmail.com, willemb@google.com, void@manifault.com, kuba@kernel.org, xdp-hints@xdp-project.net Date: Wed, 01 Feb 2023 18:31:45 +0100 Message-ID: <167527267453.937063.6000918625343592629.stgit@firesoul> User-Agent: StGit/1.4 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: bpf@iogearbox.net This series contains a number of small fixes to the BPF selftest xdp_hw_metadata that I've run into when using it for testing XDP hardware hints on different NIC hardware. Fixes: 297a3f124155 ("selftests/bpf: Simple program to dump XDP RX metadata") Signed-off-by: Jesper Dangaard Brouer Acked-by: Stanislav Fomichev --- Jesper Dangaard Brouer (4): selftests/bpf: xdp_hw_metadata clear metadata when -EOPNOTSUPP selftests/bpf: xdp_hw_metadata cleanup cause segfault selftests/bpf: xdp_hw_metadata correct status value in error(3) selftests/bpf: xdp_hw_metadata use strncpy for ifname .../selftests/bpf/progs/xdp_hw_metadata.c | 6 +++- tools/testing/selftests/bpf/xdp_hw_metadata.c | 34 +++++++++---------- 2 files changed, 22 insertions(+), 18 deletions(-) --