23 Jun, 2005

2 commits

  • This patch is a follow up to patch 1 regarding "Selective Sub Address
    matching with call user data". It allows use of the Fast-Select-Acceptance
    optional user facility for X.25.

    This patch just implements fast select with no restriction on response
    (NRR). What this means (according to ITU-T Recomendation 10/96 section
    6.16) is that if in an incoming call packet, the relevant facility bits are
    set for fast-select-NRR, then the called DTE can issue a direct response to
    the incoming packet using a call-accepted packet that contains
    call-user-data. This patch allows such a response.

    The called DTE can also respond with a clear-request packet that contains
    call-user-data. However, this feature is currently not implemented by the
    patch.

    How is Fast Select Acceptance used?
    By default, the system does not allow fast select acceptance (as before).
    To enable a response to fast select acceptance,
    After a listen socket in created and bound as follows
    socket(AF_X25, SOCK_SEQPACKET, 0);
    bind(call_soc, (struct sockaddr *)&locl_addr, sizeof(locl_addr));
    but before a listen system call is made, the following ioctl should be used.
    ioctl(call_soc,SIOCX25CALLACCPTAPPRV);
    Now the listen system call can be made
    listen(call_soc, 4);
    After this, an incoming-call packet will be accepted, but no call-accepted
    packet will be sent back until the following system call is made on the socket
    that accepts the call
    ioctl(vc_soc,SIOCX25SENDCALLACCPT);
    The network (or cisco xot router used for testing here) will allow the
    application server's call-user-data in the call-accepted packet,
    provided the call-request was made with Fast-select NRR.

    Signed-off-by: Shaun Pereira
    Signed-off-by: Andrew Morton
    Signed-off-by: David S. Miller

    Shaun Pereira
     
  • From: Shaun Pereira

    This is the first (independent of the second) patch of two that I am
    working on with x25 on linux (tested with xot on a cisco router). Details
    are as follows.

    Current state of module:

    A server using the current implementation (2.6.11.7) of the x25 module will
    accept a call request/ incoming call packet at the listening x.25 address,
    from all callers to that address, as long as NO call user data is present
    in the packet header.

    If the server needs to choose to accept a particular call request/ incoming
    call packet arriving at its listening x25 address, then the kernel has to
    allow a match of call user data present in the call request packet with its
    own. This is required when multiple servers listen at the same x25 address
    and device interface. The kernel currently matches ALL call user data, if
    present.

    Current Changes:

    This patch is a follow up to the patch submitted previously by Andrew
    Hendry, and allows the user to selectively control the number of octets of
    call user data in the call request packet, that the kernel will match. By
    default no call user data is matched, even if call user data is present.
    To allow call user data matching, a cudmatchlength > 0 has to be passed
    into the kernel after which the passed number of octets will be matched.
    Otherwise the kernel behavior is exactly as the original implementation.

    This patch also ensures that as is normally the case, no call user data
    will be present in the Call accepted / call connected packet sent back to
    the caller

    Future Changes on next patch:

    There are cases however when call user data may be present in the call
    accepted packet. According to the X.25 recommendation (ITU-T 10/96)
    section 5.2.3.2 call user data may be present in the call accepted packet
    provided the fast select facility is used. My next patch will include this
    fast select utility and the ability to send up to 128 octets call user data
    in the call accepted packet provided the fast select facility is used. I
    am currently testing this, again with xot on linux and cisco.

    Signed-off-by: Shaun Pereira

    (With a fix from Alexey Dobriyan )
    Signed-off-by: Andrew Morton
    Signed-off-by: David S. Miller

    Shaun Pereira
     

22 Jun, 2005

