1. 05 Aug, 2013 10 commits
    • fan.du's avatar
      sctp: Pack dst_cookie into 1st cacheline hole for 64bit host · 5a139296
      fan.du authored
      As dst_cookie is used in fast path sctp_transport_dst_check.
      
      Before:
      struct sctp_transport {
      	struct list_head           transports;           /*     0    16 */
      	atomic_t                   refcnt;               /*    16     4 */
      	__u32                      dead:1;               /*    20:31  4 */
      	__u32                      rto_pending:1;        /*    20:30  4 */
      	__u32                      hb_sent:1;            /*    20:29  4 */
      	__u32                      pmtu_pending:1;       /*    20:28  4 */
      
      	/* XXX 28 bits hole, try to pack */
      
      	__u32                      sack_generation;      /*    24     4 */
      
      	/* XXX 4 bytes hole, try to pack */
      
      	struct flowi               fl;                   /*    32    64 */
      	/* --- cacheline 1 boundary (64 bytes) was 32 bytes ago --- */
      	union sctp_addr            ipaddr;               /*    96    28 */
      
      After:
      struct sctp_transport {
      	struct list_head           transports;           /*     0    16 */
      	atomic_t                   refcnt;               /*    16     4 */
      	__u32                      dead:1;               /*    20:31  4 */
      	__u32                      rto_pending:1;        /*    20:30  4 */
      	__u32                      hb_sent:1;            /*    20:29  4 */
      	__u32                      pmtu_pending:1;       /*    20:28  4 */
      
      	/* XXX 28 bits hole, try to pack */
      
      	__u32                      sack_generation;      /*    24     4 */
      	u32                        dst_cookie;           /*    28     4 */
      	struct flowi               fl;                   /*    32    64 */
      	/* --- cacheline 1 boundary (64 bytes) was 32 bytes ago --- */
      	union sctp_addr            ipaddr;               /*    96    28 */
      Signed-off-by: default avatarFan Du <fan.du@windriver.com>
      Acked-by: default avatarNeil Horman <nhorman@tuxdriver.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5a139296
    • Veaceslav Falico's avatar
      bonding: add bond_time_in_interval() and use it for time comparison · e7f63f1d
      Veaceslav Falico authored
      Currently we use a lot of time comparison math for arp_interval
      comparisons, which are sometimes quite hard to read and understand.
      
      All the time comparisons have one pattern:
      (time - arp_interval_jiffies) <= jiffies <= (time + mod *
      arp_interval_jiffies + arp_interval_jiffies/2)
      
      Introduce a new helper - bond_time_in_interval(), which will do the math in
      one place and, thus, will clean up the logical code. This helper introduces
      a bit of overhead (by always calculating the jiffies from arp_interval),
      however it's really not visible, considering that functions using it
      usually run once in arp_interval milliseconds.
      
      There are several lines slightly over 80 chars, however breaking them would
      result in more hard-to-read code than several character after the 80 mark.
      
      CC: Jay Vosburgh <fubar@us.ibm.com>
      CC: Andy Gospodarek <andy@greyhouse.net>
      Signed-off-by: default avatarVeaceslav Falico <vfalico@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e7f63f1d
    • Veaceslav Falico's avatar
      bonding: call slave_last_rx() only once per slave · def4460c
      Veaceslav Falico authored
      Simple cleanup to not call slave_last_rx() on every time function. It won't
      give any measurable boost - but looks cleaner and easier to understand.
      
      There are no time-consuming functions in between these calls, so it's safe
      to call it in the beginning only once.
      
      CC: Jay Vosburgh <fubar@us.ibm.com>
      CC: Andy Gospodarek <andy@greyhouse.net>
      Signed-off-by: default avatarVeaceslav Falico <vfalico@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      def4460c
    • Wei Yongjun's avatar
      tile: fix missing unlock on error in tile_net_open() · 1155e964
      Wei Yongjun authored
      Add the missing unlock before return from function tile_net_open()
      in the error handling case.
      
      Introduced by commit f3286a3a.
      (tile: support multiple mPIPE shims in tilegx network driver)
      Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
      Acked-by: default avatarChris Metcalf <cmetcalf@tilera.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1155e964
    • Jingoo Han's avatar
      net: mlx4: Staticize local functions · f094668c
      Jingoo Han authored
      These local functions are used only in this file.
      Fix the following sparse warnings:
      
      drivers/net/ethernet/mellanox/mlx4/cmd.c:803:5: warning: symbol 'MLX4_CMD_UPDATE_QP_wrapper' was not declared. Should it be static?
      drivers/net/ethernet/mellanox/mlx4/cmd.c:812:5: warning: symbol 'MLX4_CMD_GET_OP_REQ_wrapper' was not declared. Should it be static?
      drivers/net/ethernet/mellanox/mlx4/cmd.c:1547:5: warning: symbol 'mlx4_master_immediate_activate_vlan_qos' was not declared. Should
      it be static?
      Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
      Acked-By: default avatarAmir Vadai <amirv@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f094668c
    • Jingoo Han's avatar
      net: micrel: Staticize local functions · 51a700db
      Jingoo Han authored
      These local functions are used only in this file.
      Fix the following sparse warnings:
      
      drivers/net/ethernet/micrel/ks8842.c:708:6: warning: symbol 'ks8842_handle_rx' was not declared. Should it be static?
      drivers/net/ethernet/micrel/ks8842.c:718:6: warning: symbol 'ks8842_handle_tx' was not declared. Should it be static?
      drivers/net/ethernet/micrel/ks8842.c:727:6: warning: symbol 'ks8842_handle_rx_overrun' was not declared. Should it be static?
      drivers/net/ethernet/micrel/ks8842.c:735:6: warning: symbol 'ks8842_tasklet' was not declared. Should it be static?
      drivers/net/ethernet/micrel/ks8851_mll.c:691:6: warning: symbol 'ks_enable_qmu' was not declared. Should it be static?
      Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      51a700db
    • Jingoo Han's avatar
      be2net: Staticize local functions · 4188e7df
      Jingoo Han authored
      These local functions are used only in this file.
      Fix the following sparse warnings:
      
      drivers/net/ethernet/emulex/benet/be_main.c:475:6: warning: symbol 'populate_erx_stats' was not declared. Should it be static?
      drivers/net/ethernet/emulex/benet/be_main.c:1485:6: warning: symbol 'be_rx_compl_process_gro' was not declared. Should it be static?
      drivers/net/ethernet/emulex/benet/be_main.c:2262:5: warning: symbol 'be_poll' was not declared. Should it be static?
      drivers/net/ethernet/emulex/benet/be_main.c:3223:6: warning: symbol 'flash_cookie' was not declared. Should it be static?
      drivers/net/ethernet/emulex/benet/be_main.c:3280:27: warning: symbol 'get_fsec_info' was not declared. Should it be static?
      drivers/net/ethernet/emulex/benet/be_cmds.c:1013:5: warning: symbol 'be_cmd_mccq_ext_create' was not declared. Should it be static?
      drivers/net/ethernet/emulex/benet/be_cmds.c:1071:5: warning: symbol 'be_cmd_mccq_org_create' was not declared. Should it be static?
      drivers/net/ethernet/emulex/benet/be_cmds.c:3166:5: warning: symbol 'be_cmd_get_profile_config_mbox' was not declared. Should it be
      static?
      drivers/net/ethernet/emulex/benet/be_cmds.c:3194:5: warning: symbol 'be_cmd_get_profile_config_mccq' was not declared. Should it be
      static?
      drivers/net/ethernet/emulex/benet/be_roce.c:96:6: warning: symbol '_be_roce_dev_remove' was not declared. Should it be static?
      drivers/net/ethernet/emulex/benet/be_roce.c:113:6: warning: symbol '_be_roce_dev_open' was not declared. Should it be static?
      drivers/net/ethernet/emulex/benet/be_roce.c:129:6: warning: symbol '_be_roce_dev_close' was not declared. Should it be static?
      Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4188e7df
    • Jingoo Han's avatar
      bna: Staticize local functions · 7f4341fe
      Jingoo Han authored
      bna_rx_sm_stop_wait_entry(), bna_rx_sm_rxf_stop_wait_entry(),
      bna_rx_sm_started_entry(), bna_rx_sm_cleanup_wait_entry(),
      and bna_rx_sm_cleanup_wait() are used only in this file.
      Fix the following sparse warnings:
      
      drivers/net/ethernet/brocade/bna/bna_tx_rx.c:1423:1: warning: symbol 'bna_rx_sm_stop_wait_entry' was not declared. Should it be
      static?
      drivers/net/ethernet/brocade/bna/bna_tx_rx.c:1476:1: warning: symbol 'bna_rx_sm_rxf_stop_wait_entry' was not declared. Should it be
      static?
      drivers/net/ethernet/brocade/bna/bna_tx_rx.c:1532:1: warning: symbol 'bna_rx_sm_started_entry' was not declared. Should it be
      static?
      drivers/net/ethernet/brocade/bna/bna_tx_rx.c:1597:1: warning: symbol 'bna_rx_sm_cleanup_wait_entry' was not declared. Should it be
      static?
      drivers/net/ethernet/brocade/bna/bna_tx_rx.c:1602:1: warning: symbol 'bna_rx_sm_cleanup_wait' was not declared. Should it be static?
      Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7f4341fe
    • stephen hemminger's avatar
      vxlan: fix rcu related warning · 5ca5461c
      stephen hemminger authored
      Vxlan remote list is protected by RCU and guaranteed to be non-empty.
      Split out the rcu and non-rcu access to the list to fix warning
      Signed-off-by: default avatarStephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5ca5461c
    • stephen hemminger's avatar
      bridge: fix rcu check warning in multicast port group · 762a3d89
      stephen hemminger authored
      Use of RCU here with out marked pointer and function doesn't match prototype
      with sparse.
      Signed-off-by: default avatarStephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      762a3d89
  2. 04 Aug, 2013 2 commits
  3. 03 Aug, 2013 20 commits
  4. 02 Aug, 2013 8 commits