10 Nov, 2011

1 commit

  • The 802.1X EAPOL handshake hostapd does requires
    knowing whether the frame was ack'ed by the peer.
    Currently, we fudge this pretty badly by not even
    transmitting the frame as a normal data frame but
    injecting it with radiotap and getting the status
    out of radiotap monitor as well. This is rather
    complex, confuses users (mon.wlan0 presence) and
    doesn't work with all hardware.

    To get rid of that hack, introduce a real wifi TX
    status option for data frame transmissions.

    This works similar to the existing TX timestamping
    in that it reflects the SKB back to the socket's
    error queue with a SCM_WIFI_STATUS cmsg that has
    an int indicating ACK status (0/1).

    Since it is possible that at some point we will
    want to have TX timestamping and wifi status in a
    single errqueue SKB (there's little point in not
    doing that), redefine SO_EE_ORIGIN_TIMESTAMPING
    to SO_EE_ORIGIN_TXSTATUS which can collect more
    than just the timestamp; keep the old constant
    as an alias of course. Currently the internal APIs
    don't make that possible, but it wouldn't be hard
    to split them up in a way that makes it possible.

    Thanks to Neil Horman for helping me figure out
    the functions that add the control messages.

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     

13 Oct, 2009

1 commit

  • Create a new socket level option to report number of queue overflows

    Recently I augmented the AF_PACKET protocol to report the number of frames lost
    on the socket receive queue between any two enqueued frames. This value was
    exported via a SOL_PACKET level cmsg. AFter I completed that work it was
    requested that this feature be generalized so that any datagram oriented socket
    could make use of this option. As such I've created this patch, It creates a
    new SOL_SOCKET level option called SO_RXQ_OVFL, which when enabled exports a
    SOL_SOCKET level cmsg that reports the nubmer of times the sk_receive_queue
    overflowed between any two given frames. It also augments the AF_PACKET
    protocol to take advantage of this new feature (as it previously did not touch
    sk->sk_drops, which this patch uses to record the overflow count). Tested
    successfully by me.

    Notes:

    1) Unlike my previous patch, this patch simply records the sk_drops value, which
    is not a number of drops between packets, but rather a total number of drops.
    Deltas must be computed in user space.

    2) While this patch currently works with datagram oriented protocols, it will
    also be accepted by non-datagram oriented protocols. I'm not sure if thats
    agreeable to everyone, but my argument in favor of doing so is that, for those
    protocols which aren't applicable to this option, sk_drops will always be zero,
    and reporting no drops on a receive queue that isn't used for those
    non-participating protocols seems reasonable to me. This also saves us having
    to code in a per-protocol opt in mechanism.

    3) This applies cleanly to net-next assuming that commit
    977750076d98c7ff6cbda51858bb5a5894a9d9ab (my af packet cmsg patch) is reverted

    Signed-off-by: Neil Horman
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Neil Horman
     

06 Aug, 2009

2 commits

  • This sockopt goes in line with SO_TYPE and SO_PROTOCOL. It makes it
    possible for userspace programs to pass around file descriptors — I
    am referring to arguments-to-functions, but it may even work for the
    fd passing over UNIX sockets — without needing to also pass the
    auxiliary information (PF_INET6/IPPROTO_TCP).

    Signed-off-by: Jan Engelhardt
    Signed-off-by: David S. Miller

    Jan Engelhardt
     
  • Similar to SO_TYPE returning the socket type, SO_PROTOCOL allows to
    retrieve the protocol used with a given socket.

    I am not quite sure why we have that-many copies of socket.h, and why
    the values are not the same on all arches either, but for where hex
    numbers dominate, I use 0x1029 for SO_PROTOCOL as that seems to be
    the next free unused number across a bunch of operating systems, or
    so Google results make me want to believe. SO_PROTOCOL for others
    just uses the next free Linux number, 38.

    Signed-off-by: Jan Engelhardt
    Signed-off-by: David S. Miller

    Jan Engelhardt
     

16 Feb, 2009

1 commit

  • User space can request hardware and/or software time stamping.
    Reporting of the result(s) via a new control message is enabled
    separately for each field in the message because some of the
    fields may require additional computation and thus cause overhead.
    User space can tell the different kinds of time stamps apart
    and choose what suits its needs.

    When a TX timestamp operation is requested, the TX skb will be cloned
    and the clone will be time stamped (in hardware or software) and added
    to the socket error queue of the skb, if the skb has a socket
    associated with it.

    The actual TX timestamp will reach userspace as a RX timestamp on the
    cloned packet. If timestamping is requested and no timestamping is
    done in the device driver (potentially this may use hardware
    timestamping), it will be done in software after the device's
    start_hard_xmit routine.

    Signed-off-by: Patrick Ohly
    Signed-off-by: David S. Miller

    Patrick Ohly
     

