1. 21 6月, 2017 2 次提交
  2. 16 6月, 2017 3 次提交
    • M
      bpf: ixgbe: Report bpf_prog ID during XDP_QUERY_PROG · 4792093e
      Martin KaFai Lau 提交于
      Add support to ixgbe to report bpf_prog ID during XDP_QUERY_PROG.
      Signed-off-by: NMartin KaFai Lau <kafai@fb.com>
      Cc: Alexander Duyck <alexander.h.duyck@intel.com>
      Cc: John Fastabend <john.fastabend@gmail.com>
      Acked-by: NAlexei Starovoitov <ast@fb.com>
      Acked-by: NDaniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4792093e
    • J
      networking: make skb_put & friends return void pointers · 4df864c1
      Johannes Berg 提交于
      It seems like a historic accident that these return unsigned char *,
      and in many places that means casts are required, more often than not.
      
      Make these functions (skb_put, __skb_put and pskb_put) return void *
      and remove all the casts across the tree, adding a (u8 *) cast only
      where the unsigned char pointer was used directly, all done with the
      following spatch:
      
          @@
          expression SKB, LEN;
          typedef u8;
          identifier fn = { skb_put, __skb_put };
          @@
          - *(fn(SKB, LEN))
          + *(u8 *)fn(SKB, LEN)
      
          @@
          expression E, SKB, LEN;
          identifier fn = { skb_put, __skb_put };
          type T;
          @@
          - E = ((T *)(fn(SKB, LEN)))
          + E = fn(SKB, LEN)
      
      which actually doesn't cover pskb_put since there are only three
      users overall.
      
      A handful of stragglers were converted manually, notably a macro in
      drivers/isdn/i4l/isdn_bsdcomp.c and, oddly enough, one of the many
      instances in net/bluetooth/hci_sock.c. In the former file, I also
      had to fix one whitespace problem spatch introduced.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4df864c1
    • J
      networking: introduce and use skb_put_data() · 59ae1d12
      Johannes Berg 提交于
      A common pattern with skb_put() is to just want to memcpy()
      some data into the new space, introduce skb_put_data() for
      this.
      
      An spatch similar to the one for skb_put_zero() converts many
      of the places using it:
      
          @@
          identifier p, p2;
          expression len, skb, data;
          type t, t2;
          @@
          (
          -p = skb_put(skb, len);
          +p = skb_put_data(skb, data, len);
          |
          -p = (t)skb_put(skb, len);
          +p = skb_put_data(skb, data, len);
          )
          (
          p2 = (t2)p;
          -memcpy(p2, data, len);
          |
          -memcpy(p, data, len);
          )
      
          @@
          type t, t2;
          identifier p, p2;
          expression skb, data;
          @@
          t *p;
          ...
          (
          -p = skb_put(skb, sizeof(t));
          +p = skb_put_data(skb, data, sizeof(t));
          |
          -p = (t *)skb_put(skb, sizeof(t));
          +p = skb_put_data(skb, data, sizeof(t));
          )
          (
          p2 = (t2)p;
          -memcpy(p2, data, sizeof(*p));
          |
          -memcpy(p, data, sizeof(*p));
          )
      
          @@
          expression skb, len, data;
          @@
          -memcpy(skb_put(skb, len), data, len);
          +skb_put_data(skb, data, len);
      
      (again, manually post-processed to retain some comments)
      Reviewed-by: NStephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      59ae1d12
  3. 15 6月, 2017 1 次提交
  4. 14 6月, 2017 9 次提交
  5. 13 6月, 2017 1 次提交
    • J
      i40e: fix handling of HW ATR eviction · 6964e53f
      Jacob Keller 提交于
      A recent commit to refactor the driver and remove the hw_disabled_flags
      field accidentally introduced two regressions. First, we overwrote
      pf->flags which removed various key flags including the MSI-X settings.
      
      Additionally, it was intended that we have now two flags,
      HW_ATR_EVICT_CAPABLE and HW_ATR_EVICT_ENABLED, but this was not done,
      and we accidentally were mis-using HW_ATR_EVICT_CAPABLE everywhere.
      
      This patch adds the missing piece, HW_ATR_EVICT_ENABLED, and safely
      updates pf->flags instead of overwriting it.
      
      Without this patch we will have many problems including disabling MSI-X
      support, and we'll attempt to use HW ATR eviction on devices which do
      not support it.
      
      Fixes: 47994c11 ("i40e: remove hw_disabled_flags in favor of using separate flag bits", 2017-04-19)
      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>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6964e53f
  6. 08 6月, 2017 3 次提交
    • J
      net: propagate tc filter chain index down the ndo_setup_tc call · a5fcf8a6
      Jiri Pirko 提交于
      We need to push the chain index down to the drivers, so they have the
      information to which chain the rule belongs. For now, no driver supports
      multichain offload, so only chain 0 is supported. This is needed to
      prevent chain squashes during offload for now. Later this will be used
      to implement multichain offload.
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a5fcf8a6
    • C
      e1000e: Undo e1000e_pm_freeze if __e1000_shutdown fails · 833521eb
      Chris Wilson 提交于
      An error during suspend (e100e_pm_suspend),
      
      [  429.994338] ACPI : EC: event blocked
      [  429.994633] e1000e: EEE TX LPI TIMER: 00000011
      [  430.955451] pci_pm_suspend(): e1000e_pm_suspend+0x0/0x30 [e1000e] returns -2
      [  430.955454] dpm_run_callback(): pci_pm_suspend+0x0/0x140 returns -2
      [  430.955458] PM: Device 0000:00:19.0 failed to suspend async: error -2
      [  430.955581] PM: Some devices failed to suspend, or early wake event detected
      [  430.957709] ACPI : EC: event unblocked
      
      lead to complete failure:
      
      [  432.585002] ------------[ cut here ]------------
      [  432.585013] WARNING: CPU: 3 PID: 8372 at kernel/irq/manage.c:1478 __free_irq+0x9f/0x280
      [  432.585015] Trying to free already-free IRQ 20
      [  432.585016] Modules linked in: cdc_ncm usbnet x86_pkg_temp_thermal intel_powerclamp coretemp mii crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic snd_hda_intel snd_hda_codec snd_hwdep lpc_ich snd_hda_core snd_pcm mei_me mei sdhci_pci sdhci i915 mmc_core e1000e ptp pps_core prime_numbers
      [  432.585042] CPU: 3 PID: 8372 Comm: kworker/u16:40 Tainted: G     U          4.10.0-rc8-CI-Patchwork_3870+ #1
      [  432.585044] Hardware name: LENOVO 2356GCG/2356GCG, BIOS G7ET31WW (1.13 ) 07/02/2012
      [  432.585050] Workqueue: events_unbound async_run_entry_fn
      [  432.585051] Call Trace:
      [  432.585058]  dump_stack+0x67/0x92
      [  432.585062]  __warn+0xc6/0xe0
      [  432.585065]  warn_slowpath_fmt+0x4a/0x50
      [  432.585070]  ? _raw_spin_lock_irqsave+0x49/0x60
      [  432.585072]  __free_irq+0x9f/0x280
      [  432.585075]  free_irq+0x34/0x80
      [  432.585089]  e1000_free_irq+0x65/0x70 [e1000e]
      [  432.585098]  e1000e_pm_freeze+0x7a/0xb0 [e1000e]
      [  432.585106]  e1000e_pm_suspend+0x21/0x30 [e1000e]
      [  432.585113]  pci_pm_suspend+0x71/0x140
      [  432.585118]  dpm_run_callback+0x6f/0x330
      [  432.585122]  ? pci_pm_freeze+0xe0/0xe0
      [  432.585125]  __device_suspend+0xea/0x330
      [  432.585128]  async_suspend+0x1a/0x90
      [  432.585132]  async_run_entry_fn+0x34/0x160
      [  432.585137]  process_one_work+0x1f4/0x6d0
      [  432.585140]  ? process_one_work+0x16e/0x6d0
      [  432.585143]  worker_thread+0x49/0x4a0
      [  432.585145]  kthread+0x107/0x140
      [  432.585148]  ? process_one_work+0x6d0/0x6d0
      [  432.585150]  ? kthread_create_on_node+0x40/0x40
      [  432.585154]  ret_from_fork+0x2e/0x40
      [  432.585156] ---[ end trace 6712df7f8c4b9124 ]---
      
      The unwind failures stems from commit 28002099 ("e1000e: Refactor PM
      flows"), but it may be a later patch that introduced the non-recoverable
      behaviour.
      
      Fixes: 28002099 ("e1000e: Refactor PM flows")
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99847Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Tested-by: NAaron Brown <aaron.f.brown@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      833521eb
    • C
      igb: make a few local functions static · b476deab
      Colin Ian King 提交于
      Clean up a few sparse warnings, these following
      functions can be made static:
      
      drivers/net/ethernet/intel/igb/igb_main.c: warning: symbol
        'igb_add_mac_filter' was not declared. Should it be static?
      drivers/net/ethernet/intel/igb/igb_main.c: warning: symbol
        'igb_del_mac_filter' was not declared. Should it be static?
      drivers/net/ethernet/intel/igb/igb_main.c: warning: symbol
        'igb_set_vf_mac_filter' was not declared. Should it be static?
      Signed-off-by: NColin Ian King <colin.king@canonical.com>
      Tested-by: NAaron Brown <aaron.f.brown@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      b476deab
  7. 06 6月, 2017 13 次提交
  8. 05 6月, 2017 1 次提交
  9. 02 6月, 2017 7 次提交