2 commits

  • This patch implements a number of smp_processor_id() cleanup ideas that
    Arjan van de Ven and I came up with.

    The previous __smp_processor_id/_smp_processor_id/smp_processor_id API
    spaghetti was hard to follow both on the implementational and on the
    usage side.

    Some of the complexity arose from picking wrong names, some of the
    complexity comes from the fact that not all architectures defined
    __smp_processor_id.

    In the new code, there are two externally visible symbols:

    - smp_processor_id(): debug variant.

    - raw_smp_processor_id(): nondebug variant. Replaces all existing
    uses of _smp_processor_id() and __smp_processor_id(). Defined
    by every SMP architecture in include/asm-*/smp.h.

    There is one new internal symbol, dependent on DEBUG_PREEMPT:

    - debug_smp_processor_id(): internal debug variant, mapped to
    smp_processor_id().

    Also, i moved debug_smp_processor_id() from lib/kernel_lock.c into a new
    lib/smp_processor_id.c file. All related comments got updated and/or
    clarified.

    I have build/boot tested the following 8 .config combinations on x86:

    {SMP,UP} x {PREEMPT,!PREEMPT} x {DEBUG_PREEMPT,!DEBUG_PREEMPT}

    I have also build/boot tested x64 on UP/PREEMPT/DEBUG_PREEMPT. (Other
    architectures are untested, but should work just fine.)

    Signed-off-by: Ingo Molnar
    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     
  • Essentially netlink at the moment always reports a pid and sequence of 0
    always for v6 route activities.
    To understand the repurcassions of this look at:
    http://lists.quagga.net/pipermail/quagga-dev/2005-June/003507.html

    While fixing this, i took the liberty to resolve the outstanding issue
    of IPV6 routes inserted via ioctls to have the correct pids as well.

    This patch tries to behave as close as possible to the v4 routes i.e
    maintains whatever PID the socket issuing the command owns as opposed to
    the process. That made the patch a little bulky.

    I have tested against both netlink derived utility to add/del routes as
    well as ioctl derived one. The Quagga folks have tested against quagga.
    This fixes the problem and so far hasnt been detected to introduce any
    new issues.

    Signed-off-by: Jamal Hadi Salim
    Acked-by: YOSHIFUJI Hideaki
    Signed-off-by: David S. Miller

    Jamal Hadi Salim
     

21 Jun, 2005

5 commits

  • Below is a more generic patch to do fib_lookup via netlink. For others
    we should say that we discussed this as a way to verify route selection.
    It's also possible there are others uses for this.

    In short the fist half of struct fib_result_nl is filled in by caller
    and netlink call fills in the other half and returns it.

    In case anyone is interested there is a corresponding user app to compare
    the full routing table this was used to test implementation of the LC-trie.

    Signed-off-by: David S. Miller

    Robert Olsson
     
  • Signed-off-by: Alexey Dobriyan
    Acked-by: Ralf Baechle
    Signed-off-by: David S. Miller

    Alexey Dobriyan
     
  • This patch adds the xfrm_state_afinfo->init_flags hook which allows
    each address family to perform any common initialisation that does
    not require a corresponding destructor call.

    It will be used subsequently to set the XFRM_STATE_NOPMTUDISC flag
    in IPv4.

    It also fixes up the error codes returned by xfrm_init_state.

    Signed-off-by: Herbert Xu
    Acked-by: James Morris
    Signed-off-by: David S. Miller

    Herbert Xu
     
  • This patch adds xfrm_init_state which is simply a wrapper that calls
    xfrm_get_type and subsequently x->type->init_state. It also gets rid
    of the unused args argument.

    Abstracting it out allows us to add common initialisation code, e.g.,
    to set family-specific flags.

    The add_time setting in xfrm_user.c was deleted because it's already
    set by xfrm_state_alloc.

    Signed-off-by: Herbert Xu
    Acked-by: James Morris
    Signed-off-by: David S. Miller

    Herbert Xu
     
  • Implements sctp_connectx() as defined in the SCTP sockets API draft by
    tunneling the request through a setsockopt().

    Signed-off-by: Frank Filz
    Signed-off-by: Sridhar Samudrala
    Signed-off-by: David S. Miller

    Frank Filz
     

19 Jun, 2005

