1. 20 8月, 2016 2 次提交
    • J
      i40e: fix broken i40e_config_rss_aq function · 776b2e15
      Jacob Keller 提交于
      X722 hardware requires using the admin queue to configure RSS. This
      function was previously re-written in commit e69ff813 ("i40e: rework
      the functions to configure RSS with similar parameters").
      However, the previous refactor did not work correctly for a few reasons
      
      (a) it does not check whether seed is NULL before using it, resulting in
      a NULL pointer dereference
      
      [  402.954721] BUG: unable to handle kernel NULL pointer dereference at           (null)
      [  402.955568] IP: [<ffffffffa0090ccf>] i40e_config_rss_aq.constprop.65+0x2f/0x1c0 [i40e]
      [  402.956402] PGD ad610067 PUD accc0067 PMD 0
      [  402.957235] Oops: 0000 [#1] SMP
      [  402.958064] Modules linked in: ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 xt_conntrack ip_set nfnetlink ebtable_filter ebtable_
      broute bridge stp llc ebtable_nat ebtables ip6table_mangle ip6table_raw ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv
      6 ip6table_security ip6table_filter ip6_tables iptable_mangle iptable_raw iptable_nat nf_conntrack_ipv4_ nf_defrag_ipv4_ nf_nat_ip
      v4_ nf_nat nf_conntrack iptable_security intel_rapl i86_kg_temp_thermal coretemp kvm_intel kvm irqbypass crct10dif_clMl crc32_
      pclMl ghash_clMlni_intel iTCO_wdt iTCO_vendor_support shpchp sb_edac dcdbas pcspkr joydev ipmi_devintf wmi edac_core ipmi_ssif
       acpi_ad acpi_ower_meter ipmi_si ipmi_msghandler mei_me nfsd lpc_ich mei ioatdma tpm_tis auth_rpcgss tpm nfs_acl lockd grace s
      unrpc ifs nngag200 i2c_algo_bit drm_kms_helper ttm drm iigbe bnx2x i40e dca mdio ptp pps_core libcrc32c fjes crc32c_intel
      [  402.965563] CPU: 22 PID: 2461 Conm: ethtool Not tainted 4.6.0-rc7_1.2-ABNidQ+ #20
      [  402.966719] Hardware name: Dell Inc. PowerEdge R720/0C4Y3R, BIOS 2.5.2 01/28/2015
      [  402.967862] task: ffff880219b51dc0 ti: ffff8800b3408000 task.ti: ffff8800b3408000
      [  402.969046] RIP: 0010:[<ffffffffa0090ccf>]  [<ffffffffa0090ccf>] i40e_config_rss_aq.constprop.65+0x2f/0x1c0 [i40e]
      [  402.970339] RSP: 0018:ffff8800b340ba90  EFLAGS: 00010246
      [  402.971616] RAX: 0000000000000000 RBX: ffff88042ec14000 RCX: 0000000000000200
      [  402.972961] RDX: ffff880428eb9200 RSI: 0000000000000000 RDI: ffff88042ec14000
      [  402.974312] RBP: ffff8800b340baf8 R08: ffff880237ada8f0 R09: ffff880428eb9200
      [  402.975709] R10: ffff880428eb9200 R11: 0000000000000000 R12: ffff88042ec2e000
      [  402.977104] R13: ffff88042ec2e000 R14: ffff88042ec14000 R15: ffff88022ea00800
      [  402.978541] FS:  00007f84fd054700(0000) GS:ffff880237ac0000(0000) knlGS:0000000000000000
      [  402.980003] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [  402.981508] CR2: 0000000000000000 CR3: 000000003289e000 CR4: 00000000000406e0
      [  402.983028] Stack:
      [  402.984578]  0000000002000200 0000000000000000 ffff88023ffeda68 ffff88023ffef000
      [  402.986187]  0000000000000268 ffff8800b340bbf8 ffff88023ffedd80 0000000088ce4f1d
      [  402.987844]  ffff88042ec14000 ffff88022ea00800 ffff88042ec2e000 ffff88042ec14000
      [  402.989509] Call Trace:
      [  402.991200]  [<ffffffffa009636f>] i40e_config_rss+0x11f/0x1c0 [i40e]
      [  402.992924]  [<ffffffffa00a1ae0>] i40e_set_rifh+0ic0/0x130 [i40e]
      [  402.994684]  [<ffffffff816d54b7>] ethtool_set_rifh+0x1f7/0x300
      [  402.996446]  [<ffffffff8136d02b>] ? cred_has_capability+0io6b/0x100
      [  402.998203]  [<ffffffff8136d102>] ? selinux_capable+0x12/0x20
      [  402.999968]  [<ffffffff8136277b>] ? security_capable+0x4b/0x70
      [  403.001707]  [<ffffffff816d6da3>] dev_ethtool+0x1423/0x2290
      [  403.003461]  [<ffffffff816eab41>] dev_ioctl+0x191/0io630
      [  403.005186]  [<ffffffff811cf80a>] ? lru_cache_add+0x3a/0i80
      [  403.006942]  [<ffffffff817f2a8e>] ? _raw_spin_unlock+0ie/0x20
      [  403.008691]  [<ffffffff816adb95>] sock_do_ioctl+0x45/0i50
      [  403.010421]  [<ffffffff816ae229>] sock_ioctl+0x209/0x2d0
      [  403.012173]  [<ffffffff81262194>] do_vfs_ioctl+0u4/0io6c0
      [  403.013911]  [<ffffffff81262829>] SyS_ioctl+0x79/0x90
      [  403.015710]  [<ffffffff817f2e72>] entry_SYSCALL_64_fastpath+0x1a/0u4
      [  403.017500] Code: 90 55 48 89 e5 41 57 41 56 41 55 41 54 53 48 89 fb 48 83 ec 40 4c 8b a7 e0 05 00 00 65 48 8b 04 25 28 00 00 00 48 89 45 d0 31 c0 <48> 8b 06 41 0f b7 bc 24 f2 0f 00 00 48 89 45 9c 48 8b 46 08 48
      [  403.021454] RIP  [<ffffffffa0090ccf>] i40e_config_rss_aq.constprop.65+0x2f/0x1c0 [i40e]
      [  403.023395]  RSP <ffff8800b340ba90>
      [  403.025271] CR2: 0000000000000000
      [  403.027169] ---[ end trace 64561b528cf61cf0 ]---
      
      (b) it does not even bother to use the passed in *lut parameter which
      defines the requested lookup table. Instead it uses its own round robin
      table.
      
      Fix these issues by re-writing it to be similar to i40e_config_rss_reg
      and i40e_get_rss_aq.
      
      Fixes: e69ff813 ("i40e: rework the functions to configure RSS with similar parameters", 2015-10-21)
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      776b2e15
    • J
      i40e: move i40e_vsi_config_rss below i40e_get_rss_aq · 0582b964
      Jacob Keller 提交于
      Move this function below the two functions related to configuring RSS
      via the admin queue. This helps co-locate the two functions, and made it
      easier to spot a bug in the first i40e_config_rss_aq function as
      compared to the i40e_get_rss_aq function.
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      0582b964
  2. 19 8月, 2016 4 次提交
  3. 17 8月, 2016 1 次提交
    • D
      i40e: check for and deal with non-contiguous TCs · fbfe12c6
      Dave Ertman 提交于
      The i40e driver was causing a kernel panic when
      non-contiguous Traffic Classes, or Traffic Classes not
      starting with TC0, were configured on a link partner switch.
      i40e does not support non-contiguous TCs.
      
      To fix this, the patch changes the logic when determining
      the total number of TCs enabled.  Before, this would use the
      highest TC number enabled and assume that all TCs below it were
      also enabled.  Now, we create a bitmask of enabled TCs and scan
      it to determine not only the number of TCs, but also if the set
      of enabled TCs starts at zero and is contiguous.  If not, then
      DCB is disabled by only returning one TC.
      Signed-off-by: NDave Ertman <david.m.ertman@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      fbfe12c6
  4. 22 7月, 2016 5 次提交
  5. 15 7月, 2016 2 次提交
    • G
      i40e: use valid online CPU on q_vector initialization · 7f6c5539
      Guilherme G. Piccoli 提交于
      Currently, the q_vector initialization routine sets the affinity_mask
      of a q_vector based on v_idx value. Meaning a loop iterates on v_idx,
      which is an incremental value, and the cpumask is created based on
      this value.
      
      This is a problem in systems with multiple logical CPUs per core (like in
      SMT scenarios). If we disable some logical CPUs, by turning SMT off for
      example, we will end up with a sparse cpu_online_mask, i.e., only the first
      CPU in a core is online, and incremental filling in q_vector cpumask might
      lead to multiple offline CPUs being assigned to q_vectors.
      
      Example: if we have a system with 8 cores each one containing 8 logical
      CPUs (SMT == 8 in this case), we have 64 CPUs in total. But if SMT is
      disabled, only the 1st CPU in each core remains online, so the
      cpu_online_mask in this case would have only 8 bits set, in a sparse way.
      
      In general case, when SMT is off the cpu_online_mask has only C bits set:
      0, 1*N, 2*N, ..., C*(N-1)  where
      C == # of cores;
      N == # of logical CPUs per core.
      In our example, only bits 0, 8, 16, 24, 32, 40, 48, 56 would be set.
      
      This patch changes the way q_vector's affinity_mask is created: it iterates
      on v_idx, but consumes the CPU index from the cpu_online_mask instead of
      just using the v_idx incremental value.
      
      No functional changes were introduced.
      Signed-off-by: NGuilherme G Piccoli <gpiccoli@linux.vnet.ibm.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      7f6c5539
    • K
      i40e: enable VSI broadcast promiscuous mode instead of adding broadcast filter · f6bd0962
      Kiran Patil 提交于
      This patch sets VSI broadcast promiscuous mode during VSI add sequence
      and prevents adding MAC filter if specified MAC address is broadcast.
      
      Change-ID: Ia62251fca095bc449d0497fc44bec3a5a0136773
      Signed-off-by: NKiran Patil <kiran.patil@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      f6bd0962
  6. 28 6月, 2016 10 次提交
  7. 24 6月, 2016 1 次提交
  8. 18 6月, 2016 1 次提交
  9. 21 5月, 2016 2 次提交
  10. 14 5月, 2016 3 次提交
  11. 06 5月, 2016 3 次提交
  12. 05 5月, 2016 1 次提交
    • F
      net: remove dev->trans_start · 9b36627a
      Florian Westphal 提交于
      previous patches removed all direct accesses to dev->trans_start,
      so change the netif_trans_update helper to update trans_start of
      netdev queue 0 instead and then remove trans_start from struct net_device.
      
      AFAICS a lot of the netif_trans_update() invocations are now useless
      because they occur in ndo_start_xmit and driver doesn't set LLTX
      (i.e. stack already took care of the update).
      
      As I can't test any of them it seems better to just leave them alone.
      Signed-off-by: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9b36627a
  13. 02 5月, 2016 5 次提交