04 Nov, 2009

1 commit

  • This cleanup patch puts struct/union/enum opening braces,
    in first line to ease grep games.

    struct something
    {

    becomes :

    struct something {

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

    Eric Dumazet
     

03 Nov, 2009

5 commits

  • This patch provides basic hash rules programming via the ethtool
    interface.

    Signed-off-by: Sandeep Gopalpet
    Signed-off-by: David S. Miller

    Sandeep Gopalpet
     
  • This patch adds code to disable the TXC and RXC reference clocks if link
    is not available.

    Signed-off-by: Matt Carlson
    Reviewed-by: Michael Chan
    Signed-off-by: David S. Miller

    Matt Carlson
     
  • The 5785 does not use the RXC reference clock. Turning it off is
    desirable as it saves power.

    By default, the 50610 enables the RXC reference clock and the 50610M
    disables it. Presumably this is one of the reasons why the hardware
    architect chose one over the other.

    Adding a "rx reference clock disable" flag is not the ideal way to
    describe the option, as it would force the MAC using a 50610M to set
    the flag. Ideally we want the flags to represent opt-in behavior that
    deviates from hardware defaults. Furthermore, the lack of a
    "disable" flag implies that the requester wants the rx reference clock
    enabled, which doesn't necessarily follow.

    By presenting the option as a passive statement (rx reference clock
    unused) rather than a command, I hope to convey an opt-in option to
    disable the rx reference clock that falls back to hardware defaults if
    not set. A secondary benefit of this is that it keeps the
    intelligence about phy defaults in the broadcom module where it belongs
    and allows the broadcom module more latitude should a bug arise.

    Signed-off-by: Matt Carlson
    Reviewed-by: Michael Chan
    Signed-off-by: David S. Miller

    Matt Carlson
     
  • Broadcom 50610M parts changed the default definitions of the RGMII mode
    shadow register. The 5785 needs the RGMII mode selection bits [4:3]
    cleared.

    The default value of the remaining bits in this register are zero.
    Rather than unnecessarily burn an extra bit in the dev_flags member in
    an attempt to enumerate all possible combinations, this patch take a
    more course grained approach and labels the option as "clear all bits".

    Signed-off-by: Matt Carlson
    Reviewed-by: Michael Chan
    Signed-off-by: David S. Miller

    Matt Carlson
     
  • This patch moves all the dev_flags enumerations outside the broadcom.c
    file to include/linux/brcmphy.h. The existing flags were not used yet
    and have been re-enumerated to avoid conflicts.

    Signed-off-by: Matt Carlson
    Reviewed-by: Michael Chan
    Signed-off-by: David S. Miller

    Matt Carlson
     

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