12 commits

  • Implements an interface to be used by leaf qdiscs maintaining an internal
    skb queue. The interface maintains a backlog in bytes additionaly
    to the skb_queue_len() maintained by the queue itself. Relevant statistics
    get incremented automatically. Every function comes in two variants, one
    assuming Qdisc->q is used as queue and the second taking a sk_buff_head
    as argument. Be aware that, if you use multiple queues, you still have to
    maintain the Qdisc->q.qlen counter yourself.

    Signed-off-by: Thomas Graf
    Signed-off-by: David S. Miller

    Thomas Graf
     
  • Signed-off-by: Thomas Graf
    Signed-off-by: David S. Miller

    Thomas Graf
     
  • To retrieve the neighbour tables send RTM_GETNEIGHTBL with the
    NLM_F_DUMP flag set. Every neighbour table configuration is
    spread over multiple messages to avoid running into message
    size limits on systems with many interfaces. The first message
    in the sequence transports all not device specific data such as
    statistics, configuration, and the default parameter set.
    This message is followed by 0..n messages carrying device
    specific parameter sets.

    Although the ordering should be sufficient, NDTA_NAME can be
    used to identify sequences. The initial message can be identified
    by checking for NDTA_CONFIG. The device specific messages do
    not contain this TLV but have NDTPA_IFINDEX set to the
    corresponding interface index.

    To change neighbour table attributes, send RTM_SETNEIGHTBL
    with NDTA_NAME set. Changeable attribute include NDTA_THRESH[1-3],
    NDTA_GC_INTERVAL, and all TLVs in NDTA_PARMS unless marked
    otherwise. Device specific parameter sets can be changed by
    setting NDTPA_IFINDEX to the interface index of the corresponding
    device.

    Signed-off-by: Thomas Graf
    Signed-off-by: David S. Miller

    Thomas Graf
     
  • This fixes the CONFIG_INET=n build failure noticed
    by Andrew Morton.

    Signed-off-by: David S. Miller

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

    Arnaldo Carvalho de Melo
     
  • This chunks out the accept_queue and tcp_listen_opt code and moves
    them to net/core/request_sock.c and include/net/request_sock.h, to
    make it useful for other transport protocols, DCCP being the first one
    to use it.

    Next patches will rename tcp_listen_opt to accept_sock and remove the
    inline tcp functions that just call a reqsk_queue_ function.

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

    Arnaldo Carvalho de Melo
     
  • Ok, this one just renames some stuff to have a better namespace and to
    dissassociate it from TCP:

    struct open_request -> struct request_sock
    tcp_openreq_alloc -> reqsk_alloc
    tcp_openreq_free -> reqsk_free
    tcp_openreq_fastfree -> __reqsk_free

    With this most of the infrastructure closely resembles a struct
    sock methods subset.

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

    Arnaldo Carvalho de Melo
     
  • Kept this first changeset minimal, without changing existing names to
    ease peer review.

    Basicaly tcp_openreq_alloc now receives the or_calltable, that in turn
    has two new members:

    ->slab, that replaces tcp_openreq_cachep
    ->obj_size, to inform the size of the openreq descendant for
    a specific protocol

    The protocol specific fields in struct open_request were moved to a
    class hierarchy, with the things that are common to all connection
    oriented PF_INET protocols in struct inet_request_sock, the TCP ones
    in tcp_request_sock, that is an inet_request_sock, that is an
    open_request.

    I.e. this uses the same approach used for the struct sock class
    hierarchy, with sk_prot indicating if the protocol wants to use the
    open_request infrastructure by filling in sk_prot->rsk_prot with an
    or_calltable.

    Results? Performance is improved and TCP v4 now uses only 64 bytes per
    open request minisock, down from 96 without this patch :-)

    Next changeset will rename some of the structs, fields and functions
    mentioned above, struct or_calltable is way unclear, better name it
    struct request_sock_ops, s/struct open_request/struct request_sock/g,
    etc.

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

    Arnaldo Carvalho de Melo
     
  • This patch removes XFRM_SAP_* and converts them over to XFRM_MSG_*.
    The netlink interface is meant to map directly onto the underlying
    xfrm subsystem. Therefore rather than using a new independent
    representation for the events we can simply use the existing ones
    from xfrm_user.

    Signed-off-by: Herbert Xu

    Herbert Xu
     
  • This patch turns km_event.data into a union. This makes code that
    uses it clearer.

    Signed-off-by: Herbert Xu

    Herbert Xu
     
  • This patch ensures that the hard state/policy expire notifications are
    only sent when the state/policy is successfully removed from their
    respective tables.

    As it is, it's possible for a state/policy to both expire through
    reaching a hard limit, as well as being deleted by the user.

    Note that this behaviour isn't actually forbidden by RFC 2367.
    However, it is a quality of implementation issue.

    As an added bonus, the restructuring in this patch will help
    eventually in moving the expire notifications from softirq
    context into process context, thus improving their reliability.

    One important side-effect from this change is that SAs reaching
    their hard byte/packet limits are now deleted immediately, just
    like SAs that have reached their hard time limits.

    Previously they were announced immediately but only deleted after
    30 seconds.

    This is bad because it prevents the system from issuing an ACQUIRE
    command until the existing state was deleted by the user or expires
    after the time is up.

    In the scenario where the expire notification was lost this introduces
    a 30 second delay into the system for no good reason.

    Signed-off-by: Herbert Xu

    Herbert Xu
     
  • Heres the final patch.
    What this patch provides

    - netlink xfrm events
    - ability to have events generated by netlink propagated to pfkey
    and vice versa.
    - fixes the acquire lets-be-happy-with-one-success issue

    Signed-off-by: Jamal Hadi Salim
    Signed-off-by: Herbert Xu

    Jamal Hadi Salim
     

