1. 17 9月, 2019 10 次提交
    • D
      Merge branch 'drop_monitor-Better-sanitize-notified-packets' · f432c2e3
      David S. Miller 提交于
      Ido Schimmel says:
      
      ====================
      drop_monitor: Better sanitize notified packets
      
      When working in 'packet' mode, drop monitor generates a notification
      with a potentially truncated payload of the dropped packet. The payload
      is copied from the MAC header, but I forgot to check that the MAC header
      was set, so do it now.
      
      Patch #1 sets the offsets to the various protocol layers in netdevsim,
      so that it will continue to work after the MAC header check is added to
      drop monitor in patch #2.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f432c2e3
    • I
      drop_monitor: Better sanitize notified packets · bef17466
      Ido Schimmel 提交于
      When working in 'packet' mode, drop monitor generates a notification
      with a potentially truncated payload of the dropped packet. The payload
      is copied from the MAC header, but I forgot to check that the MAC header
      was set, so do it now.
      
      Fixes: ca30707d ("drop_monitor: Add packet alert mode")
      Fixes: 5e58109b ("drop_monitor: Add support for packet alert mode for hardware drops")
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bef17466
    • I
      netdevsim: Set offsets to various protocol layers · 58a406de
      Ido Schimmel 提交于
      The driver periodically generates "trapped" UDP packets that it then
      passes on to devlink. Set the offsets to the various protocol layers.
      
      This is a prerequisite to the next patch, where drop monitor is taught
      to check that the offset to the MAC header was set.
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      58a406de
    • D
      Merge branch 'tc-taprio-offload-for-SJA1105-DSA' · db539cae
      David S. Miller 提交于
      Vladimir Oltean says:
      
      ====================
      tc-taprio offload for SJA1105 DSA
      
      This is the third attempt to submit the tc-taprio offload model for
      inclusion in the networking tree. The sja1105 switch driver will provide
      the first implementation of the offload. Only the bare minimum is added:
      
      - The offload model and a DSA pass-through
      - The hardware implementation
      - The interaction with the netdev queues in the tagger code
      - Documentation
      
      What has been removed from previous attempts is support for
      PTP-as-clocksource in sja1105, as well as configuring the traffic class
      for management traffic.  These will be added as soon as the offload
      model is settled.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      db539cae
    • V
      docs: net: dsa: sja1105: Add info about the Time-Aware Scheduler · 7c95afa4
      Vladimir Oltean 提交于
      While not an exhaustive usage tutorial, this describes the details
      needed to build more complex scenarios.
      Signed-off-by: NVladimir Oltean <olteanv@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7c95afa4
    • V
      net: dsa: sja1105: Configure the Time-Aware Scheduler via tc-taprio offload · 317ab5b8
      Vladimir Oltean 提交于
      This qdisc offload is the closest thing to what the SJA1105 supports in
      hardware for time-based egress shaping. The switch core really is built
      around SAE AS6802/TTEthernet (a TTTech standard) but can be made to
      operate similarly to IEEE 802.1Qbv with some constraints:
      
      - The gate control list is a global list for all ports. There are 8
        execution threads that iterate through this global list in parallel.
        I don't know why 8, there are only 4 front-panel ports.
      
      - Care must be taken by the user to make sure that two execution threads
        never get to execute a GCL entry simultaneously. I created a O(n^4)
        checker for this hardware limitation, prior to accepting a taprio
        offload configuration as valid.
      
      - The spec says that if a GCL entry's interval is shorter than the frame
        length, you shouldn't send it (and end up in head-of-line blocking).
        Well, this switch does anyway.
      
      - The switch has no concept of ADMIN and OPER configurations. Because
        it's so simple, the TAS settings are loaded through the static config
        tables interface, so there isn't even place for any discussion about
        'graceful switchover between ADMIN and OPER'. You just reset the
        switch and upload a new OPER config.
      
      - The switch accepts multiple time sources for the gate events. Right
        now I am using the standalone clock source as opposed to PTP. So the
        base time parameter doesn't really do much. Support for the PTP clock
        source will be added in a future series.
      Signed-off-by: NVladimir Oltean <olteanv@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      317ab5b8
    • V
      net: dsa: sja1105: Advertise the 8 TX queues · 5f06c63b
      Vladimir Oltean 提交于
      This is a preparation patch for the tc-taprio offload (and potentially
      for other future offloads such as tc-mqprio).
      
      Instead of looking directly at skb->priority during xmit, let's get the
      netdev queue and the queue-to-traffic-class mapping, and put the
      resulting traffic class into the dsa_8021q PCP field. The switch is
      configured with a 1-to-1 PCP-to-ingress-queue-to-egress-queue mapping
      (see vlan_pmap in sja1105_main.c), so the effect is that we can inject
      into a front-panel's egress traffic class through VLAN tagging from
      Linux, completely transparently.
      
      Unfortunately the switch doesn't look at the VLAN PCP in the case of
      management traffic to/from the CPU (link-local frames at
      01-80-C2-xx-xx-xx or 01-1B-19-xx-xx-xx) so we can't alter the
      transmission queue of this type of traffic on a frame-by-frame basis. It
      is only selected through the "hostprio" setting which ATM is harcoded in
      the driver to 7.
      Signed-off-by: NVladimir Oltean <olteanv@gmail.com>
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5f06c63b
    • V
      net: dsa: sja1105: Add static config tables for scheduling · 7f1e4ba8
      Vladimir Oltean 提交于
      In order to support tc-taprio offload, the TTEthernet egress scheduling
      core registers must be made visible through the static interface.
      Signed-off-by: NVladimir Oltean <olteanv@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7f1e4ba8
    • V
      net: dsa: Pass ndo_setup_tc slave callback to drivers · 47d23af2
      Vladimir Oltean 提交于
      DSA currently handles shared block filters (for the classifier-action
      qdisc) in the core due to what I believe are simply pragmatic reasons -
      hiding the complexity from drivers and offerring a simple API for port
      mirroring.
      
      Extend the dsa_slave_setup_tc function by passing all other qdisc
      offloads to the driver layer, where the driver may choose what it
      implements and how. DSA is simply a pass-through in this case.
      Signed-off-by: NVladimir Oltean <olteanv@gmail.com>
      Acked-by: NKurt Kanzenbach <kurt@linutronix.de>
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Acked-by: NIlias Apalodimas <ilias.apalodimas@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      47d23af2
    • V
      taprio: Add support for hardware offloading · 9c66d156
      Vinicius Costa Gomes 提交于
      This allows taprio to offload the schedule enforcement to capable
      network cards, resulting in more precise windows and less CPU usage.
      
      The gate mask acts on traffic classes (groups of queues of same
      priority), as specified in IEEE 802.1Q-2018, and following the existing
      taprio and mqprio semantics.
      It is up to the driver to perform conversion between tc and individual
      netdev queues if for some reason it needs to make that distinction.
      
      Full offload is requested from the network interface by specifying
      "flags 2" in the tc qdisc creation command, which in turn corresponds to
      the TCA_TAPRIO_ATTR_FLAG_FULL_OFFLOAD bit.
      
      The important detail here is the clockid which is implicitly /dev/ptpN
      for full offload, and hence not configurable.
      
      A reference counting API is added to support the use case where Ethernet
      drivers need to keep the taprio offload structure locally (i.e. they are
      a multi-port switch driver, and configuring a port depends on the
      settings of other ports as well). The refcount_t variable is kept in a
      private structure (__tc_taprio_qopt_offload) and not exposed to drivers.
      
      In the future, the private structure might also be expanded with a
      backpointer to taprio_sched *q, to implement the notification system
      described in the patch (of when admin became oper, or an error occurred,
      etc, so the offload can be monitored with 'tc qdisc show').
      Signed-off-by: NVinicius Costa Gomes <vinicius.gomes@intel.com>
      Signed-off-by: NVoon Weifeng <weifeng.voon@intel.com>
      Signed-off-by: NVladimir Oltean <olteanv@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9c66d156
  2. 16 9月, 2019 25 次提交
  3. 15 9月, 2019 5 次提交
    • D
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · aa2eaa8c
      David S. Miller 提交于
      Minor overlapping changes in the btusb and ixgbe drivers.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      aa2eaa8c
    • L
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 1609d760
      Linus Torvalds 提交于
      Pull kvm fixes from Paolo Bonzini:
       "The main change here is a revert of reverts. We recently simplified
        some code that was thought unnecessary; however, since then KVM has
        grown quite a few cond_resched()s and for that reason the simplified
        code is prone to livelocks---one CPUs tries to empty a list of guest
        page tables while the others keep adding to them. This adds back the
        generation-based zapping of guest page tables, which was not
        unnecessary after all.
      
        On top of this, there is a fix for a kernel memory leak and a couple
        of s390 fixlets as well"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: x86/mmu: Reintroduce fast invalidate/zap for flushing memslot
        KVM: x86: work around leak of uninitialized stack contents
        KVM: nVMX: handle page fault in vmread
        KVM: s390: Do not leak kernel stack data in the KVM_S390_INTERRUPT ioctl
        KVM: s390: kvm_s390_vm_start_migration: check dirty_bitmap before using it as target for memset()
      1609d760
    • L
      Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost · 1f9c632c
      Linus Torvalds 提交于
      Pull virtio fix from Michael Tsirkin:
       "A last minute revert
      
        The 32-bit build got broken by the latest defence in depth patch.
        Revert and we'll try again in the next cycle"
      
      * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
        Revert "vhost: block speculation of translated descriptors"
      1f9c632c
    • L
      Merge tag 'riscv/for-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · b03c036e
      Linus Torvalds 提交于
      Pull RISC-V fix from Paul Walmsley:
       "Last week, Palmer and I learned that there was an error in the RISC-V
        kernel image header format that could make it less compatible with the
        ARM64 kernel image header format. I had missed this error during my
        original reviews of the patch.
      
        The kernel image header format is an interface that impacts
        bootloaders, QEMU, and other user tools. Those packages must be
        updated to align with whatever is merged in the kernel. We would like
        to avoid proliferating these image formats by keeping the RISC-V
        header as close as possible to the existing ARM64 header. Since the
        arch/riscv patch that adds support for the image header was merged
        with our v5.3-rc1 pull request as commit 0f327f2a ("RISC-V: Add
        an Image header that boot loader can parse."), we think it wise to try
        to fix this error before v5.3 is released.
      
        The fix itself should be backwards-compatible with any project that
        has already merged support for premature versions of this interface.
        It primarily involves ensuring that the RISC-V image header has
        something useful in the same field as the ARM64 image header"
      
      * tag 'riscv/for-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
        riscv: modify the Image header to improve compatibility with the ARM64 header
      b03c036e
    • M
      Revert "vhost: block speculation of translated descriptors" · 0d4a3f2a
      Michael S. Tsirkin 提交于
      This reverts commit a89db445.
      
      I was hasty to include this patch, and it breaks the build on 32 bit.
      Defence in depth is good but let's do it properly.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      0d4a3f2a