• Raghavendra Koushik's avatar
    [PATCH] S2io: two buffer mode · 7deee781
    Raghavendra Koushik authored
    Attached is the patch for implementing 2-buffer mode on Rx path.
    
    On certain systems when a DMA has to happen on an un-aligned memory
    location performance will take a significant hit. It's standard
    practice to offset the Rx buffer address by 2 (as Mac header is 14
    bytes) so the IP header starts from an aligned location.  Obviously
    using a single Rx buffer both cannot be achieved. Thus XFrame supports
    something called 2 buffer Rx mode, where in the Rx'ed frame is split
    into 2 parts, one is the Ethernet header and the other is the Ethernet
    payload. So now we can allocate proper aligned memory for both buffers,
    hence the DMA is not slowed down. Also, the Ethernet payload(starting
    from L3 header) is on an aligned location so OS need not have to do
    un-aligned accesses to process IP header. To achieve this, the kernel
    function eth_type_trans functionality has to be partially implemented
    in the driver itself.
    Signed-off-by: default avatarRaghavendra Koushik <raghavendra.koushik@s2io.com>
    Signed-off-by: default avatarRavinandan Arakali <ravinandan.arakali@s2io.com>
    Signed-off-by: default avatarJeff Garzik <jgarzik@pobox.com>
    7deee781
s2io.c 149 KB