* [PATCH 0/3] last myri10ge updates for 2.6.21
@ 2007-04-10 19:20 Brice Goglin
2007-04-10 19:21 ` [PATCH 1/3] myri10ge: fix management of the firmware 4KB boundary crossing restriction Brice Goglin
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Brice Goglin @ 2007-04-10 19:20 UTC (permalink / raw)
To: Jeff Garzik; +Cc: netdev
Hi Jeff,
In case it is not too late for 2.6.21, here are 3 minor fixes for myri10ge:
1. fix management of the firmware 4KB boundary crossing restriction
2. more Intel chipsets providing aligned PCIe completions
3. update driver version to 1.3.0-1.233
Thanks,
Brice
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH 1/3] myri10ge: fix management of the firmware 4KB boundary crossing restriction
2007-04-10 19:20 [PATCH 0/3] last myri10ge updates for 2.6.21 Brice Goglin
@ 2007-04-10 19:21 ` Brice Goglin
2007-04-11 15:55 ` Jeff Garzik
2007-04-10 19:21 ` [PATCH 2/3] myri10ge: more Intel chipsets providing aligned PCIe completions Brice Goglin
2007-04-10 19:22 ` [PATCH 3/3] myri10ge: update driver version to 1.3.0-1.233 Brice Goglin
2 siblings, 1 reply; 7+ messages in thread
From: Brice Goglin @ 2007-04-10 19:21 UTC (permalink / raw)
To: Jeff Garzik; +Cc: netdev
Simpler way of dealing with the firmware 4KB boundary crossing
restriction for rx buffers. This fixes a variety of memory
corruption issues when using an "uncommon" MTU with a 16KB
page size.
Signed-off-by: Brice Goglin <brice@myri.com>
---
drivers/net/myri10ge/myri10ge.c | 19 ++++++++-----------
1 file changed, 8 insertions(+), 11 deletions(-)
Index: linux-rc/drivers/net/myri10ge/myri10ge.c
===================================================================
--- linux-rc.orig/drivers/net/myri10ge/myri10ge.c 2007-04-06 09:05:17.000000000 +0200
+++ linux-rc/drivers/net/myri10ge/myri10ge.c 2007-04-10 21:03:59.000000000 +0200
@@ -900,19 +900,9 @@
/* try to refill entire ring */
while (rx->fill_cnt != (rx->cnt + rx->mask + 1)) {
idx = rx->fill_cnt & rx->mask;
-
- if ((bytes < MYRI10GE_ALLOC_SIZE / 2) &&
- (rx->page_offset + bytes <= MYRI10GE_ALLOC_SIZE)) {
+ if (rx->page_offset + bytes <= MYRI10GE_ALLOC_SIZE) {
/* we can use part of previous page */
get_page(rx->page);
-#if MYRI10GE_ALLOC_SIZE > 4096
- /* Firmware cannot cross 4K boundary.. */
- if ((rx->page_offset >> 12) !=
- ((rx->page_offset + bytes - 1) >> 12)) {
- rx->page_offset =
- (rx->page_offset + bytes) & ~4095;
- }
-#endif
} else {
/* we need a new page */
page =
@@ -941,6 +931,13 @@
/* start next packet on a cacheline boundary */
rx->page_offset += SKB_DATA_ALIGN(bytes);
+
+#if MYRI10GE_ALLOC_SIZE > 4096
+ /* don't cross a 4KB boundary */
+ if ((rx->page_offset >> 12) !=
+ ((rx->page_offset + bytes - 1) >> 12))
+ rx->page_offset = (rx->page_offset + 4096) & ~4095;
+#endif
rx->fill_cnt++;
/* copy 8 descriptors to the firmware at a time */
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH 1/3] myri10ge: fix management of the firmware 4KB boundary crossing restriction
2007-04-10 19:21 ` [PATCH 1/3] myri10ge: fix management of the firmware 4KB boundary crossing restriction Brice Goglin
@ 2007-04-11 15:55 ` Jeff Garzik
0 siblings, 0 replies; 7+ messages in thread
From: Jeff Garzik @ 2007-04-11 15:55 UTC (permalink / raw)
To: Brice Goglin; +Cc: netdev
Brice Goglin wrote:
> Simpler way of dealing with the firmware 4KB boundary crossing
> restriction for rx buffers. This fixes a variety of memory
> corruption issues when using an "uncommon" MTU with a 16KB
> page size.
>
> Signed-off-by: Brice Goglin <brice@myri.com>
> ---
> drivers/net/myri10ge/myri10ge.c | 19 ++++++++-----------
> 1 file changed, 8 insertions(+), 11 deletions(-)
>
> Index: linux-rc/drivers/net/myri10ge/myri10ge.c
> ===================================================================
> --- linux-rc.orig/drivers/net/myri10ge/myri10ge.c 2007-04-06 09:05:17.000000000 +0200
> +++ linux-rc/drivers/net/myri10ge/myri10ge.c 2007-04-10 21:03:59.000000000 +0200
> @@ -900,19 +900,9 @@
> /* try to refill entire ring */
> while (rx->fill_cnt != (rx->cnt + rx->mask + 1)) {
> idx = rx->fill_cnt & rx->mask;
> -
> - if ((bytes < MYRI10GE_ALLOC_SIZE / 2) &&
> - (rx->page_offset + bytes <= MYRI10GE_ALLOC_SIZE)) {
> + if (rx->page_offset + bytes <= MYRI10GE_ALLOC_SIZE) {
> /* we can use part of previous page */
> get_page(rx->page);
> -#if MYRI10GE_ALLOC_SIZE > 4096
> - /* Firmware cannot cross 4K boundary.. */
> - if ((rx->page_offset >> 12) !=
> - ((rx->page_offset + bytes - 1) >> 12)) {
> - rx->page_offset =
> - (rx->page_offset + bytes) & ~4095;
> - }
> -#endif
> } else {
> /* we need a new page */
> page =
> @@ -941,6 +931,13 @@
>
> /* start next packet on a cacheline boundary */
> rx->page_offset += SKB_DATA_ALIGN(bytes);
> +
> +#if MYRI10GE_ALLOC_SIZE > 4096
> + /* don't cross a 4KB boundary */
> + if ((rx->page_offset >> 12) !=
> + ((rx->page_offset + bytes - 1) >> 12))
> + rx->page_offset = (rx->page_offset + 4096) & ~4095;
> +#endif
> rx->fill_cnt++;
>
> /* copy 8 descriptors to the firmware at a time */
>
applied 1-3
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/3] myri10ge: more Intel chipsets providing aligned PCIe completions
2007-04-10 19:20 [PATCH 0/3] last myri10ge updates for 2.6.21 Brice Goglin
2007-04-10 19:21 ` [PATCH 1/3] myri10ge: fix management of the firmware 4KB boundary crossing restriction Brice Goglin
@ 2007-04-10 19:21 ` Brice Goglin
2007-04-11 15:54 ` Jeff Garzik
2007-04-10 19:22 ` [PATCH 3/3] myri10ge: update driver version to 1.3.0-1.233 Brice Goglin
2 siblings, 1 reply; 7+ messages in thread
From: Brice Goglin @ 2007-04-10 19:21 UTC (permalink / raw)
To: Jeff Garzik; +Cc: netdev
Add the Intel 5000 southbridge (aka Intel 6310/6311/6321ESB) PCIe ports
and the Intel E30x0 chipsets to the whitelist of aligned PCIe completion.
Signed-off-by: Brice Goglin <brice@myri.com>
---
drivers/net/myri10ge/myri10ge.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
Index: linux-rc/drivers/net/myri10ge/myri10ge.c
===================================================================
--- linux-rc.orig/drivers/net/myri10ge/myri10ge.c 2007-04-10 21:03:59.000000000 +0200
+++ linux-rc/drivers/net/myri10ge/myri10ge.c 2007-04-10 21:04:35.000000000 +0200
@@ -2487,6 +2487,10 @@
#define PCI_DEVICE_ID_INTEL_E5000_PCIE23 0x25f7
#define PCI_DEVICE_ID_INTEL_E5000_PCIE47 0x25fa
+#define PCI_DEVICE_ID_INTEL_6300ESB_PCIEE1 0x3510
+#define PCI_DEVICE_ID_INTEL_6300ESB_PCIEE4 0x351b
+#define PCI_DEVICE_ID_INTEL_E3000_PCIE 0x2779
+#define PCI_DEVICE_ID_INTEL_E3010_PCIE 0x277a
#define PCI_DEVICE_ID_SERVERWORKS_HT2100_PCIE_FIRST 0x140
#define PCI_DEVICE_ID_SERVERWORKS_HT2100_PCIE_LAST 0x142
@@ -2526,6 +2530,18 @@
PCI_DEVICE_ID_SERVERWORKS_HT2100_PCIE_FIRST
&& bridge->device <=
PCI_DEVICE_ID_SERVERWORKS_HT2100_PCIE_LAST)
+ /* All Intel E3000/E3010 PCIE ports */
+ || (bridge->vendor == PCI_VENDOR_ID_INTEL
+ && (bridge->device ==
+ PCI_DEVICE_ID_INTEL_E3000_PCIE
+ || bridge->device ==
+ PCI_DEVICE_ID_INTEL_E3010_PCIE))
+ /* All Intel 6310/6311/6321ESB PCIE ports */
+ || (bridge->vendor == PCI_VENDOR_ID_INTEL
+ && bridge->device >=
+ PCI_DEVICE_ID_INTEL_6300ESB_PCIEE1
+ && bridge->device <=
+ PCI_DEVICE_ID_INTEL_6300ESB_PCIEE4)
/* All Intel E5000 PCIE ports */
|| (bridge->vendor == PCI_VENDOR_ID_INTEL
&& bridge->device >=
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/3] myri10ge: more Intel chipsets providing aligned PCIe completions
2007-04-10 19:21 ` [PATCH 2/3] myri10ge: more Intel chipsets providing aligned PCIe completions Brice Goglin
@ 2007-04-11 15:54 ` Jeff Garzik
2007-04-11 18:39 ` Brice Goglin
0 siblings, 1 reply; 7+ messages in thread
From: Jeff Garzik @ 2007-04-11 15:54 UTC (permalink / raw)
To: Brice Goglin; +Cc: netdev
Brice Goglin wrote:
> Add the Intel 5000 southbridge (aka Intel 6310/6311/6321ESB) PCIe ports
> and the Intel E30x0 chipsets to the whitelist of aligned PCIe completion.
>
> Signed-off-by: Brice Goglin <brice@myri.com>
> ---
> drivers/net/myri10ge/myri10ge.c | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
>
> Index: linux-rc/drivers/net/myri10ge/myri10ge.c
> ===================================================================
> --- linux-rc.orig/drivers/net/myri10ge/myri10ge.c 2007-04-10 21:03:59.000000000 +0200
> +++ linux-rc/drivers/net/myri10ge/myri10ge.c 2007-04-10 21:04:35.000000000 +0200
> @@ -2487,6 +2487,10 @@
>
> #define PCI_DEVICE_ID_INTEL_E5000_PCIE23 0x25f7
> #define PCI_DEVICE_ID_INTEL_E5000_PCIE47 0x25fa
> +#define PCI_DEVICE_ID_INTEL_6300ESB_PCIEE1 0x3510
> +#define PCI_DEVICE_ID_INTEL_6300ESB_PCIEE4 0x351b
> +#define PCI_DEVICE_ID_INTEL_E3000_PCIE 0x2779
> +#define PCI_DEVICE_ID_INTEL_E3010_PCIE 0x277a
> #define PCI_DEVICE_ID_SERVERWORKS_HT2100_PCIE_FIRST 0x140
> #define PCI_DEVICE_ID_SERVERWORKS_HT2100_PCIE_LAST 0x142
>
> @@ -2526,6 +2530,18 @@
> PCI_DEVICE_ID_SERVERWORKS_HT2100_PCIE_FIRST
> && bridge->device <=
> PCI_DEVICE_ID_SERVERWORKS_HT2100_PCIE_LAST)
> + /* All Intel E3000/E3010 PCIE ports */
> + || (bridge->vendor == PCI_VENDOR_ID_INTEL
> + && (bridge->device ==
> + PCI_DEVICE_ID_INTEL_E3000_PCIE
> + || bridge->device ==
> + PCI_DEVICE_ID_INTEL_E3010_PCIE))
> + /* All Intel 6310/6311/6321ESB PCIE ports */
> + || (bridge->vendor == PCI_VENDOR_ID_INTEL
> + && bridge->device >=
> + PCI_DEVICE_ID_INTEL_6300ESB_PCIEE1
> + && bridge->device <=
> + PCI_DEVICE_ID_INTEL_6300ESB_PCIEE4)
> /* All Intel E5000 PCIE ports */
> || (bridge->vendor == PCI_VENDOR_ID_INTEL
> && bridge->device >=
though I'm applying this, long term this should probably move out of
myri driver
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/3] myri10ge: more Intel chipsets providing aligned PCIe completions
2007-04-11 15:54 ` Jeff Garzik
@ 2007-04-11 18:39 ` Brice Goglin
0 siblings, 0 replies; 7+ messages in thread
From: Brice Goglin @ 2007-04-11 18:39 UTC (permalink / raw)
To: Jeff Garzik; +Cc: netdev
Jeff Garzik wrote:
>> @@ -2526,6 +2530,18 @@
>> PCI_DEVICE_ID_SERVERWORKS_HT2100_PCIE_FIRST
>> && bridge->device <=
>> PCI_DEVICE_ID_SERVERWORKS_HT2100_PCIE_LAST)
>> + /* All Intel E3000/E3010 PCIE ports */
>> + || (bridge->vendor == PCI_VENDOR_ID_INTEL
>> + && (bridge->device ==
>> + PCI_DEVICE_ID_INTEL_E3000_PCIE
>> + || bridge->device ==
>> + PCI_DEVICE_ID_INTEL_E3010_PCIE))
>> + /* All Intel 6310/6311/6321ESB PCIE ports */
>> + || (bridge->vendor == PCI_VENDOR_ID_INTEL
>> + && bridge->device >=
>> + PCI_DEVICE_ID_INTEL_6300ESB_PCIEE1
>> + && bridge->device <=
>> + PCI_DEVICE_ID_INTEL_6300ESB_PCIEE4)
>> /* All Intel E5000 PCIE ports */
>> || (bridge->vendor == PCI_VENDOR_ID_INTEL
>> && bridge->device >=
>
> though I'm applying this, long term this should probably move out of
> myri driver
Right, we are worried about this already-too-long list. Even if we could
imagine having some dedicated functions/quirks or whatever to do this in
the PCI core, we are not sure somebody else will ever use this feature.
For now, we are exploring better ways to decide which firmware to use,
and we currently hope to remove the whitelist entirely in the near future.
Brice
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 3/3] myri10ge: update driver version to 1.3.0-1.233
2007-04-10 19:20 [PATCH 0/3] last myri10ge updates for 2.6.21 Brice Goglin
2007-04-10 19:21 ` [PATCH 1/3] myri10ge: fix management of the firmware 4KB boundary crossing restriction Brice Goglin
2007-04-10 19:21 ` [PATCH 2/3] myri10ge: more Intel chipsets providing aligned PCIe completions Brice Goglin
@ 2007-04-10 19:22 ` Brice Goglin
2 siblings, 0 replies; 7+ messages in thread
From: Brice Goglin @ 2007-04-10 19:22 UTC (permalink / raw)
To: Jeff Garzik; +Cc: netdev
Update the myri10ge driver version number to 1.3.0-1.233.
Signed-off-by: Brice Goglin <brice@myri.com>
---
drivers/net/myri10ge/myri10ge.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-rc/drivers/net/myri10ge/myri10ge.c
===================================================================
--- linux-rc.orig/drivers/net/myri10ge/myri10ge.c 2007-04-10 21:11:08.000000000 +0200
+++ linux-rc/drivers/net/myri10ge/myri10ge.c 2007-04-10 21:11:11.000000000 +0200
@@ -71,7 +71,7 @@
#include "myri10ge_mcp.h"
#include "myri10ge_mcp_gen_header.h"
-#define MYRI10GE_VERSION_STR "1.3.0-1.227"
+#define MYRI10GE_VERSION_STR "1.3.0-1.233"
MODULE_DESCRIPTION("Myricom 10G driver (10GbE)");
MODULE_AUTHOR("Maintainer: help@myri.com");
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-04-11 18:40 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-10 19:20 [PATCH 0/3] last myri10ge updates for 2.6.21 Brice Goglin
2007-04-10 19:21 ` [PATCH 1/3] myri10ge: fix management of the firmware 4KB boundary crossing restriction Brice Goglin
2007-04-11 15:55 ` Jeff Garzik
2007-04-10 19:21 ` [PATCH 2/3] myri10ge: more Intel chipsets providing aligned PCIe completions Brice Goglin
2007-04-11 15:54 ` Jeff Garzik
2007-04-11 18:39 ` Brice Goglin
2007-04-10 19:22 ` [PATCH 3/3] myri10ge: update driver version to 1.3.0-1.233 Brice Goglin
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).