lkml.org 
[lkml]   [2019]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH net-next] net: avoid indirect calls in L4 checksum calculation
    On Wed, May 29, 2019 at 1:58 AM Matteo Croce <mcroce@redhat.com> wrote:
    >
    > Commit 283c16a2dfd3 ("indirect call wrappers: helpers to speed-up
    > indirect calls of builtin") introduces some macros to avoid doing
    > indirect calls.
    >
    > Use these helpers to remove two indirect calls in the L4 checksum
    > calculation for devices which don't have hardware support for it.
    >
    > As a test I generate packets with pktgen out to a dummy interface
    > with HW checksumming disabled, to have the checksum calculated in
    > every sent packet.
    > The packet rate measured with an i7-6700K CPU and a single pktgen
    > thread raised from 6143 to 6608 Kpps, an increase by 7.5%
    >
    > Suggested-by: Davide Caratti <dcaratti@redhat.com>
    > Signed-off-by: Matteo Croce <mcroce@redhat.com>

    I found a build error with CONFIG_LIBCRC32C=m:

    ld: net/core/skbuff.o: in function `sctp_csum_update':
    skbuff.c:(.text+0x2640): undefined reference to `crc32c'
    ld: net/core/skbuff.o: in function `__skb_checksum':
    (.text+0x2aba): undefined reference to `crc32c'
    ld: (.text+0x2cf9): undefined reference to `crc32c'

    I have two possible solutions for this:
    - use INDIRECT_CALL_1 and leave the SCTP callback called by an indirect pointer
    - use IS_BUILTIN(CONFIG_LIBCRC32C) around the sctp_csum_combine usage

    I'm more toward the first one, which will also avoid the
    net/sctp/checksum.h inclusion.

    --
    Matteo Croce
    per aspera ad upstream

    \
     
     \ /
      Last update: 2019-05-29 15:58    [W:3.104 / U:0.144 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site