Messages in this thread | | | Subject | Re: sk_buff chaining | From | Andi Kleen <> | Date | 20 Nov 1999 10:47:00 +0100 |
| |
justice@quantumres.com (John Justice) writes:
> My question is somewhat network oriented. It appears that LINUX socket > buffers sk_buff) contain the whole contiguous packet and there is no > mechanism to represent a packet as a scatter / gather list. For ethernet > (MTU=1500) this is not a problem, however, Fibre Channel devices specify an > MTU of 65280 bytes. The major problem is posting buffers to the adapter for > recieving packets. Under SOLARIS, for example, I can post 4k buffers to the > adapter. The driver can then chain these 4k buffers together if the packet > recieved is > 4K. With LINUX, however, I have to post 64K buffers to the > adapter since there is no mechanism to chain sk_buffs together. Depending > on the TCP/UDP application being run (like telnet / rlogin), this will be a > huge waste of memory. Is there a way to somehow chain sk_buffs in present / > future versions of LINUX?
Future versions of Linux (>2.4) may support iovec skbuffs. Most drivers solve the problem by using rx_copybreak variable. If the packet is < rx_copybreak it is copied into a right sized buffer, if it is >rx_copybreak it is passed directly from the driver. E.g. the tulip driver uses rx_copybreak == 100. For those small packets the memcpy is in the noise.
-Andi
-- This is like TV. I don't like TV.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |