Message ID | 20230912021122.7952-1-muhammad.husaini.zulkifli@intel.com |
---|---|
State | Superseded |
Headers | show |
Series | [iwl-net,v1] igc: Add support for receiving error frames | expand |
On 12/09/2023 5:11, Muhammad Husaini Zulkifli wrote: > 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 > 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 <interface> 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 <muhammad.husaini.zulkifli@intel.com> > --- > 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; Reviewed-by: Sasha Neftin <sasha.neftin@intel.com>
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;
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 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 <interface> 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 <muhammad.husaini.zulkifli@intel.com> --- drivers/net/ethernet/intel/igc/igc_main.c | 1 + 1 file changed, 1 insertion(+)