1. 23 1月, 2012 2 次提交
  2. 27 12月, 2011 1 次提交
    • A
      mlx4: Add missing include of linux/slab.h · e143a1ad
      Axel Lin 提交于
      Include linux/slab.h to fix below build error:
      
        CC      drivers/net/ethernet/mellanox/mlx4/resource_tracker.o
      drivers/net/ethernet/mellanox/mlx4/resource_tracker.c: In function 'mlx4_init_resource_tracker':
      drivers/net/ethernet/mellanox/mlx4/resource_tracker.c:233: error: implicit declaration of function 'kzalloc'
      drivers/net/ethernet/mellanox/mlx4/resource_tracker.c:234: warning: assignment makes pointer from integer without a cast
      drivers/net/ethernet/mellanox/mlx4/resource_tracker.c: In function 'mlx4_free_resource_tracker':
      drivers/net/ethernet/mellanox/mlx4/resource_tracker.c:264: error: implicit declaration of function 'kfree'
      drivers/net/ethernet/mellanox/mlx4/resource_tracker.c: In function 'alloc_qp_tr':
      drivers/net/ethernet/mellanox/mlx4/resource_tracker.c:370: warning: assignment makes pointer from integer without a cast
      drivers/net/ethernet/mellanox/mlx4/resource_tracker.c: In function 'alloc_mtt_tr':
      drivers/net/ethernet/mellanox/mlx4/resource_tracker.c:386: warning: assignment makes pointer from integer without a cast
      drivers/net/ethernet/mellanox/mlx4/resource_tracker.c: In function 'alloc_mpt_tr':
      drivers/net/ethernet/mellanox/mlx4/resource_tracker.c:402: warning: assignment makes pointer from integer without a cast
      drivers/net/ethernet/mellanox/mlx4/resource_tracker.c: In function 'alloc_eq_tr':
      drivers/net/ethernet/mellanox/mlx4/resource_tracker.c:417: warning: assignment makes pointer from integer without a cast
      drivers/net/ethernet/mellanox/mlx4/resource_tracker.c: In function 'alloc_cq_tr':
      drivers/net/ethernet/mellanox/mlx4/resource_tracker.c:431: warning: assignment makes pointer from integer without a cast
      drivers/net/ethernet/mellanox/mlx4/resource_tracker.c: In function 'alloc_srq_tr':
      drivers/net/ethernet/mellanox/mlx4/resource_tracker.c:446: warning: assignment makes pointer from integer without a cast
      drivers/net/ethernet/mellanox/mlx4/resource_tracker.c: In function 'alloc_counter_tr':
      drivers/net/ethernet/mellanox/mlx4/resource_tracker.c:461: warning: assignment makes pointer from integer without a cast
      drivers/net/ethernet/mellanox/mlx4/resource_tracker.c: In function 'add_res_range':
      drivers/net/ethernet/mellanox/mlx4/resource_tracker.c:521: warning: assignment makes pointer from integer without a cast
      drivers/net/ethernet/mellanox/mlx4/resource_tracker.c: In function 'mac_add_to_slave':
      drivers/net/ethernet/mellanox/mlx4/resource_tracker.c:1193: warning: assignment makes pointer from integer without a cast
      drivers/net/ethernet/mellanox/mlx4/resource_tracker.c: In function 'add_mcg_res':
      drivers/net/ethernet/mellanox/mlx4/resource_tracker.c:2521: warning: assignment makes pointer from integer without a cast
      make[5]: *** [drivers/net/ethernet/mellanox/mlx4/resource_tracker.o] Error 1
      make[4]: *** [drivers/net/ethernet/mellanox/mlx4] Error 2
      make[3]: *** [drivers/net/ethernet/mellanox] Error 2
      make[2]: *** [drivers/net/ethernet] Error 2
      make[1]: *** [drivers/net] Error 2
      make: *** [drivers] Error 2
      Signed-off-by: NAxel Lin <axel.lin@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e143a1ad
  3. 20 12月, 2011 1 次提交
  4. 14 12月, 2011 3 次提交
    • M
      mlx4_core: mtts resources units changed to offset · 2b8fb286
      Marcel Apfelbaum 提交于
      In the previous implementation mtts are managed by:
      1. order     - log(mtt segments), 'mtt segment' groups several mtts together.
      2. first_seg - segment location relative to mtt table.
      In the current implementation:
      1. order     - log(mtts) rather than segments
      2. offset    - mtt index in mtt table
      
      Note: The actual mtt allocation is made in segments but it is
            transparent to callers.
      
      Rational: The mtt resource holders are not interested on how the allocation
                of mtt is done, but rather on how they will use it.
      Signed-off-by: NMarcel Apfelbaum <marcela@dev.mellanox.co.il>
      Reviewed-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2b8fb286
    • E
      mlx4: Ethernet port management modifications · ffe455ad
      Eugenia Emantayev 提交于
      The physical port is now common to the PF and VFs.
      The port resources and configuration is managed by the PF, VFs can
      only influence the MTU of the port, it is set as max among all functions,
      Each function allocates RX buffers of required size to meet it's MTU enforcement.
      Port management code was moved to mlx4_core, as the mlx4_en module is
      virtualization unaware
      
      Move handling qp functionality to mlx4_get_eth_qp/mlx4_put_eth_qp
      including reserve/release range and add/release unicast steering.
      Let mlx4_register/unregister_mac deal only with MAC (un)registration.
      Signed-off-by: NEugenia Emantayev <eugenia@mellanox.co.il>
      Signed-off-by: NYevgeny Petrilin <yevgenyp@mellanox.co.il>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ffe455ad
    • E
      mlx4_core: resource tracking for HCA resources used by guests · c82e9aa0
      Eli Cohen 提交于
      The resource tracker is used to track usage of HCA resources by the different
      guests.
      
      Virtual functions (VFs) are attached to guest operating systems but
      resources are allocated from the same pool and are assigned to VFs. It is
      essential that hostile/buggy guests not be able to affect the operation of
      other VFs, possibly attached to other guest OSs since ConnectX firmware is not
      tolerant to misuse of resources.
      
      The resource tracker module associates each resource with a VF and maintains
      state information for the allocated object. It also defines allowed state
      transitions and enforces them.
      
      Relationships between resources are also referred to. For example, CQs are
      pointed to by QPs, so it is forbidden to destroy a CQ if a QP refers to it.
      
      ICM memory is always accessible through the primary function and hence it is
      allocated by the owner of the primary function.
      
      When a guest dies, an FLR is generated for all the VFs it owns and all the
      resources it used are freed.
      
      The tracked resource types are: QPs, CQs, SRQs, MPTs, MTTs, MACs, RES_EQs,
      and XRCDNs.
      Signed-off-by: NEli Cohen <eli@mellanox.co.il>
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c82e9aa0