This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tapsets/15171] New: inet_get_local_port() tapset function is broken on rawhide kernels


http://sourceware.org/bugzilla/show_bug.cgi?id=15171

             Bug #: 15171
           Summary: inet_get_local_port() tapset function is broken on
                    rawhide kernels
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: tapsets
        AssignedTo: systemtap@sourceware.org
        ReportedBy: dsmith@redhat.com
    Classification: Unclassified


The inet_get_local_port() function in tapset/linux/inet_sock.stp needs to be
updated to handle the changes introduced by kernel commit
ce43b03e8889475817d427b1f3724c7e294b76eb:

====
stap -vp4 ../src/testsuite/buildok/inet_sock-embedded.stp 
Pass 1: parsed user script and 90 library script(s) using
207524virt/25472res/2776shr/23020data kb, in 160usr/60sys/234real ms.
semantic error: unable to find member 'inet' for struct inet_sock
(alternatives: sk pinet6 inet_saddr uc_ttl cmsg_flags inet_sport inet_id
inet_opt rx_dst_ifindex tos min_ttl mc_ttl pmtudisc recverr is_icsk freebind
hdrincl mc_loop transparent mc_all nodefrag rcv_tos uc_index mc_index mc_addr
mc_list cork): operator '->' at
/usr/local/share/systemtap/tapset/linux/inet_sock.stp:19:61
        source:                 @cast(sock, "inet_sock",
"kernel<net/ip.h>")->inet->num))
                                                                            ^

Pass 2: analyzed script: 1 probe(s), 9 function(s), 1 embed(s), 0 global(s)
using 458084virt/121980res/4252shr/117904data kb, in 2870usr/5070sys/7848real
ms.
Pass 2: analysis failed.  [man error::pass2]
====

Here's the comment for that kernel commit:

====
commit ce43b03e8889475817d427b1f3724c7e294b76eb
Author: Eric Dumazet <edumazet@google.com>
Date:   Fri Nov 30 09:49:27 2012 +0000

    net: move inet_dport/inet_num in sock_common

    commit 68835aba4d9b (net: optimize INET input path further)
    moved some fields used for tcp/udp sockets lookup in the first cache
    line of struct sock_common.

    This patch moves inet_dport/inet_num as well, filling a 32bit hole
    on 64 bit arches and reducing number of cache line misses in lookups.

    Also change INET_MATCH()/INET_TW_MATCH() to perform the ports match
    before addresses match, as this check is more discriminant.

    Remove the hash check from MATCH() macros because we dont need to
    re validate the hash value after taking a refcount on socket, and
    use likely/unlikely compiler hints, as the sk_hash/hash check
    makes the following conditional tests 100% predicted by cpu.

    Introduce skc_addrpair/skc_portpair pair values to better
    document the alignment requirements of the port/addr pairs
    used in the various MATCH() macros, and remove some casts.

    The namespace check can also be done at last.

    This slightly improves TCP/UDP lookup times.

    IP/TCP early demux needs inet->rx_dst_ifindex and
    TCP needs inet->min_ttl, lets group them together in same cache line.

    With help from Ben Hutchings & Joe Perches.

    Idea of this patch came after Ling Ma proposal to move skc_hash
    to the beginning of struct sock_common, and should allow him
    to submit a final version of his patch. My tests show an improvement
    doing so.

    Signed-off-by: Eric Dumazet <edumazet@google.com>
    Cc: Ben Hutchings <bhutchings@solarflare.com>
    Cc: Joe Perches <joe@perches.com>
    Cc: Ling Ma <ling.ma.program@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
====

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]