Skip to contentSkip to conversation

Comments in the titan ethernet driver for IP header alignment

PATCH In review Manish Lachwani 3 participants 3 messages Nov 23, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Comments in the titan ethernet driver for IP header alignment

Hi Ralf,

Attached patch puts comments around the section that programs register 0x103C for IP header alignment. Please review ...

Thanks
Manish Lachwani

net/titan_ge.c renamed from net/titan_ge.c.orig +11 -0
@@ -1000,6 +1000,17 @@
 	 * driver. This performance drawback existed in the previous
 	 * versions of the silicon
 	 */
+	/*
+	 * The register (0x103c) below has been used to program the 
+	 * chip to do the IP header alignment. The idea was to fix the
+	 * IP header alignment by using existing unused registers,
+	 * so that this feature can be implemented quickly. If these 
+	 * registers are not programmed, then the chip will not align the 
+	 * IP headers and an extra copy would have to be implemented
+	 * in the driver on the Rx side. I am not sure if this 
+	 * has been documented.  
+	 *			- Manish Lachwani (11/23/2004)
+	 */
 	reg_data_1 = TITAN_GE_READ(0x103c + (port_num << 12));
 	reg_data_1 |= 0x40000000;
 	TITAN_GE_WRITE((0x103c + (port_num << 12)), reg_data_1);
#1 lore raw

Hi Manish,

register 0x103c is not documented in any but the newest version of the processor's user manual, and the function documented there has _nothing_ to do with header alignment. So either the docs are wrong, or the register implements both the documented and undocumented functions. In this case, however, the code would be wrong because it permanently modifies the register's contents, which could screw up packet priority processing.

Thomas

Quoted 7 lines · Manish Lachwani

Hi Ralf,

Attached patch puts comments around the section that programs register 0x103C for IP header alignment. Please review ...

Thanks
Manish Lachwani

Signature · 9 lines
--------------------------------------------------

Thomas Koeller, Software Development
Basler Vision Technologies

thomas dot koeller at baslerweb dot com
http://www.baslerweb.com

==============================
#2 lore raw

Hi Thomas,

Quoted 5 lines · Thomas Koeller

Hi Manish,

register 0x103c is not documented in any but the newest version of the processor's user manual, and the function documented there has _nothing_ to do with header alignment.

I agree. The document says nothing about IP header alignment. And like I said before, this code has been written based on feedback from the chip designers. I have no idea why there is not document describing this, as yet.

Quoted 5 lines

So either the docs are wrong,
or the register implements both the documented and undocumented functions. In this case, however, the code would be wrong because it permanently modifies the register's contents, which could screw up packet priority processing.

The code implements sequence of operations that are needed for the chip to align IP headers. Thats all. Now, if you think that this can screw up packet priority processing in any way, then you should point PMC about this potential bug. AFAIK, there are other OS's that use this register to fix the IP header alignment issue on the Titan.

Thanks
Manish Lachwani

Quoted 14 lines

Thomas

Quoted 7 lines · Manish Lachwani

Hi Ralf,

Attached patch puts comments around the section that programs register 0x103C for IP header alignment. Please review ...

Thanks
Manish Lachwani