06 May, 2008

1 commit

  • dccp_feat_change() validates length and on error is returning 1.
    This happens to work since call chain is checking for 0 == success,
    but this is returned to userspace, so make it a real error value.

    Signed-off-by: Chris Wright
    Acked-by: Arnaldo Carvalho de Melo
    Signed-off-by: David S. Miller

    Chris Wright
     

03 May, 2008

1 commit


26 Apr, 2008

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (48 commits)
    net: Fix wrong interpretation of some copy_to_user() results.
    xfrm: alg_key_len & alg_icv_len should be unsigned
    [netdrvr] tehuti: move ioctl perm check closer to function start
    ipv6: Fix typo in net/ipv6/Kconfig
    via-velocity: fix vlan receipt
    tg3: sparse cleanup
    forcedeth: realtek phy crossover detection
    ibm_newemac: Increase MDIO timeouts
    gianfar: Fix skb allocation strategy
    netxen: reduce stack usage of netxen_nic_flash_print
    smc911x: test after postfix decrement fails in smc911x_{reset,drop_pkt}
    net drivers: fix platform driver hotplug/coldplug
    forcedeth: new backoff implementation
    ehea: make things static
    phylib: Add support for board-level PHY fixups
    [netdrvr] atlx: code movement: move atl1 parameter parsing
    atlx: remove flash vendor parameter
    korina: misc cleanup
    korina: fix misplaced return statement
    WAN: Fix confusing insmod error code for C101 too.
    ...

    Linus Torvalds
     

25 Apr, 2008

1 commit


24 Apr, 2008

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
    iwlwifi: Fix built-in compilation of iwlcore
    net: Unexport move_addr_to_{kernel,user}
    rt2x00: Select LEDS_CLASS.
    iwlwifi: Select LEDS_CLASS.
    leds: Do not guard NEW_LEDS with HAS_IOMEM
    [IPSEC]: Fix catch-22 with algorithm IDs above 31
    time: Export set_normalized_timespec.
    tcp: Make use of before macro in tcp_input.c
    hamradio: Remove unneeded and deprecated cli()/sti() calls in dmascc.c
    [NETNS]: Remove empty ->init callback.
    [DCCP]: Convert do_gettimeofday() to getnstimeofday().
    [NETNS]: Don't initialize err variable twice.
    [NETNS]: The ip6_fib_timer can work with garbage on net namespace stop.
    [IPV4]: Convert do_gettimeofday() to getnstimeofday().
    [IPV4]: Make icmp_sk_init() static.
    [IPV6]: Make struct ip6_prohibit_entry_template static.
    tcp: Trivial fix to correct function name in a comment in net/ipv4/tcp.c
    [NET]: Expose netdevice dev_id through sysfs
    skbuff: fix missing kernel-doc notation
    [ROSE]: Fix soft lockup wrt. rose_node_list_lock

    Linus Torvalds
     

22 Apr, 2008

1 commit


19 Apr, 2008

1 commit


18 Apr, 2008

1 commit

  • As I can see from the code, two places (tcp_v6_syn_recv_sock and
    dccp_v6_request_recv_sock) that call this one already run with
    BHs disabled, so it's safe to call __inet_inherit_port there.

    Besides (in case I missed smth with code review) the calltrace
    tcp_v6_syn_recv_sock
    `- tcp_v4_syn_recv_sock
    `- __inet_inherit_port
    and the similar for DCCP are valid, but assumes BHs to be disabled.

    Signed-off-by: Pavel Emelyanov
    Signed-off-by: David S. Miller

    Pavel Emelyanov
     

14 Apr, 2008

13 commits


13 Apr, 2008

1 commit

  • dev_queue_xmit() and the other IP output functions expect to get a skb
    with clear or properly initialized skb->cb. Unlike TCP and UDP, the
    dccp_skb_cb doesn't contain a struct inet_skb_parm at the beginning,
    so the DCCP-specific data is interpreted by the IP output functions.
    This can cause false negatives for the conditional POST_ROUTING hook
    invocation, making the packet bypass the hook.

    Add a inet_skb_parm/inet6_skb_parm union to the beginning of
    dccp_skb_cb to avoid clashes. Also add a BUILD_BUG_ON to make
    sure it fits in the cb.

    [ Combined with patch from Gerrit Renker to remove two now unnecessary
    memsets of IPCB(skb)->opt ]

    Signed-off-by: Patrick McHardy
    Acked-by: Arnaldo Carvalho de Melo
    Signed-off-by: David S. Miller

    Patrick McHardy
     

10 Apr, 2008

1 commit


04 Apr, 2008

5 commits


29 Mar, 2008

1 commit


23 Mar, 2008

1 commit

  • Inspired by the commit ab1e0a13 ([SOCK] proto: Add hashinfo member to
    struct proto) from Arnaldo, I made similar thing for UDP/-Lite IPv4
    and -v6 protocols.

    The result is not that exciting, but it removes some levels of
    indirection in udpxxx_get_port and saves some space in code and text.

    The first step is to union existing hashinfo and new udp_hash on the
    struct proto and give a name to this union, since future initialization
    of tcpxxx_prot, dccp_vx_protinfo and udpxxx_protinfo will cause gcc
    warning about inability to initialize anonymous member this way.

    Signed-off-by: Pavel Emelyanov
    Signed-off-by: David S. Miller

    Pavel Emelyanov
     

06 Mar, 2008

2 commits


01 Mar, 2008

1 commit


03 Feb, 2008

