Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8d3a3048 authored by David S. Miller's avatar David S. Miller
Browse files


Jeff Kirsher says:

====================
1GbE Intel Wired LAN Driver Updates 2019-03-19

This series contains updates to e100, e1000, e1000e, igb, igc and
ixgbe.

Serhey Popovych fixes the return value for several of our older
drivers for netdev_update_features() to notify of changes applied.

Kai-Heng Feng fixes the WoL setting for system suspend, which should
not set to runtime suspend settings for igb.  Then fixes a power
management issue with e1000e for CNP+ devices.

Colin Ian King fixes whitespace issue (indentation), which helps with
readability.

Sasha provides the remaining changes for igc, including the enabling of
multi-queues to receive.  Added support for displaying and configuring
network flow classification (NFC) via ethtool.  Added additional
statistics and basic counters for igc.  Fixed a typo, so it aligns with
our other drivers.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 9bd5423f bb0e5837
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -2797,7 +2797,7 @@ static int e100_set_features(struct net_device *netdev,


	netdev->features = features;
	netdev->features = features;
	e100_exec_cb(nic, NULL, e100_configure);
	e100_exec_cb(nic, NULL, e100_configure);
	return 0;
	return 1;
}
}


static const struct net_device_ops e100_netdev_ops = {
static const struct net_device_ops e100_netdev_ops = {
+1 −1
Original line number Original line Diff line number Diff line
@@ -820,7 +820,7 @@ static int e1000_set_features(struct net_device *netdev,
	else
	else
		e1000_reset(adapter);
		e1000_reset(adapter);


	return 0;
	return 1;
}
}


static const struct net_device_ops e1000_netdev_ops = {
static const struct net_device_ops e1000_netdev_ops = {
+2 −2
Original line number Original line Diff line number Diff line
@@ -7003,7 +7003,7 @@ static int e1000_set_features(struct net_device *netdev,
	else
	else
		e1000e_reset(adapter);
		e1000e_reset(adapter);


	return 0;
	return 1;
}
}


static const struct net_device_ops e1000e_netdev_ops = {
static const struct net_device_ops e1000e_netdev_ops = {
@@ -7350,7 +7350,7 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)


	dev_pm_set_driver_flags(&pdev->dev, DPM_FLAG_NEVER_SKIP);
	dev_pm_set_driver_flags(&pdev->dev, DPM_FLAG_NEVER_SKIP);


	if (pci_dev_run_wake(pdev))
	if (pci_dev_run_wake(pdev) && hw->mac.type < e1000_pch_cnp)
		pm_runtime_put_noidle(&pdev->dev);
		pm_runtime_put_noidle(&pdev->dev);


	return 0;
	return 0;
+4 −1
Original line number Original line Diff line number Diff line
@@ -2480,7 +2480,7 @@ static int igb_set_features(struct net_device *netdev,
	else
	else
		igb_reset(adapter);
		igb_reset(adapter);


	return 0;
	return 1;
}
}


static int igb_ndo_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
static int igb_ndo_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
@@ -3452,6 +3452,9 @@ static int igb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
			break;
			break;
		}
		}
	}
	}

	dev_pm_set_driver_flags(&pdev->dev, DPM_FLAG_NEVER_SKIP);

	pm_runtime_put_noidle(&pdev->dev);
	pm_runtime_put_noidle(&pdev->dev);
	return 0;
	return 0;


+65 −3
Original line number Original line Diff line number Diff line
@@ -29,9 +29,15 @@ unsigned int igc_get_max_rss_queues(struct igc_adapter *adapter);
void igc_set_flag_queue_pairs(struct igc_adapter *adapter,
void igc_set_flag_queue_pairs(struct igc_adapter *adapter,
			      const u32 max_rss_queues);
			      const u32 max_rss_queues);
int igc_reinit_queues(struct igc_adapter *adapter);
int igc_reinit_queues(struct igc_adapter *adapter);
void igc_write_rss_indir_tbl(struct igc_adapter *adapter);
bool igc_has_link(struct igc_adapter *adapter);
bool igc_has_link(struct igc_adapter *adapter);
void igc_reset(struct igc_adapter *adapter);
void igc_reset(struct igc_adapter *adapter);
int igc_set_spd_dplx(struct igc_adapter *adapter, u32 spd, u8 dplx);
int igc_set_spd_dplx(struct igc_adapter *adapter, u32 spd, u8 dplx);
int igc_add_mac_steering_filter(struct igc_adapter *adapter,
				const u8 *addr, u8 queue, u8 flags);
int igc_del_mac_steering_filter(struct igc_adapter *adapter,
				const u8 *addr, u8 queue, u8 flags);
void igc_update_stats(struct igc_adapter *adapter);


