Merge branch 'mlx5-fixes'
Saeed Mahameed says: ==================== Mellanox 100G mlx5 fixes 2016-09-07 The following series contains bug fixes for the mlx5e driver. from Gal, - Static code checker cleanup (casting overflow) - Fix global PFC counter statistics reading - Fix HW LRO when vlan stripping is off From Bodong, - Deprecate old autoneg capability bit and use new one. From Tariq, - Fix xmit more counter race condition ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
81d1a366ff
|
@ -331,7 +331,7 @@ static void mlx5e_get_ethtool_stats(struct net_device *dev,
|
||||||
if (mlx5e_query_global_pause_combined(priv)) {
|
if (mlx5e_query_global_pause_combined(priv)) {
|
||||||
for (i = 0; i < NUM_PPORT_PER_PRIO_PFC_COUNTERS; i++) {
|
for (i = 0; i < NUM_PPORT_PER_PRIO_PFC_COUNTERS; i++) {
|
||||||
data[idx++] = MLX5E_READ_CTR64_BE(&priv->stats.pport.per_prio_counters[0],
|
data[idx++] = MLX5E_READ_CTR64_BE(&priv->stats.pport.per_prio_counters[0],
|
||||||
pport_per_prio_pfc_stats_desc, 0);
|
pport_per_prio_pfc_stats_desc, i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -659,9 +659,10 @@ static int mlx5e_set_coalesce(struct net_device *netdev,
|
||||||
static void ptys2ethtool_supported_link(unsigned long *supported_modes,
|
static void ptys2ethtool_supported_link(unsigned long *supported_modes,
|
||||||
u32 eth_proto_cap)
|
u32 eth_proto_cap)
|
||||||
{
|
{
|
||||||
|
unsigned long proto_cap = eth_proto_cap;
|
||||||
int proto;
|
int proto;
|
||||||
|
|
||||||
for_each_set_bit(proto, (unsigned long *)ð_proto_cap, MLX5E_LINK_MODES_NUMBER)
|
for_each_set_bit(proto, &proto_cap, MLX5E_LINK_MODES_NUMBER)
|
||||||
bitmap_or(supported_modes, supported_modes,
|
bitmap_or(supported_modes, supported_modes,
|
||||||
ptys2ethtool_table[proto].supported,
|
ptys2ethtool_table[proto].supported,
|
||||||
__ETHTOOL_LINK_MODE_MASK_NBITS);
|
__ETHTOOL_LINK_MODE_MASK_NBITS);
|
||||||
|
@ -670,9 +671,10 @@ static void ptys2ethtool_supported_link(unsigned long *supported_modes,
|
||||||
static void ptys2ethtool_adver_link(unsigned long *advertising_modes,
|
static void ptys2ethtool_adver_link(unsigned long *advertising_modes,
|
||||||
u32 eth_proto_cap)
|
u32 eth_proto_cap)
|
||||||
{
|
{
|
||||||
|
unsigned long proto_cap = eth_proto_cap;
|
||||||
int proto;
|
int proto;
|
||||||
|
|
||||||
for_each_set_bit(proto, (unsigned long *)ð_proto_cap, MLX5E_LINK_MODES_NUMBER)
|
for_each_set_bit(proto, &proto_cap, MLX5E_LINK_MODES_NUMBER)
|
||||||
bitmap_or(advertising_modes, advertising_modes,
|
bitmap_or(advertising_modes, advertising_modes,
|
||||||
ptys2ethtool_table[proto].advertised,
|
ptys2ethtool_table[proto].advertised,
|
||||||
__ETHTOOL_LINK_MODE_MASK_NBITS);
|
__ETHTOOL_LINK_MODE_MASK_NBITS);
|
||||||
|
|
|
@ -637,24 +637,32 @@ bool mlx5e_post_rx_wqes(struct mlx5e_rq *rq)
|
||||||
static void mlx5e_lro_update_hdr(struct sk_buff *skb, struct mlx5_cqe64 *cqe,
|
static void mlx5e_lro_update_hdr(struct sk_buff *skb, struct mlx5_cqe64 *cqe,
|
||||||
u32 cqe_bcnt)
|
u32 cqe_bcnt)
|
||||||
{
|
{
|
||||||
struct ethhdr *eth = (struct ethhdr *)(skb->data);
|
struct ethhdr *eth = (struct ethhdr *)(skb->data);
|
||||||
struct iphdr *ipv4 = (struct iphdr *)(skb->data + ETH_HLEN);
|
struct iphdr *ipv4;
|
||||||
struct ipv6hdr *ipv6 = (struct ipv6hdr *)(skb->data + ETH_HLEN);
|
struct ipv6hdr *ipv6;
|
||||||
struct tcphdr *tcp;
|
struct tcphdr *tcp;
|
||||||
|
int network_depth = 0;
|
||||||
|
__be16 proto;
|
||||||
|
u16 tot_len;
|
||||||
|
|
||||||
u8 l4_hdr_type = get_cqe_l4_hdr_type(cqe);
|
u8 l4_hdr_type = get_cqe_l4_hdr_type(cqe);
|
||||||
int tcp_ack = ((CQE_L4_HDR_TYPE_TCP_ACK_NO_DATA == l4_hdr_type) ||
|
int tcp_ack = ((CQE_L4_HDR_TYPE_TCP_ACK_NO_DATA == l4_hdr_type) ||
|
||||||
(CQE_L4_HDR_TYPE_TCP_ACK_AND_DATA == l4_hdr_type));
|
(CQE_L4_HDR_TYPE_TCP_ACK_AND_DATA == l4_hdr_type));
|
||||||
|
|
||||||
u16 tot_len = cqe_bcnt - ETH_HLEN;
|
skb->mac_len = ETH_HLEN;
|
||||||
|
proto = __vlan_get_protocol(skb, eth->h_proto, &network_depth);
|
||||||
|
|
||||||
if (eth->h_proto == htons(ETH_P_IP)) {
|
ipv4 = (struct iphdr *)(skb->data + network_depth);
|
||||||
tcp = (struct tcphdr *)(skb->data + ETH_HLEN +
|
ipv6 = (struct ipv6hdr *)(skb->data + network_depth);
|
||||||
|
tot_len = cqe_bcnt - network_depth;
|
||||||
|
|
||||||
|
if (proto == htons(ETH_P_IP)) {
|
||||||
|
tcp = (struct tcphdr *)(skb->data + network_depth +
|
||||||
sizeof(struct iphdr));
|
sizeof(struct iphdr));
|
||||||
ipv6 = NULL;
|
ipv6 = NULL;
|
||||||
skb_shinfo(skb)->gso_type = SKB_GSO_TCPV4;
|
skb_shinfo(skb)->gso_type = SKB_GSO_TCPV4;
|
||||||
} else {
|
} else {
|
||||||
tcp = (struct tcphdr *)(skb->data + ETH_HLEN +
|
tcp = (struct tcphdr *)(skb->data + network_depth +
|
||||||
sizeof(struct ipv6hdr));
|
sizeof(struct ipv6hdr));
|
||||||
ipv4 = NULL;
|
ipv4 = NULL;
|
||||||
skb_shinfo(skb)->gso_type = SKB_GSO_TCPV6;
|
skb_shinfo(skb)->gso_type = SKB_GSO_TCPV6;
|
||||||
|
|
|
@ -356,6 +356,7 @@ static netdev_tx_t mlx5e_sq_xmit(struct mlx5e_sq *sq, struct sk_buff *skb)
|
||||||
sq->stats.stopped++;
|
sq->stats.stopped++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sq->stats.xmit_more += skb->xmit_more;
|
||||||
if (!skb->xmit_more || netif_xmit_stopped(sq->txq)) {
|
if (!skb->xmit_more || netif_xmit_stopped(sq->txq)) {
|
||||||
int bf_sz = 0;
|
int bf_sz = 0;
|
||||||
|
|
||||||
|
@ -375,7 +376,6 @@ static netdev_tx_t mlx5e_sq_xmit(struct mlx5e_sq *sq, struct sk_buff *skb)
|
||||||
|
|
||||||
sq->stats.packets++;
|
sq->stats.packets++;
|
||||||
sq->stats.bytes += num_bytes;
|
sq->stats.bytes += num_bytes;
|
||||||
sq->stats.xmit_more += skb->xmit_more;
|
|
||||||
return NETDEV_TX_OK;
|
return NETDEV_TX_OK;
|
||||||
|
|
||||||
dma_unmap_wqe_err:
|
dma_unmap_wqe_err:
|
||||||
|
|
|
@ -6710,9 +6710,10 @@ struct mlx5_ifc_pude_reg_bits {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct mlx5_ifc_ptys_reg_bits {
|
struct mlx5_ifc_ptys_reg_bits {
|
||||||
u8 an_disable_cap[0x1];
|
u8 reserved_at_0[0x1];
|
||||||
u8 an_disable_admin[0x1];
|
u8 an_disable_admin[0x1];
|
||||||
u8 reserved_at_2[0x6];
|
u8 an_disable_cap[0x1];
|
||||||
|
u8 reserved_at_3[0x5];
|
||||||
u8 local_port[0x8];
|
u8 local_port[0x8];
|
||||||
u8 reserved_at_10[0xd];
|
u8 reserved_at_10[0xd];
|
||||||
u8 proto_mask[0x3];
|
u8 proto_mask[0x3];
|
||||||
|
|
Loading…
Reference in New Issue