1 commit

  • This way we can remove TCP and DCCP specific versions of

    sk->sk_prot->get_port: both v4 and v6 use inet_csk_get_port
    sk->sk_prot->hash: inet_hash is directly used, only v6 need
    a specific version to deal with mapped sockets
    sk->sk_prot->unhash: both v4 and v6 use inet_hash directly

    struct inet_connection_sock_af_ops also gets a new member, bind_conflict, so
    that inet_csk_get_port can find the per family routine.

    Now only the lookup routines receive as a parameter a struct inet_hashtable.

    With this we further reuse code, reducing the difference among INET transport
    protocols.

    Eventually work has to be done on UDP and SCTP to make them share this
    infrastructure and get as a bonus inet_diag interfaces so that iproute can be
    used with these protocols.

    net-2.6/net/ipv4/inet_hashtables.c:
    struct proto | +8
    struct inet_connection_sock_af_ops | +8
    2 structs changed
    __inet_hash_nolisten | +18
    __inet_hash | -210
    inet_put_port | +8
    inet_bind_bucket_create | +1
    __inet_hash_connect | -8
    5 functions changed, 27 bytes added, 218 bytes removed, diff: -191

    net-2.6/net/core/sock.c:
    proto_seq_show | +3
    1 function changed, 3 bytes added, diff: +3

    net-2.6/net/ipv4/inet_connection_sock.c:
    inet_csk_get_port | +15
    1 function changed, 15 bytes added, diff: +15

    net-2.6/net/ipv4/tcp.c:
    tcp_set_state | -7
    1 function changed, 7 bytes removed, diff: -7

    net-2.6/net/ipv4/tcp_ipv4.c:
    tcp_v4_get_port | -31
    tcp_v4_hash | -48
    tcp_v4_destroy_sock | -7
    tcp_v4_syn_recv_sock | -2
    tcp_unhash | -179
    5 functions changed, 267 bytes removed, diff: -267

    net-2.6/net/ipv6/inet6_hashtables.c:
    __inet6_hash | +8
    1 function changed, 8 bytes added, diff: +8

    net-2.6/net/ipv4/inet_hashtables.c:
    inet_unhash | +190
    inet_hash | +242
    2 functions changed, 432 bytes added, diff: +432

    vmlinux:
    16 functions changed, 485 bytes added, 492 bytes removed, diff: -7

    /home/acme/git/net-2.6/net/ipv6/tcp_ipv6.c:
    tcp_v6_get_port | -31
    tcp_v6_hash | -7
    tcp_v6_syn_recv_sock | -9
    3 functions changed, 47 bytes removed, diff: -47

    /home/acme/git/net-2.6/net/dccp/proto.c:
    dccp_destroy_sock | -7
    dccp_unhash | -179
    dccp_hash | -49
    dccp_set_state | -7
    dccp_done | +1
    5 functions changed, 1 bytes added, 242 bytes removed, diff: -241

    /home/acme/git/net-2.6/net/dccp/ipv4.c:
    dccp_v4_get_port | -31
    dccp_v4_request_recv_sock | -2
    2 functions changed, 33 bytes removed, diff: -33

    /home/acme/git/net-2.6/net/dccp/ipv6.c:
    dccp_v6_get_port | -31
    dccp_v6_hash | -7
    dccp_v6_request_recv_sock | +5
    3 functions changed, 5 bytes added, 38 bytes removed, diff: -33

    Signed-off-by: Arnaldo Carvalho de Melo
    Signed-off-by: David S. Miller

    Arnaldo Carvalho de Melo
     

01 Feb, 2008

2 commits


29 Jan, 2008

4 commits

  • Needed to propagate it down to the __ip_route_output_key.

    Signed_off_by: Denis V. Lunev
    Signed-off-by: David S. Miller

    Denis V. Lunev
     
  • This patch includes many places, that only required
    replacing the ctl_table-s with appropriate ctl_paths
    and call register_sysctl_paths().

    Nothing special was done with them.

    Signed-off-by: Pavel Emelyanov
    Signed-off-by: David S. Miller

    Pavel Emelyanov
     
  • Without a number of CONFIG.*DEBUG:

    net/dccp/ccids/ccid3.c:
    ccid3_hc_tx_update_x | -170
    ccid3_hc_tx_packet_sent | -175
    ccid3_hc_tx_packet_recv | -169
    ccid3_hc_tx_no_feedback_timer | -192
    ccid3_hc_tx_send_packet | -144
    5 functions changed, 850 bytes removed, diff: -850

    net/dccp/ccids/ccid3.c:
    ccid3_update_send_interval | +191
    1 function changed, 191 bytes added, diff: +191

    net/dccp/ccids/ccid3.o:
    6 functions changed, 191 bytes added, 850 bytes removed, diff: -659

    Signed-off-by: Ilpo Järvinen
    Signed-off-by: David S. Miller

    Ilpo Järvinen
     
  • This one is used in quite many places in the networking code and
    seems to big to be inline.

    After the patch net/ipv4/build-in.o loses ~650 bytes:
    add/remove: 2/0 grow/shrink: 0/5 up/down: 461/-1114 (-653)
    function old new delta
    __inet_hash_nolisten - 282 +282
    __inet_hash - 179 +179
    tcp_sacktag_write_queue 2255 2254 -1
    __inet_lookup_listener 284 274 -10
    tcp_v4_syn_recv_sock 755 493 -262
    tcp_v4_hash 389 35 -354
    inet_hash_connect 1086 599 -487

    This version addresses the issue pointed by Eric, that
    while being inline this function was optimized by gcc
    in respect to the 'listen_possible' argument.

    Signed-off-by: Pavel Emelyanov
    Signed-off-by: David S. Miller

    Pavel Emelyanov