1. 01 May, 2013 1 commit
  2. 27 Apr, 2013 14 commits
  3. 26 Apr, 2013 8 commits
  4. 25 Apr, 2013 17 commits
    • Vlad Yasevich's avatar
      net: fix address check in rtnl_fdb_del · 37fe0660
      Vlad Yasevich authored
      Commit 6681712d
      	vxlan: generalize forwarding tables
      
      relaxed the address checks in rtnl_fdb_del() to use is_zero_ether_addr().
      This allows users to add multicast addresses using the fdb API.  However,
      the check in rtnl_fdb_del() still uses a more strict
      is_valid_ether_addr() which rejects multicast addresses.  Thus it
      is possible to add an fdb that can not be later removed.
      Relax the check in rtnl_fdb_del() as well.
      Signed-off-by: default avatarVlad Yasevich <vyasevic@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      37fe0660
    • Sebastian Siewior's avatar
      net/cpsw: fix irq_disable() with threaded interrupts · a11fbba9
      Sebastian Siewior authored
      During high throughput it is likely that we receive both: an RX and TX
      interrupt. The normal behaviour is that once we enter the ISR the
      interrupts are disabled in the IRQ chip and so the ISR is invoked only
      once and the interrupt line is disabled once. It will be re-enabled
      after napi completes.
      With threaded interrupts on the other hand the interrupt the interrupt
      is disabled immediately and the ISR is marked for "later". By having TX
      and RX interrupt marked pending we invoke them both and disable the
      interrupt line twice. The napi callback is still executed once and so
      after it completes we remain with interrupts disabled.
      
      The initial patch simply removed the cpsw_{enable|disable}_irq() calls
      and it worked well on my AM335X ES1.0 (beagle bone). On ES2.0 (beagle
      bone black) it caused an never ending interrupt (even after the mask via
      cpsw_intr_disable()) according to Mugunthan V N. Since I don't have the
      ES2.0 and no idea what is going on this patch tracks the state of the
      irq_disable() call and execute it only when not yet done.
      The book keeping is done on the first struct since with dual_emac we can
      have two of those and only one interrupt line.
      Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Acked-by: default avatarMugunthan V N <mugunthanvnm@ti.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a11fbba9
    • Sebastian Siewior's avatar
      net/cpsw: optimize the for_each_slave_macro() · 6e6ceaed
      Sebastian Siewior authored
      text    data     bss     dec     hex filename
      15530      92       4   15626    3d0a cpsw.o.before
      15478      92       4   15574    3cd6 cpsw.o.after
      
      52 bytes smaller, 13 for each invocation.
      Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Acked-by: default avatarMugunthan V N <mugunthanvnm@ti.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6e6ceaed
    • Sebastian Siewior's avatar
      net/cpsw: make sure modules remove does not leak any ressources · d1bd9acf
      Sebastian Siewior authored
      This driver does not clean up properly after leaving. Here is a list:
      - Use unregister_netdev(). free_netdev() is good but not enough
      - Use the above also on the other ndev in case of dual mac
      - Free data.slave_data. The name of the strucre makes it look like
        it is platform_data but it is not. It is just a trick!
      - Free all irqs. Again: freeing one irq is good start, but freeing all
        of them is better.
      
      With this rmmod & modprobe of cpsw seems to work. The remaining issue
      is:
      |WARNING: at fs/sysfs/dir.c:536 sysfs_add_one+0x9c/0xd4()
      |sysfs: cannot create duplicate filename '/devices/ocp.2/4a100000.ethernet/4a101000.mdio'
      |WARNING: at lib/kobject.c:196 kobject_add_internal+0x1a4/0x1c8()
      
      comming from of_platform_populate() and I am not sure that this belongs
      here.
      Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Acked-by: default avatarMugunthan V N <mugunthanvnm@ti.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d1bd9acf
    • Sebastian Siewior's avatar
      net/ti: add MODULE_DEVICE_TABLE + MODULE_LICENSE · 4bc21d41
      Sebastian Siewior authored
      If compiled as modules each one of these modules is missing something.
      With this patch the modules are loaded on demand and don't taint the
      kernel due to license issues.
      Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Acked-by: default avatarMugunthan V N <mugunthanvnm@ti.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4bc21d41
    • Sebastian Siewior's avatar
      net/cpsw: redo rx skb allocation in rx path · b4727e69
      Sebastian Siewior authored
      In case that we run into OOM during the allocation of the new rx-skb we
      don't get one and we have one skb less than we used to have. If this
      continues to happen then we end up with no rx-skbs at all.
      This patch changes the following:
      - if we fail to allocate the new skb, then we treat the currently
        completed skb as the new one and so drop the currently received data.
      - instead of testing multiple times if the device is gone we rely one
        the status field which is set to -ENOSYS in case the channel is going
        down and incomplete requests are purged.
        cpdma_chan_stop() removes most of the packages with -ENOSYS. The
        currently active packet which is removed has the "tear down" bit set.
        So if that bit is set, we send ENOSYS as well otherwise we pass the
        status bits which are required to figure out which of the two possible
        just finished.
      Acked-by: default avatarMugunthan V N <mugunthanvnm@ti.com>
      Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b4727e69
    • Sebastian Siewior's avatar
      net/davinci_cpdma: remove unused argument in cpdma_chan_submit() · aef614e1
      Sebastian Siewior authored
      The gfp_mask argument is not used in cpdma_chan_submit() and always set
      to GFP_KERNEL even in atomic sections. This patch drops it since it is
      unused.
      Acked-by: default avatarMugunthan V N <mugunthanvnm@ti.com>
      Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      aef614e1
    • Sebastian Siewior's avatar
      net/cpsw: don't rely only on netif_running() to check which device is active · fd51cf19
      Sebastian Siewior authored
      netif_running() reports false before the ->ndo_stop() callback is
      called. That means if one executes "ifconfig down" and the system
      receives an interrupt before the interrupt source has been disabled we
      hang for always for two reasons:
      - we never disable the interrupt source because devices claim to be
        already inactive and don't feel responsible.
      - since the ISR always reports IRQ_HANDLED the line is never deactivated
        because it looks like the ISR feels responsible.
      
      This patch changes the logic in the ISR a little:
      - If none of the status registers reports an active source (RX or TX,
        misc is ignored because it is not actived) we leave with IRQ_NONE.
      - the interrupt is deactivated
      - The first active network device is taken and napi is scheduled. If
        none are active (a small race window between ndo_down() and the
        interrupt the) then we leave and should not come back because the
        source is off.
        There is no need to schedule the second NAPI because both share the
        same dma queue.
      Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Acked-by: default avatarMugunthan V N <mugunthanvnm@ti.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fd51cf19
    • Sebastian Siewior's avatar
      net/cpsw: don't continue if we miss to allocate rx skbs · aacebbf8
      Sebastian Siewior authored
      if during "ifconfig up" we run out of mem we continue regardless how
      many skbs we got. In worst case we have zero RX skbs and can't ever
      receive further packets since the RX skbs are never reallocated. If
      cpdma_chan_submit() fails we even leak the skb.
      This patch changes the behavior here:
      If we fail to allocate an skb during bring up we don't continue and
      report that error. Same goes for errors from cpdma_chan_submit().
      While here I changed to __netdev_alloc_skb_ip_align() so GFP_KERNEL can
      be used.
      Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Acked-by: default avatarMugunthan V N <mugunthanvnm@ti.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      aacebbf8
    • Sebastian Siewior's avatar
      net/davinci_cpdma: don't check for jiffies with interrupts · 817f6d1a
      Sebastian Siewior authored
      __cpdma_chan_process() holds the lock with interrupts off (and its
      caller as well), same goes for cpdma_ctlr_start(). With interrupts off,
      jiffies will not make any progress and if the wait condition never gets
      true we wait for ever.
      Tgis patch adds a a simple udelay and counting down attempt.
      Acked-by: default avatarMugunthan V N <mugunthanvnm@ti.com>
      Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      817f6d1a
    • Nicholas Bellinger's avatar
      iser-target: Add iSCSI Extensions for RDMA (iSER) target driver · b8d26b3b
      Nicholas Bellinger authored
      This patch adds support for iSCSI Extensions for RDMA target mode,
      and includes CQ pooling per isert_device context distributed across
      multiple active iser target sessions.
      
      It also uses cmwq process context for RX / TX ib_post_cq() polling
      via isert_cq_desc->cq_[rx,tx]_work invoked by isert_cq_[rx,tx]_callback()
      hardIRQ context callbacks.
      
      v5 changes:
      
      - Use ISER_RECV_DATA_SEG_LEN instead of hardcoded value in ISER_RX_PAD_SIZE (Or)
      - Fix make W=1 warnings (Or)
      - Add missing depends on NET && INFINIBAND_ADDR_TRANS in Kconfig (Randy + Or)
      - Make isert_device_find_by_ib_dev() return proper ERR_PTR (Wei Yongjun)
      - Properly setup iscsi_np->np_sockaddr in isert_setup_np() (Shlomi + nab)
      - Add special case for early ISCSI_OP_SCSI_CMD exception handling (nab)
      
      v4 changes:
      - Mark isert_cq_rx_work as static (Or)
      - Drop unnecessary ib_dma_sync_single_for_cpu + ib_dma_sync_single_for_device
        calls for isert_cmd->sense_buf_dma from isert_put_response (Or)
      - Use 12288 for ISER_RX_PAD_SIZE base to save extra page per
        struct iser_rx_desc (Or + nab)
      - Drop now unnecessary isert_rx_desc usage, and convert RX users to
        iser_rx_desc (Or + nab)
      - Move isert_[alloc,free]_rx_descriptors() ahead of
        isert_create_device_ib_res() usage (nab)
      - Mark isert_cq_[rx,tx]_callback() + prototypes as static
      - Fix 'warning: 'ret' may be used uninitialized' warning for
        isert_create_device_ib_res on powerpc allmodconfig (fengguang + nab)
      - Fix 'warning: 'ret' may be used uninitialized' warning for
        isert_connect_request on i386 allyesconfig (fengguang + nab)
      - Fix pr_debug conversion specification in isert_rx_completion()
        (fengguang + nab)
      - Drop unnecessary isert_conn->conn_cm_id != NULL check in
        isert_connect_release causing the build warning:
        "variable dereferenced before check 'isert_conn->conn_cm_id'"
      - Fix isert_lid + isert_np leak in isert_setup_np failure path
      - Add isert_conn->conn_wait_comp_err usage in isert_free_conn()
        for isert_cq_comp_err completion path
      - Add isert_conn->logout_posted bit to determine decrement of
        isert_conn->post_send_buf_count from logout response completion
      - Always set ISER_CONN_DOWN from isert_disconnect_work() callback
      
      v3 changes:
      
      - Convert to use per isert_cq_desc->cq_[rx,tx]_work + drop tasklets (Or + nab)
      - Move IB_EVENT_QP_LAST_WQE_REACHED warn into correct
        isert_qp_event_callback (Or)
      - Drop unnecessary IB_ACCESS_REMOTE_* access flag usage in
        isert_create_device_ib_res (Or)
      - Add common isert_init_send_wr(), and convert isert_put_* calls (Or)
      - Move to verbs+core logic to single ib_isert.[c,h]  (Or + nab)
      - Add kmem_cache isert_cmd_cache usage for descriptor allocation (nab)
      - Move common ib_post_send() logic used by isert_put_*() to
        isert_post_response() (nab)
      - Add isert_put_reject call in isert_response_queue() for posting
        ISCSI_REJECT response. (nab)
      - Add ISTATE_SEND_REJECT checking in isert_do_control_comp. (nab)
      
      v2 changes:
      
      - Drop unused ISERT_ADDR_ROUTE_TIMEOUT define
      - Add rdma_notify() call for IB_EVENT_COMM_EST in isert_qp_event_callback()
      - Make isert_query_device() less verbose
      - Drop unused RDMA_CM_EVENT_ADDR_ERROR and RDMA_CM_EVENT_ROUTE_ERROR
        cases from isert_cma_handler()
      - Drop unused rdma/ib_fmr_pool.h include
      - Update isert_conn_setup_qp() to assign cq based upon least used
      - Add isert_create_device_ib_res() to setup PD, CQs and MRs for each
        underlying struct ib_device, instead of using per isert_conn resources.
      - Add isert_free_device_ib_res() to release PD, CQs and MRs for each
        underlying struct ib_device.
      - Add isert_device_find_by_ib_dev()
      - Change isert_connect_request() to drop PD, CQs and MRs allocation,
        and use isert_device_find_by_ib_dev() instead.
      - Add isert_device_try_release()
      - Change isert_connect_release() to decrement cq_active_qps, and drop
        PD, CQs and MRs resource release.
      - Update isert_connect_release() to call isert_device_try_release()
      - Make isert_create_device_ib_res() determine device->cqs_used based
        upon num_online_cpus()
      - Drop misleading isert_dump_ib_wc() usage
      - Drop unused rdma/ib_fmr_pool.h include
      - Use proper xfer_len for login PDUs in isert_rx_completion()
      - Add isert_release_cmd() usage
      - Change isert_alloc_cmd() to setup iscsi_cmd.release_cmd() pointer
      - Change isert_put_cmd() to perform per iscsi_opcode specific release
        logic
      - Add isert_unmap_cmd() call for ISCSI_OP_SCSI_CMD from isert_put_cmd()
      - Change isert_send_completion() to call
        atomic_dec(&isert_conn->post_send_buf_count)
        based upon per iscsi_opcode logic
      - Drop ISTATE_REMOVE processing from isert_immediate_queue()
      - Drop ISTATE_SEND_DATAIN processing from isert_response_queue()
      - Drop ISTATE_SEND_STATUS processing from isert_response_queue()
      - Drop iscsit_transport->iscsit_unmap_cmd() and ->iscsit_free_cmd()
      - Convert iser_cq_tx_tasklet() to use struct isert_cq_desc pooling logic
      - Convert isert_cq_tx_callback() to use struct isert_cq_desc pooling
        logic
      - Convert iser_cq_rx_tasklet() to use struct isert_cq_desc pooling logic
      - Convert isert_cq_rx_callback() to use struct isert_cq_desc pooling
        logic
      - Add explict iscsit_stop_dataout_timer() call to
        isert_do_rdma_read_comp()
      - Use isert_get_dataout() for iscsit_transport->iscsit_get_dataout()
        caller
      - Drop ISTATE_SEND_R2T processing from isert_immediate_queue()
      - Drop unused rdma/ib_fmr_pool.h include
      - Drop isert_cmd->cmd_kref in favor of se_cmd->cmd_kref usage
      - Add struct isert_device in order to support multiple EQs + CQ pooling
      - Add struct isert_cq_desc
      - Drop tasklets and cqs from isert_conn
      - Bump ISERT_MAX_CQ to 64
      - Various minor checkpatch fixes
      Signed-off-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      b8d26b3b
    • Asias He's avatar
      tcm_vhost: Enable VIRTIO_SCSI_F_HOTPLUG · 04b59bab
      Asias He authored
      Everything for hotplug is ready. Let's enable the feature bit.
      Signed-off-by: default avatarAsias He <asias@redhat.com>
      Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      04b59bab
    • Chen Gang's avatar
      net: ipv4: typo issue, remove erroneous semicolon · 2bac7cb3
      Chen Gang authored
      Need remove erroneous semicolon, which is found by EXTRA_CFLAGS=-W,
      the related commit number: c5441932
      ("GRE: Refactor GRE tunneling code")
      Signed-off-by: default avatarChen Gang <gang.chen@asianux.com>
      Acked-by: default avatarPravin B Shelar <pshelar@nicira.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2bac7cb3
    • Asias He's avatar
    • Bhanu Prakash Gollapudi's avatar
      bnx2x, bnx2fc: Use per port max exchange resources · 0eb43b4b
      Bhanu Prakash Gollapudi authored
      The firmware supports a maximum of 4K FCoE exchanges. In 4-port devices,
      or when working in multi-function mode, this resource needs to be distributed
      between the various possible FCoE functions.
      
      This information needs to be calculated by bnx2x and propagated into bnx2fc
      via cnic. bnx2fc can then use this value to calculate corresponding xid
      resources instead of using global constants.
      Signed-off-by: default avatarBhanu Prakash Gollapudi <bprakash@broadcom.com>
      Signed-off-by: default avatarMichael Chan <mchan@broadcom.com>
      Signed-off-by: default avatarYuval Mintz <yuvalmin@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0eb43b4b
    • Asias He's avatar
      tcm_vhost: Add hotplug/hotunplug support · a6c9af87
      Asias He authored
      In commit 365a7150 ([SCSI] virtio-scsi: hotplug support for
      virtio-scsi), hotplug support is added to virtio-scsi.
      
      This patch adds hotplug and hotunplug support to tcm_vhost.
      
      You can create or delete a LUN in targetcli to hotplug or hotunplug a
      LUN in guest.
      Signed-off-by: default avatarAsias He <asias@redhat.com>
      Reviewed-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      a6c9af87
    • Asias He's avatar
      tcm_vhost: Refactor the lock nesting rule · f2b7daf5
      Asias He authored
      We want to use tcm_vhost_mutex to make sure hotplug/hotunplug will not
      happen when set_endpoint/clear_endpoint is in process.
      Signed-off-by: default avatarAsias He <asias@redhat.com>
      Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      f2b7daf5