Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4829241pxj; Wed, 9 Jun 2021 02:56:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4l8Pb9C3bqlxMou09AapH6ZGAzlc6QeEmr6RBa1MeRQq5La3gGDF+883my9nn5ZvEEzOJ X-Received: by 2002:a02:838c:: with SMTP id z12mr4018118jag.89.1623232573456; Wed, 09 Jun 2021 02:56:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623232573; cv=none; d=google.com; s=arc-20160816; b=mwntpmbV832mMx9R3xnQPjTo9d6nw1WihxiJPFC5bf4CGz+a7BAGXQpjfzoUhydjON LeddEr3lL1zCXM0uwSdFFtjf6iiIu3d9eXet/SLGVzqXZZ66RN9mUx5AARC9N/GijLsd ZJjWG4KJNUqt/L8y/Ao0r3HqrimJFHZooANjdsr0QSO90saOJbbzxHhyT08ob9k/plEx 1/HSiwDR9Q/jwNcvT5GpdNZ31jBUjg8AZXMmgCCDZLD0O1Guq2TrN5C0ggqRBuGEjvlU vmu6g4PtIbaVXiE0m8MQKIZ/f4e8UymDuTsOYKDb7u6VpIcwEh6HZZmSHtoCkwURJI1j 0axQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=jsE1gppgOVdI/6xsMj2Xy1efwDuDsoZZE0OIXVh0iYw=; b=oLgXSjg6zs47twkc1GOCw6TRd6YGlWi5XcDCEI7IYAK8mlQWOsPBhzdY/pa20dMLOr rtx+0eOYfT1NfWLhn3mmIkCDjjyAuS3272agppWUuWzHDDKUakI8go9uN8NRT/cgncnw MSQHI8UMmqf8qC8rSiVwzB7Bp2FXb4uPbnKtMB660M6cwgGs6UMUrwI6aKxY6kJO7gSJ U/uvPYN+gIhQaGnE/b/fu7XY5JBlYX7yh6wO6uLJ+Tr5RegeDadqfmMsqbTJbx/4OR9C L7mo4DxmK4HeX5M0FlDpNViql26kf/nu1phisbquk044Hmaeigx9u2Zwz47uKHKTGArE /d0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mCbiI2Qw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y5si3111561ily.21.2021.06.09.02.56.01; Wed, 09 Jun 2021 02:56:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mCbiI2Qw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235724AbhFHSs4 (ORCPT + 99 others); Tue, 8 Jun 2021 14:48:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:36824 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234881AbhFHSnD (ORCPT ); Tue, 8 Jun 2021 14:43:03 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 39C21613CD; Tue, 8 Jun 2021 18:35:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1623177355; bh=FHSmhnPejxX14+DhU0J9Z6mRM5qZiTB3aOK5+V2taTU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mCbiI2Qw5NivE/pGDDZRVmLw3DkTNhPMauIlVgVZPN6CRbSGoFt9iVliKmNakiXmC PYOs3hZAK1Jmx/fkFCpIIUUxkPLQ11j6vMZUwVWE10pSIVOyZuqXtPt/XWEp8gU0U4 Xp3UOYNYnpkLf6WmnuqHEB+M+uL4cFbl6daVjNyY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jesper Dangaard Brouer , Magnus Karlsson , Vishakha Jambekar , Tony Nguyen , Sasha Levin Subject: [PATCH 5.4 22/78] ixgbevf: add correct exception tracing for XDP Date: Tue, 8 Jun 2021 20:26:51 +0200 Message-Id: <20210608175936.011537638@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210608175935.254388043@linuxfoundation.org> References: <20210608175935.254388043@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Magnus Karlsson [ Upstream commit faae81420d162551b6ef2d804aafc00f4cd68e0e ] Add missing exception tracing to XDP when a number of different errors can occur. The support was only partial. Several errors where not logged which would confuse the user quite a lot not knowing where and why the packets disappeared. Fixes: 21092e9ce8b1 ("ixgbevf: Add support for XDP_TX action") Reported-by: Jesper Dangaard Brouer Signed-off-by: Magnus Karlsson Tested-by: Vishakha Jambekar Signed-off-by: Tony Nguyen Signed-off-by: Sasha Levin --- drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c index 64ec0e7c64b4..be8e6d4e376e 100644 --- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c +++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c @@ -1079,11 +1079,14 @@ static struct sk_buff *ixgbevf_run_xdp(struct ixgbevf_adapter *adapter, case XDP_TX: xdp_ring = adapter->xdp_ring[rx_ring->queue_index]; result = ixgbevf_xmit_xdp_ring(xdp_ring, xdp); + if (result == IXGBEVF_XDP_CONSUMED) + goto out_failure; break; default: bpf_warn_invalid_xdp_action(act); /* fallthrough */ case XDP_ABORTED: +out_failure: trace_xdp_exception(rx_ring->netdev, xdp_prog, act); /* fallthrough -- handle aborts by dropping packet */ case XDP_DROP: -- 2.30.2