1. 02 11月, 2017 1 次提交
  2. 26 10月, 2017 1 次提交
  3. 21 10月, 2017 2 次提交
  4. 18 10月, 2017 1 次提交
  5. 10 10月, 2017 4 次提交
  6. 09 10月, 2017 2 次提交
  7. 27 9月, 2017 2 次提交
    • D
      bpf, ixgbe: add meta data support · 366a88fe
      Daniel Borkmann 提交于
      Implement support for transferring XDP meta data into skb for
      ixgbe driver; before calling into the program, xdp.data_meta points
      to xdp.data, where on program return with pass verdict, we call
      into skb_metadata_set().
      
      We implement this for the default ixgbe_build_skb() variant. For the
      ixgbe_construct_skb() that is used when legacy-rx buffer mananagement
      mode is turned on via ethtool, I found that XDP gets 0 headroom, so
      neither xdp_adjust_head() nor xdp_adjust_meta() can be used with this.
      Just add a comment with explanation for this operating mode.
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: NAlexei Starovoitov <ast@kernel.org>
      Acked-by: NJohn Fastabend <john.fastabend@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      366a88fe
    • D
      bpf: add meta pointer for direct access · de8f3a83
      Daniel Borkmann 提交于
      This work enables generic transfer of metadata from XDP into skb. The
      basic idea is that we can make use of the fact that the resulting skb
      must be linear and already comes with a larger headroom for supporting
      bpf_xdp_adjust_head(), which mangles xdp->data. Here, we base our work
      on a similar principle and introduce a small helper bpf_xdp_adjust_meta()
      for adjusting a new pointer called xdp->data_meta. Thus, the packet has
      a flexible and programmable room for meta data, followed by the actual
      packet data. struct xdp_buff is therefore laid out that we first point
      to data_hard_start, then data_meta directly prepended to data followed
      by data_end marking the end of packet. bpf_xdp_adjust_head() takes into
      account whether we have meta data already prepended and if so, memmove()s
      this along with the given offset provided there's enough room.
      
      xdp->data_meta is optional and programs are not required to use it. The
      rationale is that when we process the packet in XDP (e.g. as DoS filter),
      we can push further meta data along with it for the XDP_PASS case, and
      give the guarantee that a clsact ingress BPF program on the same device
      can pick this up for further post-processing. Since we work with skb
      there, we can also set skb->mark, skb->priority or other skb meta data
      out of BPF, thus having this scratch space generic and programmable
      allows for more flexibility than defining a direct 1:1 transfer of
      potentially new XDP members into skb (it's also more efficient as we
      don't need to initialize/handle each of such new members). The facility
      also works together with GRO aggregation. The scratch space at the head
      of the packet can be multiple of 4 byte up to 32 byte large. Drivers not
      yet supporting xdp->data_meta can simply be set up with xdp->data_meta
      as xdp->data + 1 as bpf_xdp_adjust_meta() will detect this and bail out,
      such that the subsequent match against xdp->data for later access is
      guaranteed to fail.
      
      The verifier treats xdp->data_meta/xdp->data the same way as we treat
      xdp->data/xdp->data_end pointer comparisons. The requirement for doing
      the compare against xdp->data is that it hasn't been modified from it's
      original address we got from ctx access. It may have a range marking
      already from prior successful xdp->data/xdp->data_end pointer comparisons
      though.
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: NAlexei Starovoitov <ast@kernel.org>
      Acked-by: NJohn Fastabend <john.fastabend@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      de8f3a83
  8. 25 8月, 2017 1 次提交
  9. 19 8月, 2017 2 次提交
  10. 12 8月, 2017 1 次提交
  11. 08 8月, 2017 4 次提交
  12. 05 8月, 2017 1 次提交
  13. 26 7月, 2017 1 次提交
  14. 18 7月, 2017 3 次提交
  15. 16 6月, 2017 1 次提交
  16. 14 6月, 2017 5 次提交
  17. 08 6月, 2017 1 次提交
  18. 31 5月, 2017 6 次提交
    • T
      ixgbe: Resolve warnings for -Wimplicit-fallthrough · 93df9465
      Tony Nguyen 提交于
      This patch adds/changes fall through comments to address new warnings
      produced by gcc 7.
      
      Fixed formatting on a couple of comments in the function.
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      93df9465
    • T
      ixgbe: Resolve truncation warning for q_vector->name · e61e4c8b
      Tony Nguyen 提交于
      The following warning is now shown as a result of new checks added for
      gcc 7:
      
      drivers/net/ethernet/intel/ixgbe/ixgbe_main.c: In function ‘ixgbe_open’:
      drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:3118:13: warning: ‘%d’ directive output may be truncated writing between 1 and 10 bytes into a region of size between 3 and 18 [-Wformat-truncation=]
            "%s-%s-%d", netdev->name, "TxRx", ri++);
                   ^~
      drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:3118:6: note: directive argument in the range [0, 2147483647]
            "%s-%s-%d", netdev->name, "TxRx", ri++);
            ^~~~~~~~~~
      drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:3117:4: note: ‘snprintf’ output between 8 and 32 bytes into a destination of size 24
          snprintf(q_vector->name, sizeof(q_vector->name) - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            "%s-%s-%d", netdev->name, "TxRx", ri++);
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
      Resolve this warning by making a couple of changes.
       - Don't reserve space for the null terminator.  Since snprintf adds the
         null terminator automatically, there is no need for us to reserve a byte
         for it.
      
       - Change a couple variables that can never be negative from int to
         unsigned int.
      
      While we're making changes to the format string, move the constant strings
      into the format string instead of providing them as specifiers.
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      e61e4c8b
    • M
      ixgbe: Correct thermal sensor event check · 22cb4fff
      Mark Rustad 提交于
      The thermal sensor event logic is messed up, because it can execute
      the code when there is no thermal event. The current logic is that
      it will exit when !capable && !event whereas it really should exit
      when !capable || !event. For one thing, it means that the service
      task is doing too much work. It probably has some other symptoms as
      well. So, correct the logic, simplifying to only execute when there
      is a thermal event. The capable check is redundant.
      Signed-off-by: NMark Rustad <mark.d.rustad@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      22cb4fff
    • E
      ixgbe: enable L3/L4 filtering for Tx switched packets · e6b41c88
      Emil Tantilov 提交于
      This will ensure that VF-to-VF traffic on the same PF
      is filtered to allow RSS operation.
      Signed-off-by: NEmil Tantilov <emil.s.tantilov@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      e6b41c88
    • L
      ixgbe: initialize u64_stats_sync structures early at ixgbe_probe · b09457e7
      Liwei Song 提交于
      Fix the following CallTrace:
      INFO: trying to register non-static key.
      the code is fine but needs lockdep annotation.
      turning off the locking correctness validator.
      CPU: 71 PID: 1 Comm: swapper/0 Not tainted 4.8.8-WR9.0.0.1_standard #11
      Hardware name: Intel Corporation S2600WTT/S2600WTT,
      BIOS GRNDSDP1.86B.0036.R05.1407140519 07/14/2014
       00200086 00200086 eb5e1ab8 c144dd70 00000000 00000000 eb5e1af8 c10af89a
       c1d23de4 eb5e1af8 00000009 eb5d8600 eb5d8638 eb5e1af8 c10b14d8 00000009
       0000000a c1d32911 00000000 00000000 e44c826c eb5d8000 eb5e1b74 c10b214e
      Call Trace:
       [<c144dd70>] dump_stack+0x5f/0x8f
       [<c10af89a>] register_lock_class+0x25a/0x4c0
       [<c10b14d8>] ? check_irq_usage+0x88/0xc0
       [<c10b214e>] __lock_acquire+0x5e/0x17a0
       [<c1abdb9b>] ? _raw_spin_unlock_irqrestore+0x3b/0x70
       [<c10cf14a>] ? rcu_read_lock_sched_held+0x8a/0x90
       [<c10b3c5f>] lock_acquire+0x9f/0x1f0
       [<c1922dcf>] ? dev_get_stats+0x5f/0x110
       [<c176e6b3>] ixgbe_get_stats64+0x113/0x320
       [<c1922dcf>] ? dev_get_stats+0x5f/0x110
       [<c1922dcf>] dev_get_stats+0x5f/0x110
       [<c1ab5415>] rtnl_fill_stats+0x40/0x105
       [<c193dd45>] rtnl_fill_ifinfo+0x4c5/0xd20
       [<c11c5115>] ? __kmalloc_node_track_caller+0x1a5/0x410
       [<c1917487>] ? __kmalloc_reserve.isra.42+0x27/0x80
       [<c191754f>] ? __alloc_skb+0x6f/0x270
       [<c1942291>] rtmsg_ifinfo_build_skb+0x71/0xd0
       [<c194230a>] rtmsg_ifinfo.part.23+0x1a/0x50
       [<c1923dad>] ? call_netdevice_notifiers_info+0x2d/0x60
       [<c194236b>] rtmsg_ifinfo+0x2b/0x40
       [<c192f997>] register_netdevice+0x3d7/0x4d0
       [<c192faa7>] register_netdev+0x17/0x30
       [<c177b83d>] ixgbe_probe+0x118d/0x1610
       [<c1498202>] local_pci_probe+0x32/0x80
       [<c1498172>] ? pci_match_device+0xd2/0x100
       [<c14991e0>] pci_device_probe+0xc0/0x110
       [<c1652cc5>] driver_probe_device+0x1c5/0x280
       [<c1498172>] ? pci_match_device+0xd2/0x100
       [<c1652e09>] __driver_attach+0x89/0x90
       [<c1652d80>] ? driver_probe_device+0x280/0x280
       [<c165114f>] bus_for_each_dev+0x4f/0x80
       [<c165269e>] driver_attach+0x1e/0x20
       [<c1652d80>] ? driver_probe_device+0x280/0x280
       [<c1652317>] bus_add_driver+0x1a7/0x220
       [<c1653a79>] driver_register+0x59/0xe0
       [<c1f897b8>] ? igb_init_module+0x49/0x49
       [<c1497b2a>] __pci_register_driver+0x4a/0x50
       [<c1f8985d>] ixgbe_init_module+0xa5/0xc4
       [<c1000485>] do_one_initcall+0x35/0x150
       [<c107e818>] ? parameq+0x18/0x70
       [<c1f395d8>] ? repair_env_string+0x12/0x51
       [<c107ead0>] ? parse_args+0x260/0x3b0
       [<c1074f73>] ? __usermodehelper_set_disable_depth+0x43/0x50
       [<c1f39e90>] kernel_init_freeable+0x19b/0x267
       [<c1f395c6>] ? set_debug_rodata+0xf/0xf
       [<c10b1e7b>] ? trace_hardirqs_on+0xb/0x10
       [<c1abdc02>] ? _raw_spin_unlock_irq+0x32/0x50
       [<c1085f0b>] ? finish_task_switch+0xab/0x1f0
       [<c1085ec9>] ? finish_task_switch+0x69/0x1f0
       [<c1ab6a30>] kernel_init+0x10/0x110
       [<c108bd65>] ? schedule_tail+0x25/0x80
       [<c1abe422>] ret_from_kernel_thread+0xe/0x24
       [<c1ab6a20>] ? rest_init+0x130/0x130
      
      This CallTrace occurred on 32-bit kernel with CONFIG_PROVE_LOCKING
      enabled.
      
      This happens at ixgbe driver probe hardware stage, when comes to
      ixgbe_get_stats64, the seqcount/seqlock still not initialize, although
      this was initialize in TX/RX resources setup routin, but it was too late,
      then lockdep give this Warning.
      
      To fix this, move the u64_stats_init function to driver probe stage,
      which before we get the status of seqcount and after the RX/TX ring
      was finished init.
      Signed-off-by: NLiwei Song <liwei.song@windriver.com>
      Tested-by: NKrishneil Singh  <krishneil.k.singh@intel.com>
      b09457e7
    • S
      ixgbe/ixgbevf: Enables TSO for MPLS encapsulated packets · 2a20525b
      Scott Peterson 提交于
      This patch advertises TSO & GSO features in netdev->mpls_features.
      In ixgbe(vf)_tso() where we set up segmentation offload, the IP
      header will be the inner network header when eth_p_mpls() indicates
      the Ethernet protocol is MPLS (UC or MC).
      Suggested-by: NAlexander Duyck <alexander.h.duyck@intel.com>
      Signed-off-by: NScott Peterson <scott.d.peterson@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      2a20525b
  19. 30 4月, 2017 1 次提交