From patchwork Sat Oct 17 07:12:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Auhagen X-Patchwork-Id: 11842657 X-Patchwork-Delegate: kuba@kernel.org 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=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 D19FEC433E7 for ; Sat, 17 Oct 2020 07:12:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 23CFA20709 for ; Sat, 17 Oct 2020 07:12:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=voleatech.de header.i=@voleatech.de header.b="E3kCdtN9" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2411473AbgJQHMq (ORCPT ); Sat, 17 Oct 2020 03:12:46 -0400 Received: from mail-eopbgr80095.outbound.protection.outlook.com ([40.107.8.95]:15328 "EHLO EUR04-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2409917AbgJQHMp (ORCPT ); Sat, 17 Oct 2020 03:12:45 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EAi3rRw+PI61EG++iYCpSMnnrvvTWEJfZXtSzpXsBe5P8K1xyddSp5whOxFl9v5wsLKooeAT4/Kxp1+76/cgAR90JRpZS4nXaKSmAAX8vbi4Xbspi2gg4nWEdUuUsKzUtredmVnjf0KkfFE2ROnSfiOeHKCHf8X5KhM4ML6WSPXk6v/CS51Zaye2L0LkTtives8d+3glglVMDegcXtX4ZB/p4wcbeU940QDzmwwHNqEDOTCK/H3RwQmXHoxsLFVlHq4X8TlB419VTpm5NAJj1nvjV/T4ZXf8TSo2AwplEjJaqSjWAWbAITMMizc3nViA4gwnh3+fWSK/k4yrKlB78Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=r96DcCPBDm2rnnESfjL5FjoP85qsoYT27usAggSNawk=; b=XYHZ8GT5UCpwEXCec26ajCLravhfDM3igc1ORp2/W9zUAgzbiFtkCZIsVwy5M4/vFc8jNj/kNkGX+RSxQObOzEX27GTQ+HxW74PRtXp0ZShhkKjAHPUm3Cvs0d9iyKVeWzEUVGmUQSBeIgAAUhUSsAvlVx9J6mKOXVow11zxlMTYvMkLQRfx8jbIKe2lz2Vw2L7gsNe9xt2z0/SitYVRcmkNg1BuWlSnwJwcxIY2F6kL2hep1lxl3AMd+jdDWMlS9h8+DSxIc5fSZdHTIZA2j8Z19e+jlL3jbUmwomdOvubQsXNHYpTEQ72P1LnaSE7MFpRVrlrmqsVXTvMeWHOZ4w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=voleatech.de; dmarc=pass action=none header.from=voleatech.de; dkim=pass header.d=voleatech.de; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=voleatech.de; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=r96DcCPBDm2rnnESfjL5FjoP85qsoYT27usAggSNawk=; b=E3kCdtN9pMJKGJP4aSiGP5Jy0MmRcUfRZxdOxBUcS9HDPmCYFdCEgA1wNdk3b/f8dk1DgiZQc9BqIknVuFRzP7bk3iECLkMhEIoaHBB1q2o+qpo0tFkDr0aZk+y39m331yw8jWSaxmAPbFsT/nb6F4TW7TVm110YWUNOf2p7gcU= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=voleatech.de; Received: from AM8PR05MB7251.eurprd05.prod.outlook.com (2603:10a6:20b:1d4::23) by AM0PR0502MB4018.eurprd05.prod.outlook.com (2603:10a6:208:b::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.21; Sat, 17 Oct 2020 07:12:42 +0000 Received: from AM8PR05MB7251.eurprd05.prod.outlook.com ([fe80::f132:2cc:34f2:5e4]) by AM8PR05MB7251.eurprd05.prod.outlook.com ([fe80::f132:2cc:34f2:5e4%7]) with mapi id 15.20.3477.021; Sat, 17 Oct 2020 07:12:42 +0000 From: sven.auhagen@voleatech.de To: anthony.l.nguyen@intel.com, maciej.fijalkowski@intel.com Cc: davem@davemloft.net, intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com, sandeep.penigalapati@intel.com, brouer@redhat.com Subject: [PATCH v2 1/6] igb: XDP xmit back fix error code Date: Sat, 17 Oct 2020 09:12:33 +0200 Message-Id: <20201017071238.95190-2-sven.auhagen@voleatech.de> X-Mailer: git-send-email 2.24.3 (Apple Git-128) In-Reply-To: <20201017071238.95190-1-sven.auhagen@voleatech.de> References: <20201017071238.95190-1-sven.auhagen@voleatech.de> X-Originating-IP: [109.193.235.168] X-ClientProxiedBy: AM3PR05CA0087.eurprd05.prod.outlook.com (2603:10a6:207:1::13) To AM8PR05MB7251.eurprd05.prod.outlook.com (2603:10a6:20b:1d4::23) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (109.193.235.168) by AM3PR05CA0087.eurprd05.prod.outlook.com (2603:10a6:207:1::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.25 via Frontend Transport; Sat, 17 Oct 2020 07:12:41 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f1e260a0-6069-48c6-1af7-08d8726c09e3 X-MS-TrafficTypeDiagnostic: AM0PR0502MB4018: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:431; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xm99dOg24Hc8/sBpurj+tIbFW52Qn1zI1IfUnO2UeNzPvqRIvr/jo7JBmEulfp2DIkF+CTM2RigH0uFNtzZXdxIDstGHfAWgQMczYq3bMkM1HI1U5dNSl2U9P7ISczhbw7uN8904cRJjtKhTtBMU476WYFD3MUNW4obbrJWz3I1WCxeKN9n3RvTBraX8hEEhSu9q2gk6fEz71KeKchH25/0Ij3/2I9JeNRwEvOyIRtVWFuL11FWYutgxNrPj6qbzgsU2JA9/1ohvorBXPSHTvBwDtA2mDTeEgYMjiZi0BYdywGuOSy1zlMOFt9ASJfzb1VqTLf1VJ7f+/etxcFx3gEXQlwUTLraPuIYeoEdQWLcSwAgSAVUOEOvG0KoRzgBc X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM8PR05MB7251.eurprd05.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(39830400003)(396003)(346002)(376002)(136003)(1076003)(8936002)(66476007)(66946007)(8676002)(86362001)(52116002)(69590400008)(66556008)(6512007)(478600001)(6506007)(9686003)(26005)(4326008)(6666004)(83380400001)(4744005)(5660300002)(956004)(2906002)(36756003)(316002)(186003)(2616005)(16526019)(6486002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData: bAMrIoMEn7TUEsI0mN3EKajVRzwsWRt67EqYGanimFcwQ1GwrtXxlNmTicL1DusG05LujH1/maGA8hsckRrF3bDogGIFdBhd4v6fJlTFcP7gaLpvU1bbObbekNnNnRS8dOwYLVxO1eUjqGp88h0Ulay6OpPcmf+rQ5lUI4FNiVnQYSo/Jfx6Kd7lbxIrZdPHdIgY85XzCEfSMNMUDOlmFV3Oi8j4iJPbPaYFoFxhnW5aqJvP++4zr00qGVf4CIEYz18ytlUTMJAoFSUnPf//R0OZ5swys/m3sxivMN0fgq6M4S9eQS8NdkEyyxTzEaZPn8QBWgcBq4s25PValG9ChkiW7EfbJbOZu7cYkWETdMnhjSPKg3C+9sVQoIrJbFewfyeBIKLC2cbLt4hhf7G8Y8pBLWesiIfyCOfhqnwQjIypmeFT+3S9LLUg2OZaiJr3QPENtT2JqHTgumLMykM+eIUA8oyqLHxSPu4CjYpKb3bxWdU+EEDO/w/R3AlFEvach35vnl7MBiFlm8+jPGBx5YjOpepaZsc9ilFwAa6kDh9cfFtI7MZdxCxnF+mF6JIxLbEYKF2uIiA+DPEeiIAFQ3W2EnkjgvnIJsFGWlvOWJzBe/Gq06ZPBgmfN/mfjRPhsGYO8qqytASJx3Dppnfoww== X-OriginatorOrg: voleatech.de X-MS-Exchange-CrossTenant-Network-Message-Id: f1e260a0-6069-48c6-1af7-08d8726c09e3 X-MS-Exchange-CrossTenant-AuthSource: AM8PR05MB7251.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Oct 2020 07:12:42.2834 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b82a99f6-7981-4a72-9534-4d35298f847b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: GCiSGAtOLKjh1Zm8YvWnU8G9MPKJcB3HReyyAC2lVhVvZeZqAKpjgIqaD7huudvhLfFgcy83Y0fylrt+bLaqL/R5ORX3JpsTumWyXzLCoAY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR0502MB4018 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Sven Auhagen The igb XDP xmit back function should only return defined error codes. Signed-off-by: Sven Auhagen --- drivers/net/ethernet/intel/igb/igb_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index 5fc2c381da55..08cc6f59aa2e 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c @@ -2910,7 +2910,7 @@ static int igb_xdp_xmit_back(struct igb_adapter *adapter, struct xdp_buff *xdp) */ tx_ring = adapter->xdp_prog ? igb_xdp_tx_queue_mapping(adapter) : NULL; if (unlikely(!tx_ring)) - return -ENXIO; + return IGB_XDP_CONSUMED; nq = txring_txq(tx_ring); __netif_tx_lock(nq, cpu); From patchwork Sat Oct 17 07:12:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Auhagen X-Patchwork-Id: 11842659 X-Patchwork-Delegate: kuba@kernel.org 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=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 9E3AEC433DF for ; Sat, 17 Oct 2020 07:12:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 608D020866 for ; Sat, 17 Oct 2020 07:12:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=voleatech.de header.i=@voleatech.de header.b="ODdxhSDr" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2411542AbgJQHMv (ORCPT ); Sat, 17 Oct 2020 03:12:51 -0400 Received: from mail-eopbgr80095.outbound.protection.outlook.com ([40.107.8.95]:15328 "EHLO EUR04-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2409917AbgJQHMv (ORCPT ); Sat, 17 Oct 2020 03:12:51 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O9Tg8ZPyID7K9RgCmadWkTOGf92+hhci33NqndJH8+OQXXwKj++ez5QloYuJDSpYQwehB4YFLhQXnQYQ9NHxxHmbooWD+QODJHAxhHrD29ktc/AWCGTUrwkxdeuAxgEeAy6oQ7htHbsF/VSqlQoYQjvkf+iLi7I6xwDmPaozl/Q+0Kdn/3GVN9pZo6rIfpEin/bFHx+wFbUQeJcdWp6M2SlFzz0ifNikZ9jovu7Ceu8t3vbS9Mblyn4lFV1ntKVrlugkhwCkwOdTZPPpL2CVHZTODOYcHOXrvhJ8STv+cdLwyhofOFqxt3lynQTn9hn4acAIL9l3ECLJeT+MO/sKGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hX7NWAGOiIstq/9Ap+RWNIIwuO9+RNz9GVRejfoc5OA=; b=A500nRgNqifrAK10liRDeTmz3Vw54QWl3PBtWVO/fFs1bfP7w9Uj0839xavp6D26jPzg2sY2nVrP+X9HqbrtVnUmiEs1Hrj/T7FGn/Z4+k/mgPHQ483HlX3eOjWbTmNfhBhmnm3wvRNxnKo+aqQOEufaj0wB5TZpz4aw2JAQcIC44RhoQnX+CJ1NUFnGINmzpJpLbVfKHi7SezKMBxGt3xLxpvE6YdoEFKD2QIWYwB/ddgnPaBilS2ZzLr5RcE80Txi2OhiGEBF12dVCZVX6SfbjRjIoG+Q69GHH/0m78pWoHEVaV58+DM+VLq3/w3KQMY2SStprI4GgYvbBg/P6eQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=voleatech.de; dmarc=pass action=none header.from=voleatech.de; dkim=pass header.d=voleatech.de; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=voleatech.de; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hX7NWAGOiIstq/9Ap+RWNIIwuO9+RNz9GVRejfoc5OA=; b=ODdxhSDr1+jOcUVXNfON7ZvJwcmqvAURQHKrFt9IMOkCYev+9ap8q2L34Uvfz1TBq0LwIb0ug+1j4DRVEBwrwFyKPCxqh42Q6cfFIXaIxXojPPvxL64OipS3DYrJ2AZQd+4OJKWB/YdklBxTUOULFHt8ZGdt4+Ir3s3tUSt74H4= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=voleatech.de; Received: from AM8PR05MB7251.eurprd05.prod.outlook.com (2603:10a6:20b:1d4::23) by AM0PR0502MB4018.eurprd05.prod.outlook.com (2603:10a6:208:b::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.21; Sat, 17 Oct 2020 07:12:43 +0000 Received: from AM8PR05MB7251.eurprd05.prod.outlook.com ([fe80::f132:2cc:34f2:5e4]) by AM8PR05MB7251.eurprd05.prod.outlook.com ([fe80::f132:2cc:34f2:5e4%7]) with mapi id 15.20.3477.021; Sat, 17 Oct 2020 07:12:43 +0000 From: sven.auhagen@voleatech.de To: anthony.l.nguyen@intel.com, maciej.fijalkowski@intel.com Cc: davem@davemloft.net, intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com, sandeep.penigalapati@intel.com, brouer@redhat.com Subject: [PATCH v2 2/6] igb: take vlan double header into account Date: Sat, 17 Oct 2020 09:12:34 +0200 Message-Id: <20201017071238.95190-3-sven.auhagen@voleatech.de> X-Mailer: git-send-email 2.24.3 (Apple Git-128) In-Reply-To: <20201017071238.95190-1-sven.auhagen@voleatech.de> References: <20201017071238.95190-1-sven.auhagen@voleatech.de> X-Originating-IP: [109.193.235.168] X-ClientProxiedBy: AM3PR05CA0087.eurprd05.prod.outlook.com (2603:10a6:207:1::13) To AM8PR05MB7251.eurprd05.prod.outlook.com (2603:10a6:20b:1d4::23) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (109.193.235.168) by AM3PR05CA0087.eurprd05.prod.outlook.com (2603:10a6:207:1::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.25 via Frontend Transport; Sat, 17 Oct 2020 07:12:42 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3e301915-a3c4-4570-a407-08d8726c0a56 X-MS-TrafficTypeDiagnostic: AM0PR0502MB4018: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4714; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oQjhwb3JDspyFSpR5ubKdBfR+Q+xK5Mw5LqKObnPBj5MHxYXWR+2ICqajws207GKLa4aOLHqnD/nBOV3BXe//Ikevb/uHapIRkJ7qtXS2xo7ke0xB270tRv0H6jNOYeoEmnDEmvpy3eRTiOCDkFDCmH5mPQi2KmDG6kGDDbsg2FcVP3l31mE48/TdfuQXraNjQ1x766z0sl+Uc9AHvai2LL8Loj+BiYSti0bY4xbUz/0TEdsdC0DaFTwXTgSCGevfaqDZrbawxUYY2tDtBycqSg75kDdD5ybiYX2/rKKefnb4X2pzWGOrrQ4nWClP4N1kukAQMvN2h+9ZE0SzFi5sNR2lakDVk7QhNC+ywA1afIn0r5IQaff0gAfpawIHpHX X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM8PR05MB7251.eurprd05.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(39830400003)(396003)(346002)(376002)(136003)(1076003)(8936002)(66476007)(66946007)(8676002)(86362001)(52116002)(69590400008)(66556008)(6512007)(478600001)(6506007)(9686003)(26005)(4326008)(6666004)(83380400001)(5660300002)(956004)(2906002)(36756003)(316002)(186003)(2616005)(16526019)(6486002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData: 7tDClaSC3AqHWqdV5PIPAym8cutDCUhqEyajz8usYhenr64RSUzoqsnqpSXVgfzgQYOkOdyl/TCTXnxIui9E+hQ+ZJU7pvIGsjs1iV4CE2d9scLSDSOyc+SFKOTee2/x2o1hEfm5YBodbgXQ819fv+JHQtQHYwpZXGbSP5uqvZDr4j9H2xU6vVDB7hkIWfk91XAgMi8mTH9EZyBG6fCXVa8/UrECqY12URJqX6kBOBUrotGyocVaHkiRLuEQ17kBQXVWOQJV0g5zSteW/a8NaBvRJg+1ouyWsrANzTTkLVFc82WCprZMcbWQ3KlyqdnHBHqXKDLyhAMxBzDODN1BNzNkrrlk5mg01tOVWZIgHWZxoYneauoBlR7B69gwkqt7hAC+be58OzOzOhnRncsiDFG1QOWOdI5OAInaGf5lqAjLQU1czNoBfTV3c4EgL0wWB6sU5/6/OAaNUi9FkLsC8mhIeSLshsXnWPxTVzpMvHf2oc4+djJeUAO2/JAIKuk0NXeZU/hAijDq/jwUo56uUcEcH2KrQ2Lc6AmUDmdScuyT0Cu9u/x1DsrYVVdXInqa4nhHzOWJmcd37rodr1oKYD7HuCU6N5DVVlKHHqICQ9LhvzLGCuWi5qdTkJvfX8JGOi1Xa+YNM9lyV7xXbAMf3w== X-OriginatorOrg: voleatech.de X-MS-Exchange-CrossTenant-Network-Message-Id: 3e301915-a3c4-4570-a407-08d8726c0a56 X-MS-Exchange-CrossTenant-AuthSource: AM8PR05MB7251.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Oct 2020 07:12:43.0241 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b82a99f6-7981-4a72-9534-4d35298f847b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: lo/IV6Ed/VegAxG45L9D4QjV8QDc9Ve0HwUGAjZyu0qbiBYHEG/lGeN2lHQIZ7McSPN65Atp7kbw/IXEoPXa+l0ANtHN3M51p2G2+DQZbo0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR0502MB4018 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Sven Auhagen Increase the packet header padding to include double VLAN tagging. This patch uses a macro for this. Signed-off-by: Sven Auhagen Suggested-by: Maciej Fijalkowski --- drivers/net/ethernet/intel/igb/igb.h | 5 +++++ drivers/net/ethernet/intel/igb/igb_main.c | 7 +++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/intel/igb/igb.h b/drivers/net/ethernet/intel/igb/igb.h index 0286d2fceee4..aaa954aae574 100644 --- a/drivers/net/ethernet/intel/igb/igb.h +++ b/drivers/net/ethernet/intel/igb/igb.h @@ -138,6 +138,8 @@ struct vf_mac_filter { /* this is the size past which hardware will drop packets when setting LPE=0 */ #define MAXIMUM_ETHERNET_VLAN_SIZE 1522 +#define IGB_ETH_PKT_HDR_PAD (ETH_HLEN + ETH_FCS_LEN + (VLAN_HLEN * 2)) + /* Supported Rx Buffer Sizes */ #define IGB_RXBUFFER_256 256 #define IGB_RXBUFFER_1536 1536 @@ -247,6 +249,9 @@ enum igb_tx_flags { #define IGB_SFF_ADDRESSING_MODE 0x4 #define IGB_SFF_8472_UNSUP 0x00 +/* TX resources are shared between XDP and netstack + * and we need to tag the buffer type to distinguish them + */ enum igb_tx_buf_type { IGB_TYPE_SKB = 0, IGB_TYPE_XDP, diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index 08cc6f59aa2e..0a9198037b98 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c @@ -2826,7 +2826,7 @@ static int igb_setup_tc(struct net_device *dev, enum tc_setup_type type, static int igb_xdp_setup(struct net_device *dev, struct bpf_prog *prog) { - int i, frame_size = dev->mtu + ETH_HLEN + ETH_FCS_LEN + VLAN_HLEN; + int i, frame_size = dev->mtu + IGB_ETH_PKT_HDR_PAD; struct igb_adapter *adapter = netdev_priv(dev); bool running = netif_running(dev); struct bpf_prog *old_prog; @@ -3950,8 +3950,7 @@ static int igb_sw_init(struct igb_adapter *adapter) /* set default work limits */ adapter->tx_work_limit = IGB_DEFAULT_TX_WORK; - adapter->max_frame_size = netdev->mtu + ETH_HLEN + ETH_FCS_LEN + - VLAN_HLEN; + adapter->max_frame_size = netdev->mtu + IGB_ETH_PKT_HDR_PAD; adapter->min_frame_size = ETH_ZLEN + ETH_FCS_LEN; spin_lock_init(&adapter->nfc_lock); @@ -6491,7 +6490,7 @@ static void igb_get_stats64(struct net_device *netdev, static int igb_change_mtu(struct net_device *netdev, int new_mtu) { struct igb_adapter *adapter = netdev_priv(netdev); - int max_frame = new_mtu + ETH_HLEN + ETH_FCS_LEN + VLAN_HLEN; + int max_frame = new_mtu + IGB_ETH_PKT_HDR_PAD; if (adapter->xdp_prog) { int i; From patchwork Sat Oct 17 07:12:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Auhagen X-Patchwork-Id: 11842655 X-Patchwork-Delegate: kuba@kernel.org 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=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 CAC6FC433E7 for ; Sat, 17 Oct 2020 07:12:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8E7BA20866 for ; Sat, 17 Oct 2020 07:12:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=voleatech.de header.i=@voleatech.de header.b="beVcfwfY" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2411570AbgJQHMz (ORCPT ); Sat, 17 Oct 2020 03:12:55 -0400 Received: from mail-eopbgr80095.outbound.protection.outlook.com ([40.107.8.95]:15328 "EHLO EUR04-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2410562AbgJQHMw (ORCPT ); Sat, 17 Oct 2020 03:12:52 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kh18N3KDqdvkR+qM3pQifxCGjP+F/MTZr+8YRgeycefEHexEsaG3PGKxHkn40n/6oPHEXS70FFbFoMw/ji/q+02RtY+LamOaNmU5lGQjrrLlk369bTzDQ3urP5arM6boa4OsPUyKzOj+GKGOrIEWAqDr4LH+Zzq9Yhpk5lU6faRtYdxBB4BIWK/rr0F1X+FOAKi2RnUpuq+41wHTgA75jPWMvxM+w+3LzXrbxeLyYc7v1rK5GMMopy61wtxREBAghABL1YT0MHhUKB46LyyhsAuJlccddfP/N8+yw+OnBjfAmnyAoBWjsTd92prFgvXdC9tOgr0W5NWe9JcsF6qBtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3RJUyn3l5KEbyiNpVrWb2MI6BDEnNjHb766LCgzmHRA=; b=WWrdOJ5sSi8MKLpY2lfX2rqVx5XzOLn1YQdDO/WiQnzuABMqQqn+GaVdRYguGzEVGDYFtEsoJAIzL/gBN0iIi9TW1MvFhhEkw1NtByMLpRP7kYRgYXdRpkhhAO0/Nee/7y+NxvQREf7Scom2t6TPUeLLm5dYLWreF1odbXo4QFDBeqO9W2qfQIOnDCU3SdnZ2U4NwxZ8UZvaM59PlOFy2U2kRHl6i7/klQ79KGXy8oOwlaaxOdhACrwkaqY8nyOKWzoZ4Zz7o0OGXOVXzqpCETq0Foq6aUGCCo9BccOXEtb8gevMZmWm/3xmkPKrEEVyfaWzN2bjFAA5YB+3KOgGoQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=voleatech.de; dmarc=pass action=none header.from=voleatech.de; dkim=pass header.d=voleatech.de; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=voleatech.de; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3RJUyn3l5KEbyiNpVrWb2MI6BDEnNjHb766LCgzmHRA=; b=beVcfwfYInRJrp7atcLKmxZQi31/IgpWHXaatCJaR+oqtoh9/WlnFsBIqNMdrUrn+GZIB5YwStp2vUyydyS3QZF2SY/hfQB+UvFhiz7FlotQmXWpEhAGFV/BNoFf7CiOPm0X8DR6UuQw6Olb7qJ2SaEeP1xKBbAb+lD663684bQ= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=voleatech.de; Received: from AM8PR05MB7251.eurprd05.prod.outlook.com (2603:10a6:20b:1d4::23) by AM0PR0502MB4018.eurprd05.prod.outlook.com (2603:10a6:208:b::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.21; Sat, 17 Oct 2020 07:12:43 +0000 Received: from AM8PR05MB7251.eurprd05.prod.outlook.com ([fe80::f132:2cc:34f2:5e4]) by AM8PR05MB7251.eurprd05.prod.outlook.com ([fe80::f132:2cc:34f2:5e4%7]) with mapi id 15.20.3477.021; Sat, 17 Oct 2020 07:12:43 +0000 From: sven.auhagen@voleatech.de To: anthony.l.nguyen@intel.com, maciej.fijalkowski@intel.com Cc: davem@davemloft.net, intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com, sandeep.penigalapati@intel.com, brouer@redhat.com Subject: [PATCH v2 3/6] igb: XDP extack message on error Date: Sat, 17 Oct 2020 09:12:35 +0200 Message-Id: <20201017071238.95190-4-sven.auhagen@voleatech.de> X-Mailer: git-send-email 2.24.3 (Apple Git-128) In-Reply-To: <20201017071238.95190-1-sven.auhagen@voleatech.de> References: <20201017071238.95190-1-sven.auhagen@voleatech.de> X-Originating-IP: [109.193.235.168] X-ClientProxiedBy: AM3PR05CA0087.eurprd05.prod.outlook.com (2603:10a6:207:1::13) To AM8PR05MB7251.eurprd05.prod.outlook.com (2603:10a6:20b:1d4::23) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (109.193.235.168) by AM3PR05CA0087.eurprd05.prod.outlook.com (2603:10a6:207:1::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.25 via Frontend Transport; Sat, 17 Oct 2020 07:12:43 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e7b6bc61-1d02-4ddf-777e-08d8726c0ac5 X-MS-TrafficTypeDiagnostic: AM0PR0502MB4018: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4125; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xhzkWBshD9KhgZCgg1/7DBHJ6GXtyWV6a5qYW8ba/gUbX4U6aAiRy6RcR/OLpeVyPdCQ8DS60hxxQFpqeHm0sBVmozyC3TPG41Up7ZHQNPAfwrHn/GuNx+xMOkCu4kLLF9XRwfVz+KV61glnLXWvxGOrtTZaYpOVdX3cIDSNAuhyGvmj7c/+ytxLgq+/65gNouZUQQyAn2oCoGdzElhtcXuddNao6dpasdHChu1ZFvp5uAwxD/Zv6Whgy66HS4fv9/BD4xOU3HAF5zHMEcb+qSIWHxzvE9wU4hUHAgMBCaHriO6bEyn8cTu4oLQGKxl3v6btqaXd8Ivrx0ifaj0e0UJsOsno6Mq7Plv0ktIWzWzl/9aXpm+/q+OUe//eJVr/ X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM8PR05MB7251.eurprd05.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(39830400003)(396003)(346002)(376002)(136003)(1076003)(8936002)(66476007)(66946007)(8676002)(86362001)(52116002)(69590400008)(66556008)(6512007)(478600001)(6506007)(9686003)(26005)(4326008)(15650500001)(6666004)(83380400001)(5660300002)(956004)(2906002)(36756003)(316002)(186003)(2616005)(16526019)(6486002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData: TWn2hBV9SN04HcdfcS8V1dnUUZ/wtpG5GJuPoUFXMjQ6HMTaSeYCfjagFU6GJ3/VHKa0OKTizXl9O7ChwRQj585sCVMyT86827b5m8NzbcswBFO2W699gnBQ1JnYWRvA6TQxwxTDR6XZ0ingBr+kASIbArrGXOVWb5bbqPiratuLPRvGrDsc3Q5Jeuqz8aTmmv5KAyYBJHd1SvO7iQ6yqtFXrV8KcPMeEjvIhfop7Cl37Ynyl2lEo44tSKBMAhAONvsBrnWfgLOoNY13nxC02fpOXUvgDsNuFC47UecCThH7clWZQ8gd73XoGB2Clwf1dKvj23LwrUaxpqSV9I1sCUUuUpWt+SKg87w2/3ODHIWKmWunl96SvyFlJzCw+kaTSwjDSONdGK6azqnwFUOh0nuS5dKcPKbj2wkJPBWEIc/uePNR5UvOq1AUPO7mNChwQfw1mBQ/k4eXcUB7BsPUJ+QhGRjcerRQGwepdMnTgrndFvFDKGsjeUffSvszXn0dCTRXSF0MQXut63CDBT5e/W9TyQW2lztSjrdfdyl172zzf04918C5BzDMJPd79uARzIYSczIJbzM+8SaAD9TFOYS76qcIP1Zc3S2abtHPrXz1KzD/C16eVvDXE16Us4tPStnVbjvnEaE7oFfm9OOPgQ== X-OriginatorOrg: voleatech.de X-MS-Exchange-CrossTenant-Network-Message-Id: e7b6bc61-1d02-4ddf-777e-08d8726c0ac5 X-MS-Exchange-CrossTenant-AuthSource: AM8PR05MB7251.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Oct 2020 07:12:43.7410 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b82a99f6-7981-4a72-9534-4d35298f847b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 9asw0JhIbQ//mw0GQ//JrKmh1OCFzurs+2x7i2ASl4rjVMRjRriV7//nHb2AzCHsVGDa1vVmNg8u/cr6uaTlOwauaE6KIlY17AL39RFKfAA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR0502MB4018 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Sven Auhagen Add an extack error message when the RX buffer size is too small for the frame size. Signed-off-by: Sven Auhagen Suggested-by: Maciej Fijalkowski Reviewed-by: Maciej Fijalkowski --- drivers/net/ethernet/intel/igb/igb_main.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index 0a9198037b98..088f9ddb0093 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c @@ -2824,20 +2824,22 @@ static int igb_setup_tc(struct net_device *dev, enum tc_setup_type type, } } -static int igb_xdp_setup(struct net_device *dev, struct bpf_prog *prog) +static int igb_xdp_setup(struct net_device *dev, struct netdev_bpf *bpf) { int i, frame_size = dev->mtu + IGB_ETH_PKT_HDR_PAD; struct igb_adapter *adapter = netdev_priv(dev); + struct bpf_prog *prog = bpf->prog, *old_prog; bool running = netif_running(dev); - struct bpf_prog *old_prog; bool need_reset; /* verify igb ring attributes are sufficient for XDP */ for (i = 0; i < adapter->num_rx_queues; i++) { struct igb_ring *ring = adapter->rx_ring[i]; - if (frame_size > igb_rx_bufsz(ring)) + if (frame_size > igb_rx_bufsz(ring)) { + NL_SET_ERR_MSG_MOD(bpf->extack, "The RX buffer size is too small for the frame size"); return -EINVAL; + } } old_prog = xchg(&adapter->xdp_prog, prog); @@ -2869,7 +2871,7 @@ static int igb_xdp(struct net_device *dev, struct netdev_bpf *xdp) { switch (xdp->command) { case XDP_SETUP_PROG: - return igb_xdp_setup(dev, xdp->prog); + return igb_xdp_setup(dev, xdp); default: return -EINVAL; } @@ -6499,7 +6501,7 @@ static int igb_change_mtu(struct net_device *netdev, int new_mtu) struct igb_ring *ring = adapter->rx_ring[i]; if (max_frame > igb_rx_bufsz(ring)) { - netdev_warn(adapter->netdev, "Requested MTU size is not supported with XDP\n"); + netdev_warn(adapter->netdev, "Requested MTU size is not supported with XDP. Max frame size is %d\n", max_frame); return -EINVAL; } } From patchwork Sat Oct 17 07:12:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Auhagen X-Patchwork-Id: 11842663 X-Patchwork-Delegate: kuba@kernel.org 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=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 6F37BC433DF for ; Sat, 17 Oct 2020 07:12:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 341A020866 for ; Sat, 17 Oct 2020 07:12:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=voleatech.de header.i=@voleatech.de header.b="EG/5oWKd" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2411624AbgJQHM4 (ORCPT ); Sat, 17 Oct 2020 03:12:56 -0400 Received: from mail-eopbgr80095.outbound.protection.outlook.com ([40.107.8.95]:15328 "EHLO EUR04-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2411544AbgJQHMy (ORCPT ); Sat, 17 Oct 2020 03:12:54 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LCVGx8DATYkKta2I+TqUhq/zguGESj9UASgQMjEjDqjsyY7V90xMxi6xJb0Jzuc4CltDynHXbwSIli1XntyMJYCKfIUbVS6YrSWHv3Y1ryGQcefmHOzb3VvmAH34SxfMtD+L4lwwxeeCa2Qc42PDyEL/QnypEkDGROT8k5aHwieqDXUY1tgXouCxTRyJxV1PN4YgJ9uF3VY3ghF48HvItH/peU3sqewyxSCw8TtRRSeBVkEkXzkldOTYBPzTIVeNZaFtTknBBxiz+xh5oZrVsF5a0+i9HZgjdWT4hnKcdUkCNMcnNXUTZCHonpcy2rdgpVEa85AE7kDB1VvhfueGIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Njhp8rDsTkzrzWV5S5Qxgbhm6Dtup7MCDCdv+f/53uc=; b=doEN/yGF1k0INj5ay7YuQY5UrMdkxCRpQ6WK6sXZPJi23UHYOIm5tXyvQIxbKcBGiOz2oSJCkTqWEjAvzxP7xBpzUdqtKNG+F2BwewJM9+/1weKx/t0K4bfSFNZL6dr3zpl/azJbVyJKhBMnTAvME03RaaTfC8KhZJWI0QSGZ64KMvBdODcuneUrL8ZQPWsru2lKAzXz8Al3iuKXqqaoaz+U1W0Or01aG6NQMq+xj3JBQ22cLWFgTxdhP9BkYoAEylctO2ad9dDNlpdyi8yBUM7kkgutRMbedouv7+mcjaoyuIBbD8nMpV5NyK50c0izQEIWiIpU6KQAGHfD7D2sIw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=voleatech.de; dmarc=pass action=none header.from=voleatech.de; dkim=pass header.d=voleatech.de; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=voleatech.de; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Njhp8rDsTkzrzWV5S5Qxgbhm6Dtup7MCDCdv+f/53uc=; b=EG/5oWKdrD2UNFEC2WHlEswhxUatmZ5fiyFCYTNIgd/Uu5eqquz3iN52fUn0cdxD22t0I+t7kVPBcfgP3OIQYZ55vYsFQmtnZqL4mo3i+IcQm+nuoP0G8YFgqFooVftVYZBWuwgr8oX5fhGUzZRIPWWEvELc5t2tMGBRYH8Qj/A= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=voleatech.de; Received: from AM8PR05MB7251.eurprd05.prod.outlook.com (2603:10a6:20b:1d4::23) by AM0PR0502MB4018.eurprd05.prod.outlook.com (2603:10a6:208:b::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.21; Sat, 17 Oct 2020 07:12:44 +0000 Received: from AM8PR05MB7251.eurprd05.prod.outlook.com ([fe80::f132:2cc:34f2:5e4]) by AM8PR05MB7251.eurprd05.prod.outlook.com ([fe80::f132:2cc:34f2:5e4%7]) with mapi id 15.20.3477.021; Sat, 17 Oct 2020 07:12:44 +0000 From: sven.auhagen@voleatech.de To: anthony.l.nguyen@intel.com, maciej.fijalkowski@intel.com Cc: davem@davemloft.net, intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com, sandeep.penigalapati@intel.com, brouer@redhat.com Subject: [PATCH v2 4/6] igb: skb add metasize for xdp Date: Sat, 17 Oct 2020 09:12:36 +0200 Message-Id: <20201017071238.95190-5-sven.auhagen@voleatech.de> X-Mailer: git-send-email 2.24.3 (Apple Git-128) In-Reply-To: <20201017071238.95190-1-sven.auhagen@voleatech.de> References: <20201017071238.95190-1-sven.auhagen@voleatech.de> X-Originating-IP: [109.193.235.168] X-ClientProxiedBy: AM3PR05CA0087.eurprd05.prod.outlook.com (2603:10a6:207:1::13) To AM8PR05MB7251.eurprd05.prod.outlook.com (2603:10a6:20b:1d4::23) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (109.193.235.168) by AM3PR05CA0087.eurprd05.prod.outlook.com (2603:10a6:207:1::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.25 via Frontend Transport; Sat, 17 Oct 2020 07:12:43 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 28629b70-c93d-4aa9-0cf0-08d8726c0b29 X-MS-TrafficTypeDiagnostic: AM0PR0502MB4018: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2201; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5HXmENaNNRUGy07TB0bp8Cfu66GDS8TeHTuDxNDLXnaWXEeljDk59AeJKKzMTi24+va0WvjClD4efJj1W+qrIuKR4xtbFCVLv0YTnqncmkAZ18iUoU2mhzwlaGKGxh3cOK//46dDCxuJ2sTGiaSffbdgMjutlvHuPP525Z3wRDCedAJ5iUGqz+jzxnY6ZPfpps7yxelbbgNHCXOn4N1Iyw//nYFfcjbHsktOXUYwhl2I4dAbRVDR58aAAIrqDi6JHgnmIeY6GCeG1EQNkwcLNatAduElZONvayBPZ+i1qkdnO2IDVFN1y0IhsHk++ARnT5nVwTJpzOscjnaaqt/DBgYutmkH2BGTVJkBsMzYqU5/Qk+lRyLW2rgY7dFZ8yW+ X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM8PR05MB7251.eurprd05.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(39830400003)(396003)(346002)(376002)(136003)(1076003)(8936002)(66476007)(66946007)(8676002)(86362001)(52116002)(69590400008)(66556008)(6512007)(478600001)(6506007)(9686003)(26005)(4326008)(6666004)(5660300002)(956004)(2906002)(36756003)(316002)(186003)(2616005)(16526019)(6486002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData: a32Gdnespu1q8vqKgMOci7r7dhm4e3WUqAWYuPOOsyFBYK6IVMrnQBWL5t2xu0YjthK+eq1BxQtC0V8z2/6seMsv3LOBw5gXj57C+6NTlAQUg0LyLxOm/dxSPUzmHVwUldg7nJU/01wyhlCEjGyMicwkgey0WMK2Q3+iKw+bXqsuE+BrPXyEwZ2QAwGplb4+GOmdO+LSV+fYI7R0pVBPaiGSqnA3Ilm4vv16Zcf/kmzQI90BYAewcRtUamszSAA1Liewz2C/tsUkZWoL076rYFXm2mnNhBImS7ycSUFH/6IUEDno7+R5dN8NZdl5CjKQgvUlP83psKdCijSpu33MlREGfe7E4RqZa9o+eaFaT6UZZd0O8J9oLzUL209PcDekPAcBrqBONsRerXdLhGA3EH58bPUjB65bBG90JddqoOc79WQrF43pje/fLEysi6i/E35LUQhSFzi6YVra9kiff3VkfX6LIBSTSqp/n1lV3mMhkbtXxkjIY8SVM3ygWCyGmqDWHK0ZGAcGGzog5It7Ipt2EbksfxRIOfRWH0qwqp5RXFA8C4+gEMPbO7EvCVbuVZEfcFnSGtdurXl32+uFyYCfYV6jM6p8wOpCnV5We58M20mdeAP2267AxXgAsyg0fcGs7RLAEG3FzxRfyYQerA== X-OriginatorOrg: voleatech.de X-MS-Exchange-CrossTenant-Network-Message-Id: 28629b70-c93d-4aa9-0cf0-08d8726c0b29 X-MS-Exchange-CrossTenant-AuthSource: AM8PR05MB7251.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Oct 2020 07:12:44.3842 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b82a99f6-7981-4a72-9534-4d35298f847b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Lqk3zrIc43NVis8Ef8XGgVJoVgc2H56CL7Mm8A9gLN3WwgzO5DdE+r5SF2OkC1k7upGzrgbqqSwAr+PndmuzaaFNqTcfGlyt9oKcC4D0MWs= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR0502MB4018 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Sven Auhagen add metasize if it is set in xdp Signed-off-by: Sven Auhagen Suggested-by: Maciej Fijalkowski Reviewed-by: Maciej Fijalkowski --- drivers/net/ethernet/intel/igb/igb_main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index 088f9ddb0093..36ff8725fdaf 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c @@ -8345,6 +8345,7 @@ static struct sk_buff *igb_build_skb(struct igb_ring *rx_ring, struct xdp_buff *xdp, union e1000_adv_rx_desc *rx_desc) { + unsigned int metasize = xdp->data - xdp->data_meta; #if (PAGE_SIZE < 8192) unsigned int truesize = igb_rx_pg_size(rx_ring) / 2; #else @@ -8366,6 +8367,9 @@ static struct sk_buff *igb_build_skb(struct igb_ring *rx_ring, skb_reserve(skb, xdp->data - xdp->data_hard_start); __skb_put(skb, xdp->data_end - xdp->data); + if (metasize) + skb_metadata_set(skb, metasize); + /* pull timestamp out of packet data */ if (igb_test_staterr(rx_desc, E1000_RXDADV_STAT_TSIP)) { igb_ptp_rx_pktstamp(rx_ring->q_vector, skb->data, skb); From patchwork Sat Oct 17 07:12:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Auhagen X-Patchwork-Id: 11842661 X-Patchwork-Delegate: kuba@kernel.org 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=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 67BF0C433E7 for ; Sat, 17 Oct 2020 07:13:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3981F20758 for ; Sat, 17 Oct 2020 07:13:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=voleatech.de header.i=@voleatech.de header.b="N73Av1Dy" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2411683AbgJQHM7 (ORCPT ); Sat, 17 Oct 2020 03:12:59 -0400 Received: from mail-eopbgr80095.outbound.protection.outlook.com ([40.107.8.95]:15328 "EHLO EUR04-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2410562AbgJQHM4 (ORCPT ); Sat, 17 Oct 2020 03:12:56 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q9s0q0kUxqBPjVwcjiVf+nf+qoOdyHdZuGRCrtM33UlFQtlBRntZ/Gh9VmJKwjeNPdYux6z97sjM/uA0tFApIrmXO2Mfz3DyqA5A/aSvFxA7mD/fO+1KP3lBDENKP9LWnXCUhOvtssm+ZuYKN+53iLtQsPUmxRi0QrXQcCaMhvHVk8N1roS4k8bxO+3kkGmcXHGVjs4BqFOZN1C2R4srW4AWZvFZv8bADDOCRMagqPQqUDFNsKUZpr2U8kuGRiLCcGYRq6kfB2Bv6cyInPrwSq0ozM6CylTI8pAqmni+U5lkB+0PeplRQBFI44e4XD46N+NMtIGq1AQ11k5jiVCyZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NomBr3LoGQsa69k3Fzkj6rQFsBUyW+u/rsI5lidP2iw=; b=Ueg0AJceACGcQyexOBY3cDpA2b3THE/YjzohyPWaoAWjF9mSGLkpJo8gFJfDXWsnBu+1+Wy/VaAjBQsqWczkhOcXJwgkiFEbRSHyZfsodaXv6Iel2vgCLCPnngYQZNg9xbTDeWHoFCqcrXwIU2C2MOjWdHu2JZwGIvQGO/PT7nHSnNj/a62nn9S71szkcQHx4w8l7sas5h6Hi5lS/N5d1eXGqMhNgSlS1yKrXXvLDYA5iKKeLjbYQ/qcAhjFIV1mpNPx2uWg4Txhx7ON6WSdyVRHbUSonhUfZE+OyrpZvN3pQwsV//qNC6O//ITKkM1dUfv0pzN40jeR9/0ersXfTw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=voleatech.de; dmarc=pass action=none header.from=voleatech.de; dkim=pass header.d=voleatech.de; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=voleatech.de; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NomBr3LoGQsa69k3Fzkj6rQFsBUyW+u/rsI5lidP2iw=; b=N73Av1DyuAV7+ltuLcs6bzSxx/slWfCn0uBh49PKFbGkb0i0tdMkaa322pGgpIwsmK7w+z92A5Gr5Tz8POJkuRHsYW1KKPm7F6lQwr1Ch2m/AMZ6DXFY6pT8P/uH5U4plqNNhn5PKJyAGkz7JzRkNblFoQK79Cf1Jyu7OSCuV14= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=voleatech.de; Received: from AM8PR05MB7251.eurprd05.prod.outlook.com (2603:10a6:20b:1d4::23) by AM0PR0502MB4018.eurprd05.prod.outlook.com (2603:10a6:208:b::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.21; Sat, 17 Oct 2020 07:12:45 +0000 Received: from AM8PR05MB7251.eurprd05.prod.outlook.com ([fe80::f132:2cc:34f2:5e4]) by AM8PR05MB7251.eurprd05.prod.outlook.com ([fe80::f132:2cc:34f2:5e4%7]) with mapi id 15.20.3477.021; Sat, 17 Oct 2020 07:12:45 +0000 From: sven.auhagen@voleatech.de To: anthony.l.nguyen@intel.com, maciej.fijalkowski@intel.com Cc: davem@davemloft.net, intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com, sandeep.penigalapati@intel.com, brouer@redhat.com Subject: [PATCH v2 5/6] igb: use xdp_do_flush Date: Sat, 17 Oct 2020 09:12:37 +0200 Message-Id: <20201017071238.95190-6-sven.auhagen@voleatech.de> X-Mailer: git-send-email 2.24.3 (Apple Git-128) In-Reply-To: <20201017071238.95190-1-sven.auhagen@voleatech.de> References: <20201017071238.95190-1-sven.auhagen@voleatech.de> X-Originating-IP: [109.193.235.168] X-ClientProxiedBy: AM3PR05CA0087.eurprd05.prod.outlook.com (2603:10a6:207:1::13) To AM8PR05MB7251.eurprd05.prod.outlook.com (2603:10a6:20b:1d4::23) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (109.193.235.168) by AM3PR05CA0087.eurprd05.prod.outlook.com (2603:10a6:207:1::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.25 via Frontend Transport; Sat, 17 Oct 2020 07:12:44 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 97e67ce1-e20a-496e-2792-08d8726c0b94 X-MS-TrafficTypeDiagnostic: AM0PR0502MB4018: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:651; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1uAqfKzQswolkot+7HHZUSpdQ3kVzY8jBE15Sh6YsobX0oswIMPcUn425tZZl0235/ZbJda8iuCWH2iM2jrMLdO2ZFDu5oACk09eRnqdnuRQY9Eqkr4SpyN4h7z0Kpk0D3uBG544/aD7rI1kN66uQ4d+Hkrgtjx//BvuZkiWW9KUHw9Xbr3Oe5NBhSYAeUNbd8n0Hh89YaRGCmLPsG1F1PQq/WL7Ws4HcMbv4TG0zXvNblD4KfaPiRPOcyG+7CeALGhGW/wTXL3GHc51f+N14dQaerQgAAcfRL32Wyxn910pUAIsSHFkEyAicHCcdVdtCJN//8DYKWDBs4NzMY96EFOkryp6ehbv/G1cUOJpUeufgnX5Ypy0m9k2avVUsPuB X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM8PR05MB7251.eurprd05.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(39830400003)(396003)(346002)(376002)(136003)(1076003)(8936002)(66476007)(66946007)(8676002)(86362001)(52116002)(69590400008)(66556008)(6512007)(478600001)(6506007)(9686003)(26005)(4326008)(6666004)(83380400001)(4744005)(5660300002)(956004)(2906002)(36756003)(316002)(186003)(2616005)(16526019)(6486002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData: fxXgHkULNGeBG4izx9WfhZjnYrQYsuvvpjcKsQeNAfJMc8Xu1GqXKvLcfObla/QUdUSY61sFOoIrvA1swwIElRR/g/URq1rP50qdxdGABpxrgSH7p6Z8J6brje6neOgn7Ol1ZxzbUK0u7v9OYzjnrRYKyo49Al6CL5qrk8+YPBoY4FNkfnBVmEXDXV45WQSc2/J0zvNkrefBa1ukjfhoJd0uRNqY+3bgtBVjbODA89asAXQAWV0X0J2whQILTaX+cTaSWi2pd9jV9MUvirEd92AAxOxwFkK2kUgOLmI2gKX4C2KEYjR3UQEP/aW06UfR6ukgta/t56usbvLys/SPY25F17pSgDjjvKnGQIJagpY1rVo6HPbh4HjSHrWvNiciDnXDDRXfDrdY2KWm8Hl2M+TV+U2MfP9yxSJxl2jnOLji2wOKWEeU1yzMfdYVSoJsIC3wRq0DK2Jfp43+RnftTP9sjKPYkejZQf7MciHg3RFmXcMRHhDe97o34SQXMQBNGQm/7+65CbpwabzuUo04yFhVSZLIJqdxOL0UexuTkh/IrV5srX07MGwmtKO939N53u5B7Xt+Oa0R79XFea/Nywmlo4j/KX/lOm5o4VS6E2AimdzLW6Rv98FLExp5oZV8fqdGBKF/cXjDUTDS3L5MUg== X-OriginatorOrg: voleatech.de X-MS-Exchange-CrossTenant-Network-Message-Id: 97e67ce1-e20a-496e-2792-08d8726c0b94 X-MS-Exchange-CrossTenant-AuthSource: AM8PR05MB7251.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Oct 2020 07:12:45.0861 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b82a99f6-7981-4a72-9534-4d35298f847b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: /+YDBX+aLqewvAyShV+nDzwac0ttyNJ4kOL7HtnqcCe5FeiKEC/fdSbMBpCUmKBaI2FT0mmn6UIcyfh4RnoaX6zrY6YnwULAM6zNPntWhDQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR0502MB4018 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Sven Auhagen Since it is a new XDP implementation change xdp_do_flush_map to xdp_do_flush. Signed-off-by: Sven Auhagen Suggested-by: Maciej Fijalkowski Reviewed-by: Maciej Fijalkowski --- drivers/net/ethernet/intel/igb/igb_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index 36ff8725fdaf..55e708f75187 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c @@ -8776,7 +8776,7 @@ static int igb_clean_rx_irq(struct igb_q_vector *q_vector, const int budget) rx_ring->skb = skb; if (xdp_xmit & IGB_XDP_REDIR) - xdp_do_flush_map(); + xdp_do_flush(); if (xdp_xmit & IGB_XDP_TX) { struct igb_ring *tx_ring = igb_xdp_tx_queue_mapping(adapter); From patchwork Sat Oct 17 07:12:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Auhagen X-Patchwork-Id: 11842665 X-Patchwork-Delegate: kuba@kernel.org 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=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 339B3C43457 for ; Sat, 17 Oct 2020 07:13:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EE211207EA for ; Sat, 17 Oct 2020 07:13:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=voleatech.de header.i=@voleatech.de header.b="XCWMTaWD" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2437429AbgJQHNB (ORCPT ); Sat, 17 Oct 2020 03:13:01 -0400 Received: from mail-eopbgr80095.outbound.protection.outlook.com ([40.107.8.95]:15328 "EHLO EUR04-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2411544AbgJQHM6 (ORCPT ); Sat, 17 Oct 2020 03:12:58 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AqLGIlcuDopHLOjWeKRIgSdLkDhD039xAMYrPvlK8HWYTx5cpZlshIRDsQndWMxYKyuFrP0iDASDOuZcX216H+qnmQizdPt+eS9BlIenLCASfcgJ26qOiINnuBY/yYJf1NnSiX7lQJW+C3j7xpzs/WiUWdJNY5MB8kw+pE3+NgjIguOPk1WnzZqFQQrqRoDqbOmDukpH9W2BPRa9H1ERvmJQy//65D/8YyjLJLcCPX8i9JrRXstWwxITB5J2dhKHY0axAEJSlybtzGr+knRguix03wtdMEQyRBAfUH/9kW2fjow+pDccWUYRxaWcyroJxp0MPMc4df/mzpL18MKTyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5DLiyNdhGj0+0KgnlM3fZ7TuIWFyC4SHOMOr9MEo2OE=; b=RryVBfc5TmGtysBbk3rpf66HXcrewaORm2z9Vvfod5TK0rJsB/Rb3L5eeE4wne56/gKes/i8+B4gGuflikdpWr8nGSMm9qspH4TU8w3PFt93w5R3RBJV5lkpTbxSRVId9kXOchY0nSC4p9FVsyG3w6FdCdMP+t3pNmIik+X5OaxFR647V+hzmKMo3jgl/VPjBFXr2LtkyGHz7u3ayiLA2tvk8nXc+R9roxO/EG3DSxQOLN65oiHfrza16qf8UsxxDkO9HzFltvfgPxHnUmHGc32EZSdIhulrrTkeB41fXb6gQEXYRS5PWWQlFjrg5s4xLiCrrahmEee92NVG9W2PRA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=voleatech.de; dmarc=pass action=none header.from=voleatech.de; dkim=pass header.d=voleatech.de; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=voleatech.de; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5DLiyNdhGj0+0KgnlM3fZ7TuIWFyC4SHOMOr9MEo2OE=; b=XCWMTaWDZsyjqx6ryLTYDUn/yT+SdRZK3FksIIiRGJPOtN612jBANdzOhim9+H0CBCarCtPXGvvhfgruB5+OLpBfTuSdbMjqNAjzBkL1E80JYWuW9K11QBK/ae+uE5I03wEMevIzkMuBZFDXH5ryF4TFayKwajf9ru/QnMlOSaw= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=voleatech.de; Received: from AM8PR05MB7251.eurprd05.prod.outlook.com (2603:10a6:20b:1d4::23) by AM0PR0502MB4018.eurprd05.prod.outlook.com (2603:10a6:208:b::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.21; Sat, 17 Oct 2020 07:12:45 +0000 Received: from AM8PR05MB7251.eurprd05.prod.outlook.com ([fe80::f132:2cc:34f2:5e4]) by AM8PR05MB7251.eurprd05.prod.outlook.com ([fe80::f132:2cc:34f2:5e4%7]) with mapi id 15.20.3477.021; Sat, 17 Oct 2020 07:12:45 +0000 From: sven.auhagen@voleatech.de To: anthony.l.nguyen@intel.com, maciej.fijalkowski@intel.com Cc: davem@davemloft.net, intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com, sandeep.penigalapati@intel.com, brouer@redhat.com Subject: [PATCH v2 6/6] igb: avoid transmit queue timeout in xdp path Date: Sat, 17 Oct 2020 09:12:38 +0200 Message-Id: <20201017071238.95190-7-sven.auhagen@voleatech.de> X-Mailer: git-send-email 2.24.3 (Apple Git-128) In-Reply-To: <20201017071238.95190-1-sven.auhagen@voleatech.de> References: <20201017071238.95190-1-sven.auhagen@voleatech.de> X-Originating-IP: [109.193.235.168] X-ClientProxiedBy: AM3PR05CA0087.eurprd05.prod.outlook.com (2603:10a6:207:1::13) To AM8PR05MB7251.eurprd05.prod.outlook.com (2603:10a6:20b:1d4::23) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (109.193.235.168) by AM3PR05CA0087.eurprd05.prod.outlook.com (2603:10a6:207:1::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.25 via Frontend Transport; Sat, 17 Oct 2020 07:12:45 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: beaa3a79-b386-4348-622c-08d8726c0bf5 X-MS-TrafficTypeDiagnostic: AM0PR0502MB4018: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3631; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wkdrgSLp/D4nOKnb3z7sZUTr36bxJTnjXw72j/TxydyQhSEs/VhCNqeo82kRQQEB2Ovf4wRtMAo8NTT8lVMu0QQc74feyCc1CE6ENalnlZvfhuoFxYCkbVAwGz7kRLHM8i3JCFa1kUJZjsGo2rmko5ExE/HqNbQNXMuFCBrsPd7myeQtUyJM6FLXeAF4IirhExmfTefdjzgq0BLyUSxx3w5ohAVZBaQJ9CURRW9vAboGv/45mi56Vsr4s9W9OPGhpH5q6y5mdhZtIxLCf9R2OgFMWXBGHV2jhHu0V25C32+Oq2cUxd/vq+1LFOKX8SebdvYJ7DQ70NBz2A59pT3DKsIaEFDoEarOSS38/Z3Gw9HHpyNpfCXF4hCrqd4kOOh/ X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM8PR05MB7251.eurprd05.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(39830400003)(396003)(346002)(376002)(136003)(1076003)(8936002)(66476007)(66946007)(8676002)(86362001)(52116002)(69590400008)(66556008)(6512007)(478600001)(6506007)(9686003)(26005)(4326008)(6666004)(83380400001)(5660300002)(956004)(2906002)(36756003)(316002)(186003)(2616005)(16526019)(6486002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData: QUXhR0+fTVmGNDabeiWPS6vRk1l4PHg+9LvB+p2tT3obY11bxopqla7k/Xvkr/mqLliwgKjdA3EtzG8lIS6BidlV9SuSw1E89XVAgGvEki3WIq3oulXdqtQzHrCjafw4kqrkmHiQv5Pmg/fLECjKyc46BNUCmQgo5XygYcULvHgM/bIAb84vmFUogiQ6K7pAK3sIvOQLQY7Mab9aXu4KtRXmgdsC58yAcqGiOmHrH//vjAolM0jhNb8S/qjfLQf08W67r7/hnuFmd5jouhTIK24bld6meHUXWGYlCEBBGgXDm2F8EqsO/DuFG0wRZbefMJE9MIMCIcCfmoT3dEkT+Ow3SIpc1aVuP5JjRvzB/yn7qLQjTDJ8HyZPhApzXS6Q7rJNHP6nf6gkaSpuhhJyG2UDcqyrZk4c0ZyK3Atqooa/9fkdb1QIk7C2W3+EM1s1i//eGlUktSXrBbJEFuijf/mKDk3BbH4cR7Yr0FnlLb45J2srXssyEe+WoElx4JUqkQSaSMyUBMf4ppkaGe00Vdx2h26XzcoT4dgD1AYKkU6SAh0zQDsn4pZNmuyn69JNMfJziXQ9q2G2SBoj6n5lL3p4fkEh1N8je3c6jLTeGJhsx77Xrr8fSdpiqQsbgf+brcMGOA0A8ZM7u8DCV9IBAA== X-OriginatorOrg: voleatech.de X-MS-Exchange-CrossTenant-Network-Message-Id: beaa3a79-b386-4348-622c-08d8726c0bf5 X-MS-Exchange-CrossTenant-AuthSource: AM8PR05MB7251.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Oct 2020 07:12:45.7412 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b82a99f6-7981-4a72-9534-4d35298f847b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: rbBAAnV4fJvtHUS3PZxDH3aw7ZQwRcJOGYM7TCboszVl1XIUB2hFuQH5xDEL8K6ARG7DNwF7jgo7do1q7Am9C1ByAWGkWr+5phVRMhYFwUQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR0502MB4018 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Sven Auhagen Since we share the transmit queue with the slow path, it is possible that we run into a transmit queue timeout. This will reset the queue. This happens under high load when the fast path is using the transmit queue pretty much exclusively. By setting the transmit queues trans_start variable to jiffies in the two xdp xmit functions we avoid the timeout. Signed-off-by: Sven Auhagen --- drivers/net/ethernet/intel/igb/igb_main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index 55e708f75187..4a082c06f48d 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c @@ -2916,6 +2916,8 @@ static int igb_xdp_xmit_back(struct igb_adapter *adapter, struct xdp_buff *xdp) nq = txring_txq(tx_ring); __netif_tx_lock(nq, cpu); + /* Avoid transmit queue timeout since we share it with the slow path */ + nq->trans_start = jiffies; ret = igb_xmit_xdp_ring(adapter, tx_ring, xdpf); __netif_tx_unlock(nq); @@ -2948,6 +2950,9 @@ static int igb_xdp_xmit(struct net_device *dev, int n, nq = txring_txq(tx_ring); __netif_tx_lock(nq, cpu); + /* Avoid transmit queue timeout since we share it with the slow path */ + nq->trans_start = jiffies; + for (i = 0; i < n; i++) { struct xdp_frame *xdpf = frames[i]; int err;