02 Nov, 2009

1 commit

  • Some workloads hit dev_base_lock rwlock pretty hard.
    We can use RCU lookups to avoid touching this rwlock
    (and avoid touching netdevice refcount)

    netdevices are already freed after a RCU grace period, so this patch
    adds no penalty at device dismantle time.

    However, it adds a synchronize_rcu() call in dev_change_name()

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

    Eric Dumazet
     

31 Oct, 2009

2 commits

  • RDS currently supports a GET_MR sockopt to establish a
    memory region (MR) for a chunk of memory. However, the fastreg
    method ties a MR to a particular destination. The GET_MR_FOR_DEST
    sockopt allows the remote machine to be specified, and thus
    support for fastreg (aka FRWRs).

    Note that this patch does *not* do all of this - it simply
    implements the new sockopt in terms of the old one, so applications
    can begin to use the new sockopt in preparation for cutover to
    FRWRs.

    Signed-off-by: Andy Grover
    Signed-off-by: David S. Miller

    Andy Grover
     
  • This isn't beautifully abstracted, but it is simple,
    simplifies uses and so far is only needed for the bonding driver.

    Signed-off-by: Eric W. Biederman
    Signed-off-by: David S. Miller

    Eric W. Biederman
     

30 Oct, 2009

2 commits


29 Oct, 2009

10 commits


28 Oct, 2009

7 commits


27 Oct, 2009

2 commits

  • Conflicts:
    drivers/net/sh_eth.c

    David S. Miller
     
  • We currently use a 16 bit field (vlan_tci) to store VLAN ID/PRIO on a skb.

    Null value is used as a special value, meaning vlan tagging not enabled.
    This forbids use of null vlan ID.

    As pointed by David, some drivers use the 3 high order bits (PRIO)

    As VLAN ID is 12 bits, we can use the remaining bit (CFI) as a flag, and
    allow null VLAN ID.

    In case future code really wants to use VLAN_CFI_MASK, we'll have to use
    a bit outside of vlan_tci.

    #define VLAN_PRIO_MASK 0xe000 /* Priority Code Point */
    #define VLAN_PRIO_SHIFT 13
    #define VLAN_CFI_MASK 0x1000 /* Canonical Format Indicator */
    #define VLAN_TAG_PRESENT VLAN_CFI_MASK
    #define VLAN_VID_MASK 0x0fff /* VLAN Identifier */

    Reported-by: Gertjan Hofman
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     

24 Oct, 2009

2 commits

  • When handling large number of netdevice, rtnl_dump_ifinfo()
    is very slow because it has O(N^2) complexity.

    Instead of scanning one single list, we can use the 256 sub lists
    of the dev_index hash table.

    This considerably speedups "ip link" operations

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

    Eric Dumazet
     
  • SIT tunnels use one rwlock to protect their prl entries.

    This first patch adds RCU locking for prl management,
    with standard call_rcu() calls.

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

    Eric Dumazet
     

23 Oct, 2009

1 commit


21 Oct, 2009

2 commits

  • dst_negative_advice() should check for changed dst and reset
    sk_tx_queue_mapping accordingly. Pass sock to the callers of
    dst_negative_advice.

    (sk_reset_txq is defined just for use by dst_negative_advice. The
    only way I could find to get around this is to move dst_negative_()
    from dst.h to dst.c, include sock.h in dst.c, etc)

    Signed-off-by: Krishna Kumar
    Signed-off-by: David S. Miller

    Krishna Kumar
     
  • Introduce sk_tx_queue_mapping; and functions that set, test and
    get this value. Reset sk_tx_queue_mapping to -1 whenever the dst
    cache is set/reset, and in socket alloc. Setting txq to -1 and
    using valid txq= allows the tx path to use the value
    of sk_tx_queue_mapping directly instead of subtracting 1 on every
    tx.

    Signed-off-by: Krishna Kumar
    Signed-off-by: David S. Miller

    Krishna Kumar
     

20 Oct, 2009

5 commits

  • commit 9e337b0f (net: annotate inet_timewait_sock bitfields)
    added 4/8 bytes in struct inet_timewait_sock.

    Fix this by declaring tw_ipv6_offset in the 'flags' bitfield
    The 14 bits hole is named tw_pad to make it cleary apparent.

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

    Eric Dumazet
     
  • Reported-by: Stephen Rothwell
    Signed-off-by: Arnaldo Carvalho de Melo
    Signed-off-by: David S. Miller

    Arnaldo Carvalho de Melo
     
  • It can help being able to filter packets on their queue_mapping.

    If filter performance is not good, we could add a "numqueue" field
    in struct packet_type, so that netif_nit_deliver() and other functions
    can directly ignore packets with not expected queue number.

    Lets experiment this simple filter extension first.

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

    Eric Dumazet
     
  • This patch makes the private functions alloc_can_skb() and
    alloc_can_err_skb() of the at91_can driver public and adapts all
    drivers to use these. While making the patch I realized, that
    the skb's are *not* setup consistently. It's now done as shown
    below:

    skb->protocol = htons(ETH_P_CAN);
    skb->pkt_type = PACKET_BROADCAST;
    skb->ip_summed = CHECKSUM_UNNECESSARY;
    *cf = (struct can_frame *)skb_put(skb, sizeof(struct can_frame));
    memset(*cf, 0, sizeof(struct can_frame));

    The frame is zeroed out to avoid uninitialized data to be passed to
    user space. Some drivers or library code did not set "pkt_type" or
    "ip_summed". Also, "__constant_htons()" should not be used for
    runtime invocations, as pointed out by David Miller.

    Signed-off-by: Wolfgang Grandegger
    Signed-off-by: David S. Miller

    Wolfgang Grandegger
     
  • Allow bpf to set a filter to drop packets that dont
    match a specific mark

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

    jamal
     

19 Oct, 2009

4 commits

  • The last users of skb_icv_walk are converted to ahash now,
    so skb_icv_walk is unused and can be removed.

    Signed-off-by: Steffen Klassert
    Signed-off-by: David S. Miller

    Steffen Klassert
     
  • ah4 and ah6 are converted to ahash now, so we can remove the
    code for the obsolete hash algorithm.

    Signed-off-by: Steffen Klassert
    Signed-off-by: David S. Miller

    Steffen Klassert
     
  • To support for ahash algorithms, we add a pointer to a
    crypto_ahash to ah_data.

    Signed-off-by: Steffen Klassert
    Signed-off-by: David S. Miller

    Steffen Klassert
     
  • In order to have better cache layouts of struct sock (separate zones
    for rx/tx paths), we need this preliminary patch.

    Goal is to transfert fields used at lookup time in the first
    read-mostly cache line (inside struct sock_common) and move sk_refcnt
    to a separate cache line (only written by rx path)

    This patch adds inet_ prefix to daddr, rcv_saddr, dport, num, saddr,
    sport and id fields. This allows a future patch to define these
    fields as macros, like sk_refcnt, without name clashes.

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

    Eric Dumazet
     

15 Oct, 2009

2 commits