Skip to contentSkip to conversation

No subject

DISCUSSION [email protected] 1 participant 1 message Feb 27, 2009

lore
Share & tools
lore
#0 lore raw
  // ?? nice pointer arithmetic... should use PTR_ALIGN here?
  off = ((unsigned long) skb->data) % sc->cachelsz;
  if (off != 0)
      skb_reserve(skb, sc->cachelsz);

in other words, when we allocate, round up to the next cache line greater than IEEE80211_MAX_LEN, then add an extra cache_line-1 bytes so we can map starting from it.

dev_alloc_skb already does some padding and alignment, and it's configurable on a per-arch basis (though looks like only powerpc sets it to L1 cache size, everywhere else it's 32 bytes.)

I guess if someone is bored some benchmarking would be useful.

Signature · 1 line
Bob Copeland %% www.bobcopeland.com