16 Jan, 2009

1 commit

  • Merge header files for m68k and m68knommu to the single location:

    arch/m68k/include/asm

    The majority of this patch was the result of the
    script that is included in the changelog below.

    The script was originally written by Arnd Bergman and
    exten by me to cover a few more files.

    When the header files differed the script uses the following:

    The original m68k file is named _mm.h [mm for memory manager]
    The m68knommu file is named _no.h [no for no memory manager]

    The files uses the following include guard:

    This include gaurd works as the m68knommu toolchain set
    the __uClinux__ symbol - so this should work in userspace too.

    Merging the header files for m68k and m68knommu exposes the
    (unexpected?) ABI differences thus it is easier to actually
    identify these and thus to fix them.

    The commit has been build tested with both a m68k and
    a m68knommu toolchain - with success.

    The commit has also been tested with "make headers_check"
    and this patch fixes make headers_check for m68knommu.

    The script used:
    TARGET=arch/m68k/include/asm
    SOURCE=arch/m68knommu/include/asm

    INCLUDE="cachectl.h errno.h fcntl.h hwtest.h ioctls.h ipcbuf.h \
    linkage.h math-emu.h md.h mman.h movs.h msgbuf.h openprom.h \
    oplib.h poll.h posix_types.h resource.h rtc.h sembuf.h shmbuf.h \
    shm.h shmparam.h socket.h sockios.h spinlock.h statfs.h stat.h \
    termbits.h termios.h tlb.h types.h user.h"

    EQUAL="auxvec.h cputime.h device.h emergency-restart.h futex.h \
    ioctl.h irq_regs.h kdebug.h local.h mutex.h percpu.h \
    sections.h topology.h"

    NOMUUFILES="anchor.h bootstd.h coldfire.h commproc.h dbg.h \
    elia.h flat.h m5206sim.h m520xsim.h m523xsim.h m5249sim.h \
    m5272sim.h m527xsim.h m528xsim.h m5307sim.h m532xsim.h \
    m5407sim.h m68360_enet.h m68360.h m68360_pram.h m68360_quicc.h \
    m68360_regs.h MC68328.h MC68332.h MC68EZ328.h MC68VZ328.h \
    mcfcache.h mcfdma.h mcfmbus.h mcfne.h mcfpci.h mcfpit.h \
    mcfsim.h mcfsmc.h mcftimer.h mcfuart.h mcfwdebug.h \
    nettel.h quicc_simple.h smp.h"

    FILES="atomic.h bitops.h bootinfo.h bug.h bugs.h byteorder.h cache.h \
    cacheflush.h checksum.h current.h delay.h div64.h \
    dma-mapping.h dma.h elf.h entry.h fb.h fpu.h hardirq.h hw_irq.h io.h \
    irq.h kmap_types.h machdep.h mc146818rtc.h mmu.h mmu_context.h \
    module.h page.h page_offset.h param.h pci.h pgalloc.h \
    pgtable.h processor.h ptrace.h scatterlist.h segment.h \
    setup.h sigcontext.h siginfo.h signal.h string.h system.h swab.h \
    thread_info.h timex.h tlbflush.h traps.h uaccess.h ucontext.h \
    unaligned.h unistd.h"

    mergefile() {
    BASE=${1%.h}
    git mv ${SOURCE}/$1 ${TARGET}/${BASE}_no.h
    git mv ${TARGET}/$1 ${TARGET}/${BASE}_mm.h

    cat << EOF > ${TARGET}/$1
    EOF

    git add ${TARGET}/$1
    }

    set -e

    mkdir -p ${TARGET}

    git mv include/asm-m68k/* ${TARGET}
    rmdir include/asm-m68k

    git rm ${SOURCE}/Kbuild
    for F in $INCLUDE $EQUAL; do
    git rm ${SOURCE}/$F
    done

    for F in $NOMUUFILES; do
    git mv ${SOURCE}/$F ${TARGET}/$F
    done

    for F in $FILES ; do
    mergefile $F
    done

    rmdir arch/m68knommu/include/asm
    rmdir arch/m68knommu/include

    Cc: Arnd Bergmann
    Cc: Geert Uytterhoeven
    Signed-off-by: Sam Ravnborg
    Signed-off-by: Greg Ungerer

    Sam Ravnborg