Skip to contentSkip to conversation

: Increase buffer headroom to support gianfar

PATCH In review Allan Stephens 2 participants 2 messages May 9, 2008

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

PATCH 1/1 : Increase buffer headroom to support gianfar

This patch increases the headroom TIPC reserves in each sk_buff to 24 bytes, due to the 8 byte FCB used by gianfar.

---
 net/tipc/core.h |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)
net/tipc/core.h +11 -5
index 325404f..cc6eca1 100644
@@ -280,14 +280,20 @@ static inline void k_term_timer(struct timer_list *timer)
  * TIPC message buffer code
  *
  * TIPC message buffer headroom reserves space for a link-level header
- * (in case the message is sent off-node),
- * while ensuring TIPC header is word aligned for quicker access
+ * (in case the message is sent off-node).
  *
- * The largest header currently supported is 18 bytes, which is used when
- * the standard 14 byte Ethernet header has 4 added bytes for VLAN info
+ * Headroom is currently set to 24 bytes to facilitate support of
+ * the following header formats:
+ *
+ * - Ethernet header (14 bytes)
+ * - Ethernet header + VLAN info (14 + 4 bytes)
+ * - Ethernet header + gianfar FCB info (14 + 8 bytes)
+ *
+ * Note: Headroom is always a multiple of 4 to ensure the TIPC header fields
+ *       are word aligned for quicker access
  */
 
-#define BUF_HEADROOM 20u
+#define BUF_HEADROOM 24u
 
 struct tipc_skb_cb {
 	void *handle;
Signature · 1 line
1.5.3.2
maintainer
#1 lore raw

From: Allan Stephens <[email protected]>
Date: Thu, 8 May 2008 20:07:55 -0400

Quoted 4 lines

This patch increases the headroom TIPC reserves in each sk_buff to 24 bytes, due to the 8 byte FCB used by gianfar.

This is not how this is computed.

Please use LL_RESERVED_SPACE() like every other packet output path does. Or, at a minimum, reserve LL_MAX_HEADER bytes.