14 Jun, 2005

1 commit


30 May, 2005

1 commit


27 May, 2005

1 commit


20 May, 2005

1 commit


06 May, 2005

2 commits


04 May, 2005

4 commits

  • Else the in6_addr layout is not known for struct
    prefix_info.

    Signed-off-by: Patrick McHardy

    Patrick McHardy
     
  • I found a bug that stopped IPsec/IPv6 from working. About
    a month ago IPv6 started using rt6i_idev->dev on the cached socket dst
    entries. If the cached socket dst entry is IPsec, then rt6i_idev will
    be NULL.

    Since we want to look at the rt6i_idev of the original route in this
    case, the easiest fix is to store rt6i_idev in the IPsec dst entry just
    as we do for a number of other IPv6 route attributes. Unfortunately
    this means that we need some new code to handle the references to
    rt6i_idev. That's why this patch is bigger than it would otherwise be.

    I've also done the same thing for IPv4 since it is conceivable that
    once these idev attributes start getting used for accounting, we
    probably need to dereference them for IPv4 IPsec entries too.

    Signed-off-by: Herbert Xu
    Signed-off-by: David S. Miller

    Herbert Xu
     
  • Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • This patch includes net/ipv6.h from addrconf.h since it needs
    ipv6_addr_set.

    Signed-off-by: Herbert Xu
    Signed-off-by: David S. Miller

    Herbert Xu
     

01 May, 2005

2 commits

  • Some KernelDoc descriptions are updated to match the current code.
    No code changes.

    Signed-off-by: Martin Waitz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Martin Waitz
     
  • I have recompiled Linux kernel 2.6.11.5 documentation for me and our
    university students again. The documentation could be extended for more
    sources which are equipped by structured comments for recent 2.6 kernels. I
    have tried to proceed with that task. I have done that more times from 2.6.0
    time and it gets boring to do same changes again and again. Linux kernel
    compiles after changes for i386 and ARM targets. I have added references to
    some more files into kernel-api book, I have added some section names as well.
    So please, check that changes do not break something and that categories are
    not too much skewed.

    I have changed kernel-doc to accept "fastcall" and "asmlinkage" words reserved
    by kernel convention. Most of the other changes are modifications in the
    comments to make kernel-doc happy, accept some parameters description and do
    not bail out on errors. Changed to @pid in the description, moved some
    #ifdef before comments to correct function to comments bindings, etc.

    You can see result of the modified documentation build at
    http://cmp.felk.cvut.cz/~pisa/linux/lkdb-2.6.11.tar.gz

    Some more sources are ready to be included into kernel-doc generated
    documentation. Sources has been added into kernel-api for now. Some more
    section names added and probably some more chaos introduced as result of quick
    cleanup work.

    Signed-off-by: Pavel Pisa
    Signed-off-by: Martin Waitz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pavel Pisa
     

29 Apr, 2005

3 commits


25 Apr, 2005

4 commits

  • The SELinux hooks invoke ipv6_skip_exthdr() with an incorrect
    length final argument. However, the length argument turns out
    to be superfluous.

    I was just reading ipv6_skip_exthdr and it occured to me that we can
    get rid of len altogether. The only place where len is used is to
    check whether the skb has two bytes for ipv6_opt_hdr. This check
    is done by skb_header_pointer/skb_copy_bits anyway.

    Now it might appear that we've made the code slower by deferring
    the check to skb_copy_bits. However, this check should not trigger
    in the common case so this is OK.

    Signed-off-by: Herbert Xu
    Signed-off-by: David S. Miller

    Herbert Xu
     
  • And provide an example simply action in order to
    demonstrate usage.

    Signed-off-by: Jamal Hadi Salim
    Signed-off-by: David S. Miller

    Jamal Hadi Salim
     
  • The problem is that when doing MTU discovery, the too-large segments in
    the write queue will be calculated as having a pcount of >1. When
    tcp_write_xmit() is trying to send, tcp_snd_test() fails the cwnd test
    when pcount > cwnd.

    The segments are eventually transmitted one at a time by keepalive, but
    this can take a long time.

    This patch checks if TSO is enabled when setting pcount.

    Signed-off-by: John Heffner
    Signed-off-by: David S. Miller

    David S. Miller
     
  • Replacing the open coded equivalents and making ax25 look more like
    a linux network protocol, i.e. more similar to inet.

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

    Arnaldo Carvalho de Melo