extern char igc_driver_name[];
extern char igc_driver_name[];
extern char igc_driver_version[];
extern char igc_driver_version[];
@@ -51,6 +57,13 @@ extern char igc_driver_version[];
#define IGC_FLAG_VLAN_PROMISC		BIT(15)
#define IGC_FLAG_VLAN_PROMISC		BIT(15)
#define IGC_FLAG_RX_LEGACY		BIT(16)
#define IGC_FLAG_RX_LEGACY		BIT(16)


#define IGC_FLAG_RSS_FIELD_IPV4_UDP	BIT(6)
#define IGC_FLAG_RSS_FIELD_IPV6_UDP	BIT(7)

#define IGC_MRQC_ENABLE_RSS_MQ		0x00000002
#define IGC_MRQC_RSS_FIELD_IPV4_UDP	0x00400000
#define IGC_MRQC_RSS_FIELD_IPV6_UDP	0x00800000

#define IGC_START_ITR			648 /* ~6000 ints/sec */
#define IGC_START_ITR			648 /* ~6000 ints/sec */
#define IGC_4K_ITR			980
#define IGC_4K_ITR			980
#define IGC_20K_ITR			196
#define IGC_20K_ITR			196
@@ -284,6 +297,38 @@ struct igc_q_vector {
	struct igc_ring ring[0] ____cacheline_internodealigned_in_smp;
	struct igc_ring ring[0] ____cacheline_internodealigned_in_smp;
};
};


#define MAX_ETYPE_FILTER		(4 - 1)

enum igc_filter_match_flags {
	IGC_FILTER_FLAG_ETHER_TYPE =	0x1,
	IGC_FILTER_FLAG_VLAN_TCI   =	0x2,
	IGC_FILTER_FLAG_SRC_MAC_ADDR =	0x4,
	IGC_FILTER_FLAG_DST_MAC_ADDR =	0x8,
};

/* RX network flow classification data structure */
struct igc_nfc_input {
	/* Byte layout in order, all values with MSB first:
	 * match_flags - 1 byte
	 * etype - 2 bytes
	 * vlan_tci - 2 bytes
	 */
	u8 match_flags;
	__be16 etype;
	__be16 vlan_tci;
	u8 src_addr[ETH_ALEN];
	u8 dst_addr[ETH_ALEN];
};

struct igc_nfc_filter {
	struct hlist_node nfc_node;
	struct igc_nfc_input filter;
	unsigned long cookie;
	u16 etype_reg_index;
	u16 sw_idx;
	u16 action;
};

struct igc_mac_addr {
struct igc_mac_addr {
	u8 addr[ETH_ALEN];
	u8 addr[ETH_ALEN];
	u8 queue;
	u8 queue;
@@ -291,8 +336,11 @@ struct igc_mac_addr {
};
};


#define IGC_MAC_STATE_DEFAULT		0x1
#define IGC_MAC_STATE_DEFAULT		0x1
#define IGC_MAC_STATE_MODIFIED	0x2
#define IGC_MAC_STATE_IN_USE		0x2
#define IGC_MAC_STATE_IN_USE	0x4
#define IGC_MAC_STATE_SRC_ADDR		0x4
#define IGC_MAC_STATE_QUEUE_STEERING	0x8

#define IGC_MAX_RXNFC_FILTERS		16


/* Board specific private data structure */
/* Board specific private data structure */
struct igc_adapter {
struct igc_adapter {
@@ -356,12 +404,22 @@ struct igc_adapter {
	u16 tx_ring_count;
	u16 tx_ring_count;
	u16 rx_ring_count;
	u16 rx_ring_count;


	u32 tx_hwtstamp_timeouts;
	u32 tx_hwtstamp_skipped;
	u32 rx_hwtstamp_cleared;
	u32 *shadow_vfta;
	u32 *shadow_vfta;


	u32 rss_queues;
	u32 rss_queues;
	u32 rss_indir_tbl_init;

	/* RX network flow classification support */
	struct hlist_head nfc_filter_list;
	struct hlist_head cls_flower_list;
	unsigned int nfc_filter_count;


	/* lock for RX network flow classification filter */
	/* lock for RX network flow classification filter */
	spinlock_t nfc_lock;
	spinlock_t nfc_lock;
	bool etype_bitmap[MAX_ETYPE_FILTER];


	struct igc_mac_addr *mac_table;
	struct igc_mac_addr *mac_table;


@@ -447,6 +505,10 @@ static inline s32 igc_read_phy_reg(struct igc_hw *hw, u32 offset, u16 *data)


/* forward declaration */
/* forward declaration */
void igc_reinit_locked(struct igc_adapter *);
void igc_reinit_locked(struct igc_adapter *);
int igc_add_filter(struct igc_adapter *adapter,
		   struct igc_nfc_filter *input);
int igc_erase_filter(struct igc_adapter *adapter,
		     struct igc_nfc_filter *input);


#define igc_rx_pg_size(_ring) (PAGE_SIZE << igc_rx_pg_order(_ring))
#define igc_rx_pg_size(_ring) (PAGE_SIZE << igc_rx_pg_order(_ring))


Loading