From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8E826C433ED for ; Thu, 22 Apr 2021 14:42:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5A97261458 for ; Thu, 22 Apr 2021 14:42:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237164AbhDVOnW (ORCPT ); Thu, 22 Apr 2021 10:43:22 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:43027 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236459AbhDVOnV (ORCPT ); Thu, 22 Apr 2021 10:43:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619102566; 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: in-reply-to:in-reply-to:references:references; bh=PMd6QraW89ebnEa3y2lxPV+flD1OuOpvVcOjWqIojUQ=; b=gNxZmuC0maG/xARvnSDEgvtXClAUx6UwdZwemsVksF49YRC9/Ofo2d9duZuy8hp4ASp9P5 gbFd2pyrom6L7iEvX5o9zIO+eVqWIk/NSDVhYFr/UTETZuE3R2ODlR4vGOiKe08QaXWz+P C82wugxYhuuFp33QtyexDfwM8OJ/XFE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-507-g7b2sgbaOt2wYepYMmrfVg-1; Thu, 22 Apr 2021 10:42:35 -0400 X-MC-Unique: g7b2sgbaOt2wYepYMmrfVg-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4F784802575; Thu, 22 Apr 2021 14:42:32 +0000 (UTC) Received: from carbon (unknown [10.36.110.19]) by smtp.corp.redhat.com (Postfix) with ESMTP id C75D369320; Thu, 22 Apr 2021 14:42:24 +0000 (UTC) Date: Thu, 22 Apr 2021 16:42:23 +0200 From: Jesper Dangaard Brouer To: Magnus Karlsson Cc: Lorenzo Bianconi , bpf , Network Development , "David S. Miller" , Jakub Kicinski , Alexei Starovoitov , Daniel Borkmann , John Fastabend , David Ahern , Eelco Chaudron , Jason Wang , Alexander Duyck , Saeed Mahameed , "Fijalkowski, Maciej" , Tirthendu , brouer@redhat.com Subject: Re: [PATCH v8 bpf-next 00/14] mvneta: introduce XDP multi-buffer support Message-ID: <20210422164223.77870d28@carbon> In-Reply-To: References: <20210418181801.17166935@carbon> <20210421144747.33c5f51f@carbon> <20210421173921.23fef6a7@carbon> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, 22 Apr 2021 12:24:32 +0200 Magnus Karlsson wrote: > On Wed, Apr 21, 2021 at 5:39 PM Jesper Dangaard Brouer > wrote: > > > > On Wed, 21 Apr 2021 16:12:32 +0200 > > Magnus Karlsson wrote: > > [...] > > > more than I get. > > > > I clearly have a bug in the i40e driver. As I wrote later, I don't see > > any packets transmitted for XDP_TX. Hmm, I using Mel Gorman's tree, > > which contains the i40e/ice/ixgbe bug we fixed earlier. Something is wrong with i40e, I changed git-tree to net-next (at commit 5d869070569a) and XDP seems to have stopped working on i40e :-( $ uname -a Linux broadwell 5.12.0-rc7-net-next+ #600 SMP PREEMPT Thu Apr 22 15:13:15 CEST 2021 x86_64 x86_64 x86_64 GNU/Linux When I load any XDP prog almost no packets are let through: [kernel-bpf-samples]$ sudo ./xdp1 i40e2 libbpf: elf: skipping unrecognized data section(16) .eh_frame libbpf: elf: skipping relo section(17) .rel.eh_frame for section(16) .eh_frame proto 17: 1 pkt/s proto 0: 0 pkt/s proto 17: 0 pkt/s proto 0: 0 pkt/s proto 17: 1 pkt/s On the same system my mlx5 NIC works fine: [kernel-bpf-samples]$ sudo ./xdp1 mlx5p1 libbpf: elf: skipping unrecognized data section(16) .eh_frame libbpf: elf: skipping relo section(17) .rel.eh_frame for section(16) .eh_frame proto 17: 10984608 pkt/s proto 17: 24374656 pkt/s proto 17: 24339904 pkt/s > > The call to xdp_convert_buff_to_frame() fails, but (see below) that > > error is simply converted to I40E_XDP_CONSUMED. Thus, not even the > > 'trace_xdp_exception' will be able to troubleshoot this. You/Intel > > should consider making XDP_TX errors detectable (this will also happen > > if TX ring don't have room). > > This is not good. Will submit a fix. Thanks for reporting Jesper. Usually I use this command to troubleshoot: sudo ./xdp_monitor --stats But as driver i40e doesn't call the 'trace_xdp_exception' then I don't capture any error this way. -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer