fix bug and remove code
Subsystems (2)
cover fix bug and remove code
Fix a bug with dummy descriptor handling, and remove some unused code.
Jesse Brandeburg (1):
intel: remove unused macros
Przemyslaw Patynowski (1):
iavf: Fix handling of dummy receive descriptors
drivers/net/ethernet/intel/e100.c | 1 - drivers/net/ethernet/intel/e1000/e1000_param.c | 2 -- drivers/net/ethernet/intel/e1000e/param.c | 2 -- drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 2 -- drivers/net/ethernet/intel/i40e/i40e_ptp.c | 1 - drivers/net/ethernet/intel/i40e/i40e_txrx.c | 1 - drivers/net/ethernet/intel/iavf/iavf_txrx.c | 5 ++--- drivers/net/ethernet/intel/iavf/iavf_virtchnl.c | 4 ---- drivers/net/ethernet/intel/igc/igc_ptp.c | 1 - drivers/net/ethernet/intel/ixgb/ixgb_main.c | 1 - drivers/net/ethernet/intel/ixgb/ixgb_param.c | 2 -- drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c | 2 -- drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 2 -- drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c | 1 - drivers/net/ethernet/intel/ixgbevf/ethtool.c | 4 ---- 15 files changed, 2 insertions(+), 29 deletions(-)
Signature · 6 lines
2.31.1 _______________________________________________ Intel-wired-lan mailing list [email protected] https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
PATCH 1/2 iavf: Fix handling of dummy receive descriptors
From: Przemyslaw Patynowski <[email protected]>
Fix memory leak caused by not handling dummy receive descriptor properly. iavf_get_rx_buffer now sets the rx_buffer return value for dummy receive descriptors. Without this patch, when the hardware writes a dummy descriptor, iavf would not free the page allocated for the previous receive buffer. This is an unlikely event but can still happen.
[Jesse: massaged commit message]
--- drivers/net/ethernet/intel/iavf/iavf_txrx.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/net/ethernet/intel/iavf/iavf_txrx.c +2 -3
@@ -1285,11 +1285,10 @@ static struct iavf_rx_buffer *iavf_get_rx_buffer(struct iavf_ring *rx_ring, {struct iavf_rx_buffer *rx_buffer; -if (!size) -return NULL ; - rx_buffer = &rx_ring->rx_bi[rx_ring->next_to_clean];prefetchw (rx_buffer->page); +if (!size) +return rx_buffer;/* we are reusing so sync this buffer for CPU use */ dma_sync_single_range_for_cpu(rx_ring->dev,
Signature · 6 lines
2.31.1 _______________________________________________ Intel-wired-lan mailing list [email protected] https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
Re: [Intel-wired-lan] [PATCH net v1 1/2] iavf: Fix handling of dummy receive descriptors
drivers/net/ethernet/intel/iavf/iavf_txrx.c static struct iavf_rx_buffer
Quoted 36 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Jesse Brandeburg
Sent: Saturday, June 25, 2022 2:33 AM
To: [email protected]
Cc: Patynowski, PrzemyslawX <[email protected]>; Brandeburg, Jesse <[email protected]>
Subject: [Intel-wired-lan] [PATCH net v1 1/2] iavf: Fix handling of dummy receive descriptorsFrom: Przemyslaw Patynowski <[email protected]>
Fix memory leak caused by not handling dummy receive descriptor properly.
iavf_get_rx_buffernow sets therx_bufferreturn value for dummy receive descriptors. Without this patch, when the hardware writes a dummy descriptor, iavf would not free the page allocated for the previous receive buffer. This is an unlikely event but can still happen.[Jesse: massaged commit message]
Fixes efa14c398582 ("iavf: allow null RX descriptors")Signed-off-by Przemyslaw PatynowskiSigned-off-by Jesse Brandeburg <[email protected]>--- drivers/net/ethernet/intel/iavf/iavf_txrx.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)drivers/net/ethernet/intel/iavf/iavf_txrx.c +0
-0@@ -1285,11 +1285,10 @@ static struct iavf_rx_buffer
_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
PATCH 2/2 intel: remove unused macros
In reply to Jesse BrandeburgAs found by the compile option -Wunused-macros, remove these macros that are never used by the code.
---.../intel/e1000e/param.c:105: warning: macro "MIN_INTMODE" is not used [-Wunused-macros] .../intel/e1000e/param.c:104: warning: macro "MAX_INTMODE" is not used [-Wunused-macros] .../intel/ixgb/ixgb_param.c:144: warning: macro "XSUMRX_DEFAULT" is not used [-Wunused-macros] .../intel/igc/igc_ptp.c:18: warning: macro "IGC_SYSTIM_OVERFLOW_PERIOD" is not used [-Wunused-macros] .../intel/e1000/e1000_param.c:98: warning: macro "FLOW_CONTROL_DEFAULT" is not used [-Wunused-macros] .../intel/e1000/e1000_param.c:85: warning: macro "AUTONEG_ADV_MASK" is not used [-Wunused-macros] .../intel/ixgb/ixgb_main.c:1707: warning: macro "IXGB_MAX_INTR" is not used [-Wunused-macros] .../intel/e100.c:1433: warning: macro "ADVERTISE_FC_SUPPORTED" is not used [-Wunused-macros] .../intel/ixgbevf/ethtool.c:133: warning: macro "IXGBE_GET_STAT" is not used [-Wunused-macros] .../intel/ixgbevf/ethtool.c:20: warning: macro "IXGBE_ALL_RAR_ENTRIES" is not used [-Wunused-macros] .../intel/ixgbe/ixgbe_ptp.c:141: warning: macro "MAX_TIMADJ" is not used [-Wunused-macros] .../intel/ixgbe/ixgbe_ethtool.c:21: warning: macro "IXGBE_ALL_RAR_ENTRIES" is not used [-Wunused-macros] .../intel/i40e/i40e_ptp.c:30: warning: macro "to_dev" is not used [-Wunused-macros] .../intel/ixgbe/ixgbe_dcb_nl.c:16: warning: macro "BIT_LINKSPEED" is not used [-Wunused-macros] .../intel/ixgbe/ixgbe_dcb_nl.c:11: warning: macro "BIT_DCB_MODE" is not used [-Wunused-macros] .../intel/i40e/i40e_txrx.c:375: warning: macro "IP_HEADER_OFFSET" is not used [-Wunused-macros] .../intel/i40e/i40e_ethtool.c:239: warning: macro "I40E_QUEUE_STAT" is not used [-Wunused-macros]
--- drivers/net/ethernet/intel/e100.c | 1 - drivers/net/ethernet/intel/e1000/e1000_param.c | 2 -- drivers/net/ethernet/intel/e1000e/param.c | 2 -- drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 2 -- drivers/net/ethernet/intel/i40e/i40e_ptp.c | 1 - drivers/net/ethernet/intel/i40e/i40e_txrx.c | 1 - drivers/net/ethernet/intel/iavf/iavf_virtchnl.c | 4 ---- drivers/net/ethernet/intel/igc/igc_ptp.c | 1 - drivers/net/ethernet/intel/ixgb/ixgb_main.c | 1 - drivers/net/ethernet/intel/ixgb/ixgb_param.c | 2 -- drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c | 2 -- drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 2 -- drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c | 1 - drivers/net/ethernet/intel/ixgbevf/ethtool.c | 4 ---- 14 files changed, 26 deletions(-)
drivers/net/ethernet/intel/e100.c +0 -1
@@ -1430,7 +1430,6 @@ static int e100_phy_check_without_mii(struct nic *nic)#define MII_NSC_CONG MII_RESV1#define NSC_CONG_ENABLE 0x0100#define NSC_CONG_TXREADY 0x0400 -#define ADVERTISE_FC_SUPPORTED 0x0400static int e100_phy_init (struct nic *nic) {struct net_device *netdev = nic->netdev;
drivers/net/ethernet/intel/e1000/e1000_param.c +0 -2
@@ -82,7 +82,6 @@ E1000_PARAM(Duplex, "Duplex setting");*/ E1000_PARAM (AutoNeg,"Advertised auto-negotiation setting" );#define AUTONEG_ADV_DEFAULT 0x2F -#define AUTONEG_ADV_MASK 0x2F/* User Specified Flow Control Override *
@@ -95,7 +94,6 @@ E1000_PARAM(AutoNeg, "Advertised auto-negotiation setting");* Default Value: Read flow control settings from the EEPROM */ E1000_PARAM (FlowControl,"Flow Control setting" ); -#define FLOW_CONTROL_DEFAULT FLOW_CONTROL_FULL/* XsumRX - Receive Checksum Offload Enable/Disable *
drivers/net/ethernet/intel/e1000e/param.c +0 -2
@@ -101,8 +101,6 @@ E1000_PARAM(InterruptThrottleRate, "Interrupt Throttling Rate");* demoted to the most advanced interrupt mode available. */ E1000_PARAM (IntMode,"Interrupt Mode" ); -#define MAX_INTMODE 2 -#define MIN_INTMODE 0/* Enable Smart Power Down of the PHY *
drivers/net/ethernet/intel/i40e/i40e_ethtool.c +0 -2
@@ -236,8 +236,6 @@ static void __i40e_add_stat_strings(u8 **p, const struct i40e_stats stats[], I40E_STAT(struct i40e_cp_veb_tc_stats, _name, _stat)#define I40E_PFC_STAT (_name, _stat) \ I40E_STAT(struct i40e_pfc_stats, _name, _stat) -#define I40E_QUEUE_STAT (_name, _stat) \ - I40E_STAT(struct i40e_ring, _name, _stat)static const struct i40e_stats i40e_gstrings_net_stats[] = {I40E_NETDEV_STAT (rx_packets),
drivers/net/ethernet/intel/i40e/i40e_ptp.c +0 -1
@@ -27,7 +27,6 @@#define I40E_PRTTSYN_CTL1_TSYNTYPE_V2 (2 << \ I40E_PRTTSYN_CTL1_TSYNTYPE_SHIFT)#define I40E_SUBDEV_ID_25G_PTP_PIN 0xB -#define to_dev (obj) container_of(obj, struct device, kobj)enum i40e_ptp_pin {SDP3_2 =0 ,
drivers/net/ethernet/intel/i40e/i40e_txrx.c +0 -1
@@ -372,7 +372,6 @@ static void i40e_change_filter_num(bool ipv4, bool add, u16 *ipv4_filter_num, } } -#define IP_HEADER_OFFSET 14#define I40E_UDPIP_DUMMY_PACKET_LEN 42#define I40E_UDPIP6_DUMMY_PACKET_LEN 62/**
drivers/net/ethernet/intel/iavf/iavf_virtchnl.c +0 -4
@@ -5,10 +5,6 @@#include "iavf_prototype.h" #include "iavf_client.h" -/* busy wait delay in msec */ -#define IAVF_BUSY_WAIT_DELAY 10 -#define IAVF_BUSY_WAIT_COUNT 50 -/** * iavf_send_pf_msg * @adapter: adapter structure
drivers/net/ethernet/intel/igc/igc_ptp.c +0 -1
@@ -15,7 +15,6 @@#define INCVALUE_MASK 0x7fffffff#define ISGN 0x80000000 -#define IGC_SYSTIM_OVERFLOW_PERIOD (HZ * 60 * 9)#define IGC_PTP_TX_TIMEOUT (HZ * 15)#define IGC_PTM_STAT_SLEEP 2
drivers/net/ethernet/intel/ixgb/ixgb_main.c +0 -1
@@ -1704,7 +1704,6 @@ ixgb_update_stats(struct ixgb_adapter *adapter) netdev->stats.tx_window_errors =0 ; } -#define IXGB_MAX_INTR 10/** * ixgb_intr - Interrupt Handler * @irq: interrupt number
drivers/net/ethernet/intel/ixgb/ixgb_param.c +0 -2
@@ -141,8 +141,6 @@ IXGB_PARAM(IntDelayEnable, "Transmit Interrupt Delay Enable");#define MAX_RDTR 0xFFFF#define MIN_RDTR 0 -#define XSUMRX_DEFAULT OPTION_ENABLED -#define DEFAULT_FCRTL 0x28000#define DEFAULT_FCRTH 0x30000#define MIN_FCRTL 0
drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c +0 -2
@@ -8,12 +8,10 @@#include "ixgbe_sriov.h" /* Callbacks for DCB netlink in the kernel */ -#define BIT_DCB_MODE 0x01#define BIT_PFC 0x02#define BIT_PG_RX 0x04#define BIT_PG_TX 0x08#define BIT_APP_UPCHG 0x10 -#define BIT_LINKSPEED 0x80/* Responses for the DCB_C_SET_ALL command */ #define DCB_HW_CHG_RST 0/* DCB configuration changed with reset */
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c +0 -2
@@ -18,8 +18,6 @@#include "ixgbe_phy.h" -#define IXGBE_ALL_RAR_ENTRIES 16 -enum {NETDEV_STATS ,IXGBE_STATS };struct ixgbe_stats {
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c +0 -1
@@ -138,7 +138,6 @@#define IXGBE_X550_BASE_PERIOD 0xC80000000ULL#define INCVALUE_MASK 0x7FFFFFFF#define ISGN 0x80000000 -#define MAX_TIMADJ 0x7FFFFFFF/** * ixgbe_ptp_setup_sdp_X540
drivers/net/ethernet/intel/ixgbevf/ethtool.c +0 -4
@@ -17,8 +17,6 @@#include "ixgbevf.h" -#define IXGBE_ALL_RAR_ENTRIES 16 -enum {NETDEV_STATS ,IXGBEVF_STATS };struct ixgbe_stats {
@@ -130,8 +128,6 @@ static void ixgbevf_set_msglevel(struct net_device *netdev, u32 data) adapter->msg_enable = data; } -#define IXGBE_GET_STAT (_A_, _R_) (_A_->stats._R_) -static int ixgbevf_get_regs_len (struct net_device *netdev) {#define IXGBE_REGS_LEN 45
Signature · 6 lines
2.31.1 _______________________________________________ Intel-wired-lan mailing list [email protected] https://lists.osuosl.org/mailman/listinfo/intel-wired-lan