1. 06 9月, 2019 8 次提交
    • H
      net: hns3: fix mis-assignment to hdev->reset_level in hclge_reset · 525a294e
      Huazhong Tan 提交于
      Since hclge_get_reset_level may return HNAE3_NONE_RESET,
      so hdev->reset_level can not be assigned with the return
      value in the hclge_reset(), otherwise, it will cause
      the use of hdev->reset_level in hclge_reset_event get
      into error.
      
      Fixes: 012fcb52 ("net: hns3: activate reset timer when calling reset_event")
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      525a294e
    • H
      net: hns3: fix double free bug when setting ringparam · 323a2ac5
      Huazhong Tan 提交于
      The system will panic when change the ringparam in HNS3 drivers:
      
      [ 1459.627727] hns3 0000:bd:00.0 eth6: Changing Tx/Rx ring ds from 1024/1024 to 24/24
      [ 1459.635766] hns3 0000:bd:00.0 eth6: link down
      [ 1459.640788] BUG: Bad page state in process ethtool  pfn:203f75c18
      [ 1459.646940] page:ffff7ee4ffd70600 refcount:0 mapcount:0 mapping:ffff993fff40f400 index:0x0 compound_mapcount: 0
      [ 1459.656987] flags: 0x9fffe00000010200(slab|head)
      [ 1459.661591] raw: 9fffe00000010200 dead000000000100 dead000000000122 ffff993fff40f400
      [ 1459.669302] raw: 0000000000000000 0000000080100010 00000000ffffffff 0000000000000000
      [ 1459.677016] page dumped because: PAGE_FLAGS_CHECK_AT_FREE flag(s) set
      [ 1459.683432] bad because of flags: 0x200(slab)
      [ 1459.687775] Modules linked in: ib_ipoib ib_umad rpcrdma ib_iser libiscsi scsi_transport_iscsi hns_roce_hw_v2 crct10dif_ce hns3 ses hclge hnae3 hisi_hpre hisi_zip qm uacce ip_tables x_tables hisi_sas_v3_hw hisi_sas_main libsas scsi_transport_sas
      [ 1459.709329] CPU: 14 PID: 17244 Comm: ethtool Tainted: G           O      5.3.0-rc4-00415-gc86f057 #1
      [ 1459.718419] Hardware name: Huawei TaiShan 2280 V2/BC82AMDC, BIOS 2280-V2 CS V3.B040.01 07/26/2019
      [ 1459.727248] Call trace:
      [ 1459.729688]  dump_backtrace+0x0/0x150
      [ 1459.733335]  show_stack+0x24/0x30
      [ 1459.736639]  dump_stack+0xa0/0xc4
      [ 1459.739943]  bad_page+0xf0/0x158
      [ 1459.743157]  free_pages_check_bad+0x84/0xa0
      [ 1459.747322]  __free_pages_ok+0x348/0x378
      [ 1459.751228]  page_frag_free+0x80/0x88
      [ 1459.754877]  skb_free_head+0x38/0x48
      [ 1459.758436]  skb_release_data+0x134/0x160
      [ 1459.762427]  skb_release_all+0x30/0x40
      [ 1459.766158]  consume_skb+0x38/0x108
      [ 1459.769633]  __dev_kfree_skb_any+0x58/0x68
      [ 1459.773718]  hns3_fini_ring+0x48/0x58 [hns3]
      [ 1459.777970]  hns3_set_ringparam+0x2a8/0x418 [hns3]
      [ 1459.782741]  dev_ethtool+0x5f4/0x2080
      [ 1459.786390]  dev_ioctl+0x190/0x3d8
      [ 1459.789777]  sock_do_ioctl+0xf8/0x220
      [ 1459.793423]  sock_ioctl+0x3bc/0x490
      [ 1459.796896]  do_vfs_ioctl+0xc4/0x868
      [ 1459.800454]  ksys_ioctl+0x8c/0xa0
      [ 1459.803752]  __arm64_sys_ioctl+0x28/0x38
      [ 1459.807658]  el0_svc_common.constprop.0+0xe0/0x1e0
      [ 1459.812426]  el0_svc_handler+0x34/0x90
      [ 1459.816158]  el0_svc+0x10/0x14
      [ 1459.819220] Disabling lock debugging due to kernel taint
      [ 1459.825182] ------------[ cut here ]------------
      
      Since ndo_stop will reclaim the RX's skb allocated by the driver,
      so the backed up ring parameter should not keep this info.
      
      Fixes: a723fb8e ("net: hns3: refine for set ring parameters")
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      323a2ac5
    • J
      net: hns3: fix error VF index when setting VLAN offload · d9c0f275
      Jian Shen 提交于
      In original codes, the VF index used incorrectly in function
      hclge_set_vlan_rx_offload_cfg() and hclge_set_vlan_rx_offload_cfg().
      When VF id is greater than 8, for example 9, it will set the
      same bit with VF id 1.
      
      This patch fixes it by using  vport->vport_id % HCLGE_VF_NUM_PER_CMD /
      HCLGE_VF_NUM_PER_BYTE as the array index, instead of vport->vport_id /
      HCLGE_VF_NUM_PER_CMD.
      
      Fixes: 052ece6d ("net: hns3: add ethtool related offload command")
      Signed-off-by: NJian Shen <shenjian15@huawei.com>
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d9c0f275
    • A
      stmmac: platform: adjust messages and move to dev level · c3a502de
      Andy Shevchenko 提交于
      This patch amends the error and warning messages across the platform driver.
      It includes the following changes:
       - append \n to the end of messages
       - change pr_* macros to dev_*
      Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c3a502de
    • J
      net: phy: Do not check Link status when loopback is enabled · fe4a7a41
      Jose Abreu 提交于
      While running stmmac selftests I found that in my 1G setup some tests
      were failling when running with PHY loopback enabled.
      
      It looks like when loopback is enabled the PHY will report that Link is
      down even though there is a valid connection.
      
      As in loopback mode the data will not be sent anywhere we can bypass the
      logic of checking if Link is valid thus saving unecessary reads.
      Signed-off-by: NJose Abreu <joabreu@synopsys.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fe4a7a41
    • D
      net_sched: act_police: add 2 new attributes to support police 64bit rate and peakrate · d1967e49
      David Dai 提交于
      For high speed adapter like Mellanox CX-5 card, it can reach upto
      100 Gbits per second bandwidth. Currently htb already supports 64bit rate
      in tc utility. However police action rate and peakrate are still limited
      to 32bit value (upto 32 Gbits per second). Add 2 new attributes
      TCA_POLICE_RATE64 and TCA_POLICE_RATE64 in kernel for 64bit support
      so that tc utility can use them for 64bit rate and peakrate value to
      break the 32bit limit, and still keep the backward binary compatibility.
      Tested-by: NDavid Dai <zdai@linux.vnet.ibm.com>
      Signed-off-by: NDavid Dai <zdai@linux.vnet.ibm.com>
      Acked-by: NCong Wang <xiyou.wangcong@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d1967e49
    • P
      net: openvswitch: Set OvS recirc_id from tc chain index · 95a7233c
      Paul Blakey 提交于
      Offloaded OvS datapath rules are translated one to one to tc rules,
      for example the following simplified OvS rule:
      
      recirc_id(0),in_port(dev1),eth_type(0x0800),ct_state(-trk) actions:ct(),recirc(2)
      
      Will be translated to the following tc rule:
      
      $ tc filter add dev dev1 ingress \
      	    prio 1 chain 0 proto ip \
      		flower tcp ct_state -trk \
      		action ct pipe \
      		action goto chain 2
      
      Received packets will first travel though tc, and if they aren't stolen
      by it, like in the above rule, they will continue to OvS datapath.
      Since we already did some actions (action ct in this case) which might
      modify the packets, and updated action stats, we would like to continue
      the proccessing with the correct recirc_id in OvS (here recirc_id(2))
      where we left off.
      
      To support this, introduce a new skb extension for tc, which
      will be used for translating tc chain to ovs recirc_id to
      handle these miss cases. Last tc chain index will be set
      by tc goto chain action and read by OvS datapath.
      Signed-off-by: NPaul Blakey <paulb@mellanox.com>
      Signed-off-by: NVlad Buslov <vladbu@mellanox.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Acked-by: NPravin B Shelar <pshelar@ovn.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      95a7233c
    • Z
      nfp: Drop unnecessary continue in nfp_net_pf_alloc_vnics · 47e25277
      zhong jiang 提交于
      Continue is not needed at the bottom of a loop.
      Signed-off-by: Nzhong jiang <zhongjiang@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      47e25277
  2. 05 9月, 2019 32 次提交