* [PATCH net-next] bnx2x: Do interrupt mode initialization and NAPIs adding before register_netdev()
@ 2010-11-24 15:21 Vladislav Zolotarov
2010-11-24 19:10 ` David Miller
2010-11-25 9:52 ` [PATCH net-next] bnx2x: Use skb_is_gso_v6(skb) instead of accessing the skb_shinfo(skb) directly Vladislav Zolotarov
0 siblings, 2 replies; 7+ messages in thread
From: Vladislav Zolotarov @ 2010-11-24 15:21 UTC (permalink / raw)
To: Dave Miller; +Cc: Eilon Greenstein, netdev list, mchan
Move the interrupt mode configuration and NAPIs adding before a
register_netdev() call to prevent netdev->open() from running
before these functions are done.
Advance a driver version number.
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Reported-by: Michael Chan <mchan@broadcom.com>
---
drivers/net/bnx2x/bnx2x.h | 4 ++--
drivers/net/bnx2x/bnx2x_main.c | 12 ++++++------
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/net/bnx2x/bnx2x.h b/drivers/net/bnx2x/bnx2x.h
index 863e73a..342ab58 100644
--- a/drivers/net/bnx2x/bnx2x.h
+++ b/drivers/net/bnx2x/bnx2x.h
@@ -20,8 +20,8 @@
* (you will need to reboot afterwards) */
/* #define BNX2X_STOP_ON_ERROR */
-#define DRV_MODULE_VERSION "1.60.00-4"
-#define DRV_MODULE_RELDATE "2010/11/01"
+#define DRV_MODULE_VERSION "1.60.00-5"
+#define DRV_MODULE_RELDATE "2010/11/24"
#define BNX2X_BC_VER 0x040200
#define BNX2X_MULTI_QUEUE
diff --git a/drivers/net/bnx2x/bnx2x_main.c b/drivers/net/bnx2x/bnx2x_main.c
index 92057d7..f53edfd 100644
--- a/drivers/net/bnx2x/bnx2x_main.c
+++ b/drivers/net/bnx2x/bnx2x_main.c
@@ -9096,12 +9096,6 @@ static int __devinit bnx2x_init_one(struct pci_dev *pdev,
/* calc qm_cid_count */
bp->qm_cid_count = bnx2x_set_qm_cid_count(bp, cid_count);
- rc = register_netdev(dev);
- if (rc) {
- dev_err(&pdev->dev, "Cannot register net device\n");
- goto init_one_exit;
- }
-
/* Configure interupt mode: try to enable MSI-X/MSI if
* needed, set bp->num_queues appropriately.
*/
@@ -9110,6 +9104,12 @@ static int __devinit bnx2x_init_one(struct pci_dev *pdev,
/* Add all NAPI objects */
bnx2x_add_all_napi(bp);
+ rc = register_netdev(dev);
+ if (rc) {
+ dev_err(&pdev->dev, "Cannot register net device\n");
+ goto init_one_exit;
+ }
+
bnx2x_get_pcie_width_speed(bp, &pcie_width, &pcie_speed);
netdev_info(dev, "%s (%c%d) PCI-E x%d %s found at mem %lx,"
--
1.7.0.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH net-next] bnx2x: Do interrupt mode initialization and NAPIs adding before register_netdev()
2010-11-24 15:21 [PATCH net-next] bnx2x: Do interrupt mode initialization and NAPIs adding before register_netdev() Vladislav Zolotarov
@ 2010-11-24 19:10 ` David Miller
2010-11-25 9:52 ` [PATCH net-next] bnx2x: Use skb_is_gso_v6(skb) instead of accessing the skb_shinfo(skb) directly Vladislav Zolotarov
1 sibling, 0 replies; 7+ messages in thread
From: David Miller @ 2010-11-24 19:10 UTC (permalink / raw)
To: vladz; +Cc: eilong, netdev, mchan
From: "Vladislav Zolotarov" <vladz@broadcom.com>
Date: Wed, 24 Nov 2010 17:21:18 +0200
> Move the interrupt mode configuration and NAPIs adding before a
> register_netdev() call to prevent netdev->open() from running
> before these functions are done.
>
> Advance a driver version number.
>
> Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
> Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
> Reported-by: Michael Chan <mchan@broadcom.com>
Also applied, thanks.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH net-next] bnx2x: Use skb_is_gso_v6(skb) instead of accessing the skb_shinfo(skb) directly
2010-11-24 15:21 [PATCH net-next] bnx2x: Do interrupt mode initialization and NAPIs adding before register_netdev() Vladislav Zolotarov
2010-11-24 19:10 ` David Miller
@ 2010-11-25 9:52 ` Vladislav Zolotarov
2010-11-27 9:53 ` Eric Dumazet
1 sibling, 1 reply; 7+ messages in thread
From: Vladislav Zolotarov @ 2010-11-25 9:52 UTC (permalink / raw)
To: Dave Miller; +Cc: Eilon Greenstein, netdev list
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
---
drivers/net/bnx2x/bnx2x_cmn.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/bnx2x/bnx2x_cmn.c b/drivers/net/bnx2x/bnx2x_cmn.c
index 94d5f59..fa8e9ee 100644
--- a/drivers/net/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/bnx2x/bnx2x_cmn.c
@@ -1695,7 +1695,7 @@ static inline u32 bnx2x_xmit_type(struct bnx2x *bp, struct sk_buff *skb)
if (skb_shinfo(skb)->gso_type & SKB_GSO_TCPV4)
rc |= (XMIT_GSO_V4 | XMIT_CSUM_V4 | XMIT_CSUM_TCP);
- else if (skb_shinfo(skb)->gso_type & SKB_GSO_TCPV6)
+ else if (skb_is_gso_v6(skb))
rc |= (XMIT_GSO_V6 | XMIT_CSUM_TCP | XMIT_CSUM_V6);
return rc;
--
1.7.0.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH net-next] bnx2x: Use skb_is_gso_v6(skb) instead of accessing the skb_shinfo(skb) directly
2010-11-25 9:52 ` [PATCH net-next] bnx2x: Use skb_is_gso_v6(skb) instead of accessing the skb_shinfo(skb) directly Vladislav Zolotarov
@ 2010-11-27 9:53 ` Eric Dumazet
2010-11-28 10:22 ` Vladislav Zolotarov
2010-11-28 10:23 ` [PATCH net-next] bnx2x: Use helpers instead of direct access to the shinfo(skb) fields Vladislav Zolotarov
0 siblings, 2 replies; 7+ messages in thread
From: Eric Dumazet @ 2010-11-27 9:53 UTC (permalink / raw)
To: Vladislav Zolotarov; +Cc: Dave Miller, Eilon Greenstein, netdev list
Le jeudi 25 novembre 2010 à 11:52 +0200, Vladislav Zolotarov a écrit :
> Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
> Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
> ---
> drivers/net/bnx2x/bnx2x_cmn.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/bnx2x/bnx2x_cmn.c b/drivers/net/bnx2x/bnx2x_cmn.c
> index 94d5f59..fa8e9ee 100644
> --- a/drivers/net/bnx2x/bnx2x_cmn.c
> +++ b/drivers/net/bnx2x/bnx2x_cmn.c
> @@ -1695,7 +1695,7 @@ static inline u32 bnx2x_xmit_type(struct bnx2x *bp, struct sk_buff *skb)
> if (skb_shinfo(skb)->gso_type & SKB_GSO_TCPV4)
> rc |= (XMIT_GSO_V4 | XMIT_CSUM_V4 | XMIT_CSUM_TCP);
>
> - else if (skb_shinfo(skb)->gso_type & SKB_GSO_TCPV6)
> + else if (skb_is_gso_v6(skb))
> rc |= (XMIT_GSO_V6 | XMIT_CSUM_TCP | XMIT_CSUM_V6);
>
> return rc;
May I ask why ?
This seems not consistent with the previous block.
Either you also add a skb_is_gso_v4(skb) helper, or let the code as is,
maybe reordering the flags ?
diff --git a/drivers/net/bnx2x/bnx2x_cmn.c b/drivers/net/bnx2x/bnx2x_cmn.c
index 94d5f59..514aad6 100644
--- a/drivers/net/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/bnx2x/bnx2x_cmn.c
@@ -1693,10 +1693,9 @@ static inline u32 bnx2x_xmit_type(struct bnx2x *bp, struct sk_buff *skb)
}
if (skb_shinfo(skb)->gso_type & SKB_GSO_TCPV4)
- rc |= (XMIT_GSO_V4 | XMIT_CSUM_V4 | XMIT_CSUM_TCP);
-
+ rc |= XMIT_GSO_V4 | XMIT_CSUM_V4 | XMIT_CSUM_TCP;
else if (skb_shinfo(skb)->gso_type & SKB_GSO_TCPV6)
- rc |= (XMIT_GSO_V6 | XMIT_CSUM_TCP | XMIT_CSUM_V6);
+ rc |= XMIT_GSO_V6 | XMIT_CSUM_V6 | XMIT_CSUM_TCP;
return rc;
}
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH net-next] bnx2x: Use skb_is_gso_v6(skb) instead of accessing the skb_shinfo(skb) directly
2010-11-27 9:53 ` Eric Dumazet
@ 2010-11-28 10:22 ` Vladislav Zolotarov
2010-11-28 10:23 ` [PATCH net-next] bnx2x: Use helpers instead of direct access to the shinfo(skb) fields Vladislav Zolotarov
1 sibling, 0 replies; 7+ messages in thread
From: Vladislav Zolotarov @ 2010-11-28 10:22 UTC (permalink / raw)
To: Eric Dumazet; +Cc: Dave Miller, Eilon Greenstein, netdev list
>
> May I ask why ?
>
> This seems not consistent with the previous block.
>
> Either you also add a skb_is_gso_v4(skb) helper, or let the code as is,
> maybe reordering the flags ?
>
U r right. I'm respinning a patch taking your remarks and a "brackets"
patch into an account.
thanks, Eric.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH net-next] bnx2x: Use helpers instead of direct access to the shinfo(skb) fields
2010-11-27 9:53 ` Eric Dumazet
2010-11-28 10:22 ` Vladislav Zolotarov
@ 2010-11-28 10:23 ` Vladislav Zolotarov
2010-11-28 19:08 ` David Miller
1 sibling, 1 reply; 7+ messages in thread
From: Vladislav Zolotarov @ 2010-11-28 10:23 UTC (permalink / raw)
To: Dave Miller; +Cc: Eilon Greenstein, netdev list
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
---
drivers/net/bnx2x/bnx2x_cmn.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/net/bnx2x/bnx2x_cmn.c b/drivers/net/bnx2x/bnx2x_cmn.c
index 94d5f59..e20b2d3 100644
--- a/drivers/net/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/bnx2x/bnx2x_cmn.c
@@ -1692,11 +1692,10 @@ static inline u32 bnx2x_xmit_type(struct bnx2x *bp, struct sk_buff *skb)
}
}
- if (skb_shinfo(skb)->gso_type & SKB_GSO_TCPV4)
- rc |= (XMIT_GSO_V4 | XMIT_CSUM_V4 | XMIT_CSUM_TCP);
-
- else if (skb_shinfo(skb)->gso_type & SKB_GSO_TCPV6)
- rc |= (XMIT_GSO_V6 | XMIT_CSUM_TCP | XMIT_CSUM_V6);
+ if (skb_is_gso_v6(skb))
+ rc |= XMIT_GSO_V6 | XMIT_CSUM_TCP | XMIT_CSUM_V6;
+ else if (skb_is_gso(skb))
+ rc |= XMIT_GSO_V4 | XMIT_CSUM_V4 | XMIT_CSUM_TCP;
return rc;
}
--
1.7.0.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-11-28 19:08 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-24 15:21 [PATCH net-next] bnx2x: Do interrupt mode initialization and NAPIs adding before register_netdev() Vladislav Zolotarov
2010-11-24 19:10 ` David Miller
2010-11-25 9:52 ` [PATCH net-next] bnx2x: Use skb_is_gso_v6(skb) instead of accessing the skb_shinfo(skb) directly Vladislav Zolotarov
2010-11-27 9:53 ` Eric Dumazet
2010-11-28 10:22 ` Vladislav Zolotarov
2010-11-28 10:23 ` [PATCH net-next] bnx2x: Use helpers instead of direct access to the shinfo(skb) fields Vladislav Zolotarov
2010-11-28 19:08 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).