mirror of
https://github.com/torvalds/linux.git
synced 2024-12-21 10:31:54 +00:00
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next
Jeff Kirsher says: ==================== This series contains updates to igb, igbvf and ixgbe. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
3a858a8692
@ -1589,8 +1589,7 @@ void igb_reset(struct igb_adapter *adapter)
|
|||||||
struct e1000_hw *hw = &adapter->hw;
|
struct e1000_hw *hw = &adapter->hw;
|
||||||
struct e1000_mac_info *mac = &hw->mac;
|
struct e1000_mac_info *mac = &hw->mac;
|
||||||
struct e1000_fc_info *fc = &hw->fc;
|
struct e1000_fc_info *fc = &hw->fc;
|
||||||
u32 pba = 0, tx_space, min_tx_space, min_rx_space;
|
u32 pba = 0, tx_space, min_tx_space, min_rx_space, hwm;
|
||||||
u16 hwm;
|
|
||||||
|
|
||||||
/* Repartition Pba for greater than 9k mtu
|
/* Repartition Pba for greater than 9k mtu
|
||||||
* To take effect CTRL.RST is required.
|
* To take effect CTRL.RST is required.
|
||||||
@ -1665,7 +1664,7 @@ void igb_reset(struct igb_adapter *adapter)
|
|||||||
hwm = min(((pba << 10) * 9 / 10),
|
hwm = min(((pba << 10) * 9 / 10),
|
||||||
((pba << 10) - 2 * adapter->max_frame_size));
|
((pba << 10) - 2 * adapter->max_frame_size));
|
||||||
|
|
||||||
fc->high_water = hwm & 0xFFF0; /* 16-byte granularity */
|
fc->high_water = hwm & 0xFFFFFFF0; /* 16-byte granularity */
|
||||||
fc->low_water = fc->high_water - 16;
|
fc->low_water = fc->high_water - 16;
|
||||||
fc->pause_time = 0xFFFF;
|
fc->pause_time = 0xFFFF;
|
||||||
fc->send_xon = 1;
|
fc->send_xon = 1;
|
||||||
|
@ -46,6 +46,7 @@
|
|||||||
#define E1000_RXD_ERR_SE 0x02 /* Symbol Error */
|
#define E1000_RXD_ERR_SE 0x02 /* Symbol Error */
|
||||||
#define E1000_RXD_SPC_VLAN_MASK 0x0FFF /* VLAN ID is in lower 12 bits */
|
#define E1000_RXD_SPC_VLAN_MASK 0x0FFF /* VLAN ID is in lower 12 bits */
|
||||||
|
|
||||||
|
#define E1000_RXDEXT_STATERR_LB 0x00040000
|
||||||
#define E1000_RXDEXT_STATERR_CE 0x01000000
|
#define E1000_RXDEXT_STATERR_CE 0x01000000
|
||||||
#define E1000_RXDEXT_STATERR_SE 0x02000000
|
#define E1000_RXDEXT_STATERR_SE 0x02000000
|
||||||
#define E1000_RXDEXT_STATERR_SEQ 0x04000000
|
#define E1000_RXDEXT_STATERR_SEQ 0x04000000
|
||||||
|
@ -295,7 +295,7 @@ struct igbvf_info {
|
|||||||
|
|
||||||
/* hardware capability, feature, and workaround flags */
|
/* hardware capability, feature, and workaround flags */
|
||||||
#define IGBVF_FLAG_RX_CSUM_DISABLED (1 << 0)
|
#define IGBVF_FLAG_RX_CSUM_DISABLED (1 << 0)
|
||||||
|
#define IGBVF_FLAG_RX_LB_VLAN_BSWAP (1 << 1)
|
||||||
#define IGBVF_RX_DESC_ADV(R, i) \
|
#define IGBVF_RX_DESC_ADV(R, i) \
|
||||||
(&((((R).desc))[i].rx_desc))
|
(&((((R).desc))[i].rx_desc))
|
||||||
#define IGBVF_TX_DESC_ADV(R, i) \
|
#define IGBVF_TX_DESC_ADV(R, i) \
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
|
|
||||||
#include "igbvf.h"
|
#include "igbvf.h"
|
||||||
|
|
||||||
#define DRV_VERSION "2.0.1-k"
|
#define DRV_VERSION "2.0.2-k"
|
||||||
char igbvf_driver_name[] = "igbvf";
|
char igbvf_driver_name[] = "igbvf";
|
||||||
const char igbvf_driver_version[] = DRV_VERSION;
|
const char igbvf_driver_version[] = DRV_VERSION;
|
||||||
static const char igbvf_driver_string[] =
|
static const char igbvf_driver_string[] =
|
||||||
@ -107,12 +107,19 @@ static void igbvf_receive_skb(struct igbvf_adapter *adapter,
|
|||||||
struct sk_buff *skb,
|
struct sk_buff *skb,
|
||||||
u32 status, u16 vlan)
|
u32 status, u16 vlan)
|
||||||
{
|
{
|
||||||
|
u16 vid;
|
||||||
|
|
||||||
if (status & E1000_RXD_STAT_VP) {
|
if (status & E1000_RXD_STAT_VP) {
|
||||||
u16 vid = le16_to_cpu(vlan) & E1000_RXD_SPC_VLAN_MASK;
|
if ((adapter->flags & IGBVF_FLAG_RX_LB_VLAN_BSWAP) &&
|
||||||
|
(status & E1000_RXDEXT_STATERR_LB))
|
||||||
|
vid = be16_to_cpu(vlan) & E1000_RXD_SPC_VLAN_MASK;
|
||||||
|
else
|
||||||
|
vid = le16_to_cpu(vlan) & E1000_RXD_SPC_VLAN_MASK;
|
||||||
if (test_bit(vid, adapter->active_vlans))
|
if (test_bit(vid, adapter->active_vlans))
|
||||||
__vlan_hwaccel_put_tag(skb, vid);
|
__vlan_hwaccel_put_tag(skb, vid);
|
||||||
}
|
}
|
||||||
netif_receive_skb(skb);
|
|
||||||
|
napi_gro_receive(&adapter->rx_ring->napi, skb);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void igbvf_rx_checksum_adv(struct igbvf_adapter *adapter,
|
static inline void igbvf_rx_checksum_adv(struct igbvf_adapter *adapter,
|
||||||
@ -2767,6 +2774,10 @@ static int __devinit igbvf_probe(struct pci_dev *pdev,
|
|||||||
/* reset the hardware with the new settings */
|
/* reset the hardware with the new settings */
|
||||||
igbvf_reset(adapter);
|
igbvf_reset(adapter);
|
||||||
|
|
||||||
|
/* set hardware-specific flags */
|
||||||
|
if (adapter->hw.mac.type == e1000_vfadapt_i350)
|
||||||
|
adapter->flags |= IGBVF_FLAG_RX_LB_VLAN_BSWAP;
|
||||||
|
|
||||||
strcpy(netdev->name, "eth%d");
|
strcpy(netdev->name, "eth%d");
|
||||||
err = register_netdev(netdev);
|
err = register_netdev(netdev);
|
||||||
if (err)
|
if (err)
|
||||||
|
@ -483,6 +483,7 @@ struct ixgbe_adapter {
|
|||||||
#define IXGBE_FLAG2_RSS_FIELD_IPV6_UDP (u32)(1 << 9)
|
#define IXGBE_FLAG2_RSS_FIELD_IPV6_UDP (u32)(1 << 9)
|
||||||
#define IXGBE_FLAG2_PTP_ENABLED (u32)(1 << 10)
|
#define IXGBE_FLAG2_PTP_ENABLED (u32)(1 << 10)
|
||||||
#define IXGBE_FLAG2_PTP_PPS_ENABLED (u32)(1 << 11)
|
#define IXGBE_FLAG2_PTP_PPS_ENABLED (u32)(1 << 11)
|
||||||
|
#define IXGBE_FLAG2_BRIDGE_MODE_VEB (u32)(1 << 12)
|
||||||
|
|
||||||
/* Tx fast path data */
|
/* Tx fast path data */
|
||||||
int num_tx_queues;
|
int num_tx_queues;
|
||||||
|
@ -63,11 +63,7 @@ char ixgbe_default_device_descr[] =
|
|||||||
static char ixgbe_default_device_descr[] =
|
static char ixgbe_default_device_descr[] =
|
||||||
"Intel(R) 10 Gigabit Network Connection";
|
"Intel(R) 10 Gigabit Network Connection";
|
||||||
#endif
|
#endif
|
||||||
#define MAJ 3
|
#define DRV_VERSION "3.11.33-k"
|
||||||
#define MIN 9
|
|
||||||
#define BUILD 15
|
|
||||||
#define DRV_VERSION __stringify(MAJ) "." __stringify(MIN) "." \
|
|
||||||
__stringify(BUILD) "-k"
|
|
||||||
const char ixgbe_driver_version[] = DRV_VERSION;
|
const char ixgbe_driver_version[] = DRV_VERSION;
|
||||||
static const char ixgbe_copyright[] =
|
static const char ixgbe_copyright[] =
|
||||||
"Copyright (c) 1999-2012 Intel Corporation.";
|
"Copyright (c) 1999-2012 Intel Corporation.";
|
||||||
@ -703,6 +699,7 @@ static void ixgbe_update_xoff_received(struct ixgbe_adapter *adapter)
|
|||||||
struct ixgbe_hw *hw = &adapter->hw;
|
struct ixgbe_hw *hw = &adapter->hw;
|
||||||
struct ixgbe_hw_stats *hwstats = &adapter->stats;
|
struct ixgbe_hw_stats *hwstats = &adapter->stats;
|
||||||
u32 xoff[8] = {0};
|
u32 xoff[8] = {0};
|
||||||
|
u8 tc;
|
||||||
int i;
|
int i;
|
||||||
bool pfc_en = adapter->dcb_cfg.pfc_mode_enable;
|
bool pfc_en = adapter->dcb_cfg.pfc_mode_enable;
|
||||||
|
|
||||||
@ -716,21 +713,26 @@ static void ixgbe_update_xoff_received(struct ixgbe_adapter *adapter)
|
|||||||
|
|
||||||
/* update stats for each tc, only valid with PFC enabled */
|
/* update stats for each tc, only valid with PFC enabled */
|
||||||
for (i = 0; i < MAX_TX_PACKET_BUFFERS; i++) {
|
for (i = 0; i < MAX_TX_PACKET_BUFFERS; i++) {
|
||||||
|
u32 pxoffrxc;
|
||||||
|
|
||||||
switch (hw->mac.type) {
|
switch (hw->mac.type) {
|
||||||
case ixgbe_mac_82598EB:
|
case ixgbe_mac_82598EB:
|
||||||
xoff[i] = IXGBE_READ_REG(hw, IXGBE_PXOFFRXC(i));
|
pxoffrxc = IXGBE_READ_REG(hw, IXGBE_PXOFFRXC(i));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
xoff[i] = IXGBE_READ_REG(hw, IXGBE_PXOFFRXCNT(i));
|
pxoffrxc = IXGBE_READ_REG(hw, IXGBE_PXOFFRXCNT(i));
|
||||||
}
|
}
|
||||||
hwstats->pxoffrxc[i] += xoff[i];
|
hwstats->pxoffrxc[i] += pxoffrxc;
|
||||||
|
/* Get the TC for given UP */
|
||||||
|
tc = netdev_get_prio_tc_map(adapter->netdev, i);
|
||||||
|
xoff[tc] += pxoffrxc;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* disarm tx queues that have received xoff frames */
|
/* disarm tx queues that have received xoff frames */
|
||||||
for (i = 0; i < adapter->num_tx_queues; i++) {
|
for (i = 0; i < adapter->num_tx_queues; i++) {
|
||||||
struct ixgbe_ring *tx_ring = adapter->tx_ring[i];
|
struct ixgbe_ring *tx_ring = adapter->tx_ring[i];
|
||||||
u8 tc = tx_ring->dcb_tc;
|
|
||||||
|
|
||||||
|
tc = tx_ring->dcb_tc;
|
||||||
if (xoff[tc])
|
if (xoff[tc])
|
||||||
clear_bit(__IXGBE_HANG_CHECK_ARMED, &tx_ring->state);
|
clear_bit(__IXGBE_HANG_CHECK_ARMED, &tx_ring->state);
|
||||||
}
|
}
|
||||||
@ -3170,14 +3172,6 @@ void ixgbe_configure_rx_ring(struct ixgbe_adapter *adapter,
|
|||||||
ixgbe_configure_srrctl(adapter, ring);
|
ixgbe_configure_srrctl(adapter, ring);
|
||||||
ixgbe_configure_rscctl(adapter, ring);
|
ixgbe_configure_rscctl(adapter, ring);
|
||||||
|
|
||||||
/* If operating in IOV mode set RLPML for X540 */
|
|
||||||
if ((adapter->flags & IXGBE_FLAG_SRIOV_ENABLED) &&
|
|
||||||
hw->mac.type == ixgbe_mac_X540) {
|
|
||||||
rxdctl &= ~IXGBE_RXDCTL_RLPMLMASK;
|
|
||||||
rxdctl |= ((ring->netdev->mtu + ETH_HLEN +
|
|
||||||
ETH_FCS_LEN + VLAN_HLEN) | IXGBE_RXDCTL_RLPML_EN);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (hw->mac.type == ixgbe_mac_82598EB) {
|
if (hw->mac.type == ixgbe_mac_82598EB) {
|
||||||
/*
|
/*
|
||||||
* enable cache line friendly hardware writes:
|
* enable cache line friendly hardware writes:
|
||||||
@ -3249,6 +3243,8 @@ static void ixgbe_configure_virtualization(struct ixgbe_adapter *adapter)
|
|||||||
IXGBE_WRITE_REG(hw, IXGBE_VFRE(reg_offset ^ 1), reg_offset - 1);
|
IXGBE_WRITE_REG(hw, IXGBE_VFRE(reg_offset ^ 1), reg_offset - 1);
|
||||||
IXGBE_WRITE_REG(hw, IXGBE_VFTE(reg_offset), (~0) << vf_shift);
|
IXGBE_WRITE_REG(hw, IXGBE_VFTE(reg_offset), (~0) << vf_shift);
|
||||||
IXGBE_WRITE_REG(hw, IXGBE_VFTE(reg_offset ^ 1), reg_offset - 1);
|
IXGBE_WRITE_REG(hw, IXGBE_VFTE(reg_offset ^ 1), reg_offset - 1);
|
||||||
|
if (adapter->flags2 & IXGBE_FLAG2_BRIDGE_MODE_VEB)
|
||||||
|
IXGBE_WRITE_REG(hw, IXGBE_PFDTXGSWC, IXGBE_PFDTXGSWC_VT_LBEN);
|
||||||
|
|
||||||
/* Map PF MAC address in RAR Entry 0 to first pool following VFs */
|
/* Map PF MAC address in RAR Entry 0 to first pool following VFs */
|
||||||
hw->mac.ops.set_vmdq(hw, 0, VMDQ_P(0));
|
hw->mac.ops.set_vmdq(hw, 0, VMDQ_P(0));
|
||||||
@ -7041,11 +7037,13 @@ static int ixgbe_ndo_bridge_setlink(struct net_device *dev,
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
mode = nla_get_u16(attr);
|
mode = nla_get_u16(attr);
|
||||||
if (mode == BRIDGE_MODE_VEPA)
|
if (mode == BRIDGE_MODE_VEPA) {
|
||||||
reg = 0;
|
reg = 0;
|
||||||
else if (mode == BRIDGE_MODE_VEB)
|
adapter->flags2 &= ~IXGBE_FLAG2_BRIDGE_MODE_VEB;
|
||||||
|
} else if (mode == BRIDGE_MODE_VEB) {
|
||||||
reg = IXGBE_PFDTXGSWC_VT_LBEN;
|
reg = IXGBE_PFDTXGSWC_VT_LBEN;
|
||||||
else
|
adapter->flags2 |= IXGBE_FLAG2_BRIDGE_MODE_VEB;
|
||||||
|
} else
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
IXGBE_WRITE_REG(&adapter->hw, IXGBE_PFDTXGSWC, reg);
|
IXGBE_WRITE_REG(&adapter->hw, IXGBE_PFDTXGSWC, reg);
|
||||||
@ -7066,7 +7064,7 @@ static int ixgbe_ndo_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq,
|
|||||||
if (!(adapter->flags & IXGBE_FLAG_SRIOV_ENABLED))
|
if (!(adapter->flags & IXGBE_FLAG_SRIOV_ENABLED))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (IXGBE_READ_REG(&adapter->hw, IXGBE_PFDTXGSWC) & 1)
|
if (adapter->flags2 & IXGBE_FLAG2_BRIDGE_MODE_VEB)
|
||||||
mode = BRIDGE_MODE_VEB;
|
mode = BRIDGE_MODE_VEB;
|
||||||
else
|
else
|
||||||
mode = BRIDGE_MODE_VEPA;
|
mode = BRIDGE_MODE_VEPA;
|
||||||
|
@ -119,6 +119,7 @@ void ixgbe_enable_sriov(struct ixgbe_adapter *adapter,
|
|||||||
|
|
||||||
/* Initialize default switching mode VEB */
|
/* Initialize default switching mode VEB */
|
||||||
IXGBE_WRITE_REG(hw, IXGBE_PFDTXGSWC, IXGBE_PFDTXGSWC_VT_LBEN);
|
IXGBE_WRITE_REG(hw, IXGBE_PFDTXGSWC, IXGBE_PFDTXGSWC_VT_LBEN);
|
||||||
|
adapter->flags2 |= IXGBE_FLAG2_BRIDGE_MODE_VEB;
|
||||||
|
|
||||||
/* If call to enable VFs succeeded then allocate memory
|
/* If call to enable VFs succeeded then allocate memory
|
||||||
* for per VF control structures.
|
* for per VF control structures.
|
||||||
|
Loading…
Reference in New Issue
Block a user