Skip to contentSkip to conversation

be2net: remove netif_stop_queue being called before register_netdev.

PATCH New David Miller 2 participants 4 messages Feb 1, 2011 – Feb 28, 2011 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#2 lore raw
Quoted 8 lines · David Miller

From: Ajit Khaparde <[email protected]>
Date: Mon, 31 Jan 2011 17:27:55 -0600

Quoted 3 lines

It is illegal to call netif_stop_queue before register_netdev.

Applied, thanks.

Not sure if this patch is queued for stable, I hit the bug (a Warning actually) on 2.6.37.1

Thanks !

[   40.592799] be2net 0000:02:00.0: PCI INT A -> GSI 24 (level, low) -> IRQ 24
[   40.592812] be2net 0000:02:00.0: setting latency timer to 64
[   40.735947] be2net 0000:02:00.0: irq 68 for MSI/MSI-X
[   40.735952] be2net 0000:02:00.0: irq 69 for MSI/MSI-X
[   40.735956] be2net 0000:02:00.0: irq 70 for MSI/MSI-X
[   40.735960] be2net 0000:02:00.0: irq 71 for MSI/MSI-X
[   40.735964] be2net 0000:02:00.0: irq 72 for MSI/MSI-X
[   40.735967] be2net 0000:02:00.0: irq 73 for MSI/MSI-X
[   40.956881] ------------[ cut here ]------------
[   40.956892] WARNING: at include/linux/netdevice.h:1557 be_probe+0xb3d/0xb4e [be2net]()
[   40.956895] Hardware name: ProLiant BL460c G7
[   40.956897] Modules linked in: be2net(+) bnx2 bonding ipv6
[   40.956904] Pid: 6226, comm: modprobe Not tainted 2.6.37.1 #5
[   40.956906] Call Trace:
[   40.956914]  [<f8a959ad>] ? be_probe+0xb3d/0xb4e [be2net]
[   40.956921]  [<f8a959ad>] ? be_probe+0xb3d/0xb4e [be2net]
[   40.956930]  [<c023c03c>] warn_slowpath_common+0x7c/0xa0
[   40.956937]  [<f8a959ad>] ? be_probe+0xb3d/0xb4e [be2net]
[   40.956941]  [<c023c07d>] warn_slowpath_null+0x1d/0x20
[   40.956947]  [<f8a959ad>] be_probe+0xb3d/0xb4e [be2net]
[   40.956953]  [<c0329314>] ? sysfs_addrm_finish+0x14/0xa0
[   40.956959]  [<c0206c40>] ? dma_generic_alloc_coherent+0x0/0x150
[   40.956964]  [<c039a6ee>] local_pci_probe+0xe/0x10
[   40.956968]  [<c039a946>] pci_device_probe+0xc6/0xd0
[   40.956975]  [<c0409d62>] driver_probe_device+0xf2/0x170
[   40.956980]  [<c0409fc5>] __driver_attach+0x75/0x80
[   40.956984]  [<c04090a3>] bus_for_each_dev+0x43/0x70
[   40.956988]  [<c0409b69>] driver_attach+0x19/0x20
[   40.956992]  [<c0409f50>] ? __driver_attach+0x0/0x80
[   40.956996]  [<c040993c>] bus_add_driver+0x1bc/0x2b0
[   40.957000]  [<c039a730>] ? pci_device_shutdown+0x0/0x30
[   40.957003]  [<c040a19a>] driver_register+0x5a/0x130
[   40.957007]  [<c039ab80>] __pci_register_driver+0x40/0xa0
[   40.957014]  [<f8a9b069>] be_init_module+0x69/0x6b [be2net]
[   40.957017]  [<c0201133>] do_one_initcall+0x123/0x170
[   40.957024]  [<f8a9b000>] ? be_init_module+0x0/0x6b [be2net]
[   40.957030]  [<c026d2ef>] sys_init_module+0xcf/0x1070
[   40.957035]  [<c0202b4c>] sysenter_do_call+0x12/0x22
[   40.957038] ---[ end trace 7df725351c768e59 ]---
[   40.957040] netif_stop_queue() cannot be called before register_netdev()
#3 lore raw

RFC 1/1 be2net: add rxhash support

Ajit, it seems be2net provides RSS hash value in rx compl descriptor ?

Could we feed skb->rxhash with it ?

Thanks !

drivers/net/benet/be_main.c +7 -0
index 0bdccb1..f2db5b2 100644
@@ -1038,6 +1038,9 @@ static void be_rx_compl_process(struct be_adapter *adapter,
 
 	skb->truesize = skb->len + sizeof(struct sk_buff);
 	skb->protocol = eth_type_trans(skb, adapter->netdev);
+	if (adapter->netdev->features & NETIF_F_RXHASH)
+		skb->rxhash = AMAP_GET_BITS(struct amap_eth_rx_compl, rsshash, rxcp);
+
 
 	vlanf = AMAP_GET_BITS(struct amap_eth_rx_compl, vtp, rxcp);
 	vtm = AMAP_GET_BITS(struct amap_eth_rx_compl, vtm, rxcp);
@@ -1099,6 +1102,9 @@ static void be_rx_compl_process_gro(struct be_adapter *adapter,
 		return;
 	}
 
+	if (adapter->netdev->features & NETIF_F_RXHASH)
+		skb->rxhash = AMAP_GET_BITS(struct amap_eth_rx_compl, rsshash, rxcp);
+
 	remaining = pkt_size;
 	for (i = 0, j = -1; i < num_rcvd; i++) {
 		page_info = get_rx_page_info(adapter, rxo, rxq_idx);
@@ -2618,6 +2624,7 @@ static void be_netdev_init(struct net_device *netdev)
 		NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_FILTER |
 		NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
 		NETIF_F_GRO | NETIF_F_TSO6;
+	netdev->features |= NETIF_F_RXHASH;
 
 	netdev->vlan_features |= NETIF_F_SG | NETIF_F_TSO |
 		NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM;
author maintainer
#4 lore raw
In reply to Eric Dumazet

From: Eric Dumazet <[email protected]>
Date: Thu, 24 Feb 2011 16:15:43 +0100

Quoted 12 lines · David Miller
Quoted 8 lines

From: Ajit Khaparde <[email protected]>
Date: Mon, 31 Jan 2011 17:27:55 -0600

Quoted 3 lines

It is illegal to call netif_stop_queue before register_netdev.

Applied, thanks.

Not sure if this patch is queued for stable, I hit the bug (a Warning actually) on 2.6.37.1

I've added this to my -stable queue, thanks.