From patchwork Wed Sep 13 04:27:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zulkifli, Muhammad Husaini" X-Patchwork-Id: 1833362 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256 header.s=default header.b=p0Kka4I8; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=patchwork.ozlabs.org) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RlnXS0SNgz1yh6 for ; Wed, 13 Sep 2023 14:29:11 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id A62F6418AF; Wed, 13 Sep 2023 04:29:09 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org A62F6418AF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1694579349; bh=sJD5RvRt4de4R38lI0713INaVjkRk9PGjdO8fZqE4vQ=; h=From:To:Date:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:Cc:From; b=p0Kka4I8dzZqY9KQNB6Kp78fqoVi4oVMIcWBpwQGO61iSCT7BlLxpNTca0fP/OZIJ 5Mmmig9qJNw1xbnjWfa72FNx+3///OfYI5SzEqzvqm/2EXL2MyQ+7J78/2rwGfbtrP HywPCuLCYBRo+YRzFbbiGuNOi4WFwxXzcp56dNYEMrQcrECdpUlpCuKP0dnFwK7KOv LRxkdKjiPLGNKUq+gnV913/8Rc+LJmNOcQufTO5lfl9QGhqY41KvsCczN6121Cvyjs TLIgoFdIVeJ7SjGBtTljB4L+Rq4W8s+kMPpUEU6LCsglf7E6zLsDzTYf0hynC8osj7 a/LXxb7c69wjQ== X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eWDZ1YmaL09B; Wed, 13 Sep 2023 04:29:08 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id 78E2441904; Wed, 13 Sep 2023 04:29:08 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 78E2441904 X-Original-To: intel-wired-lan@osuosl.org Delivered-To: intel-wired-lan@osuosl.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 177011BF5A3 for ; Wed, 13 Sep 2023 04:29:07 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id E6F6240102 for ; Wed, 13 Sep 2023 04:29:06 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org E6F6240102 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0FKbVAtp10QG for ; Wed, 13 Sep 2023 04:29:06 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) by smtp2.osuosl.org (Postfix) with ESMTPS id 3B338400BF for ; Wed, 13 Sep 2023 04:29:06 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 3B338400BF X-IronPort-AV: E=McAfee;i="6600,9927,10831"; a="442592265" X-IronPort-AV: E=Sophos;i="6.02,142,1688454000"; d="scan'208";a="442592265" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Sep 2023 21:29:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10831"; a="990764952" X-IronPort-AV: E=Sophos;i="6.02,142,1688454000"; d="scan'208";a="990764952" Received: from zulkifl3-ilbpg0.png.intel.com ([10.88.229.82]) by fmsmga006.fm.intel.com with ESMTP; 12 Sep 2023 21:29:03 -0700 From: Muhammad Husaini Zulkifli To: intel-wired-lan@osuosl.org Date: Wed, 13 Sep 2023 12:27:52 +0800 Message-Id: <20230913042752.11947-1-muhammad.husaini.zulkifli@intel.com> X-Mailer: git-send-email 2.17.1 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1694579346; x=1726115346; h=from:to:cc:subject:date:message-id; bh=6PavsG4BOGn130XowheC0RrjlIHWokCjpjd8uE1eelQ=; b=HcCmumF+5FBkRIg7WPMV7FjVzCyRBAlxFfKsgGDhNidHORQjv56x85Q7 jT0P+8Brv6+2y5vDm/Lq0kVMzTuYrx81Vxr8gSZtGr5WWGh4XE8ZgdmEA s06ms+NAtE71k33uUte/V4vbpx/jP87zbKHdUgi1uiBwd84rsCq8TwpYR T1+w63RVvQnABdPES43oveOlc2ezVyW4qM58er0NsGdvSqYgPts2vB/70 TNe0KHxINoavVAU/Y0lsiWM/8sucfFVoiLxMH6qR7rDbXHMBHPf9rAO8p XeJjGqFYjEzMso/PC9/xnSSNJ8/AHq3ZrYd71hhk2IP3XVMcoAdsHqpQg w==; X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=HcCmumF+ Subject: [Intel-wired-lan] [PATCH iwl-net v2] igc: Add support for receiving error frames X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: husainizulkifli@gmail.com, anthony.l.nguyen@intel.com MIME-Version: 1.0 Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" This patch enables the NIC to (optionally, via ethtool) receives the errored packet frames as it was not provided to user before. According to Software User Manual Chapter 8.9.1, once Bit(2) is set in Receive Control Register (RCTL), bad packets will be received and sent to host memory. Receive descriptor error field (RDESC.ERRORS) shall have the corresponding bit to signal the driver that packets is errored. By turning on NETIF_F_RXALL as well, all broadcast packets will be received and any flow control packets that aren't recognised will be sent to the host. How to test: User can set to receive all frames using ethtool command. Example command: ethtool -K rx-all on Previous output: ethtool -K enp1s0 rx-all on Actual changes: rx-all: off [requested on] Could not change any device features New output: ethtool -K enp1s0 rx-all on ethtool -k enp1s0 | grep rx-all rx-all: on Fixes: 13b5b7fd6a4a ("igc: Add support for Tx/Rx rings") Signed-off-by: Muhammad Husaini Zulkifli Reviewed-by: Sasha Neftin --- V1 -> V2: Fix typo in commit message --- drivers/net/ethernet/intel/igc/igc_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c index 98de34d0ce07..e3f4b3e95cd0 100644 --- a/drivers/net/ethernet/intel/igc/igc_main.c +++ b/drivers/net/ethernet/intel/igc/igc_main.c @@ -6850,6 +6850,7 @@ static int igc_probe(struct pci_dev *pdev, netdev->hw_features |= NETIF_F_NTUPLE; netdev->hw_features |= NETIF_F_HW_VLAN_CTAG_TX; netdev->hw_features |= NETIF_F_HW_VLAN_CTAG_RX; + netdev->hw_features |= NETIF_F_RXALL; netdev->hw_features |= netdev->features; netdev->features |= NETIF_F_HIGHDMA;