1. 06 Aug, 2019 32 commits
    • David S. Miller's avatar
      Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue · 05bb5203
      David S. Miller authored
      Jeff Kirsher says:
      
      ====================
      40GbE Intel Wired LAN Driver Updates 2019-08-05
      
      This series contains updates to i40e driver only.
      
      Dmitrii adds missing statistic counters for VEB and VEB TC's.
      
      Slawomir adds support for logging the "Disable Firmware LLDP" flag
      option and its current status.
      
      Jake fixes an issue where VF's being notified of their link status
      before their queues are enabled which was causing issues.  So always
      report link status down when the VF queues are not enabled.  Also adds
      future proofing when statistics are added or removed by adding checks to
      ensure the data pointer for the strings lines up with the expected
      statistics count.
      
      Czeslaw fixes the advertised mode reported in ethtool for FEC, where the
      "None BaseR RS" was always being displayed no matter what the mode it
      was in.  Also added logging information when the PF is entering or
      leaving "allmulti" (or promiscuous) mode.  Fixed up the logging logic
      for VF's when leaving multicast mode to not include unicast as well.
      
      v2: drop Aleksandr's patch (previously patch #2 in the series) to
          display the VF MAC address that is set by the VF while community
          feedback is addressed.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      05bb5203
    • Yifeng Sun's avatar
      openvswitch: Print error when ovs_execute_actions() fails · aa733660
      Yifeng Sun authored
      Currently in function ovs_dp_process_packet(), return values of
      ovs_execute_actions() are silently discarded. This patch prints out
      an debug message when error happens so as to provide helpful hints
      for debugging.
      Acked-by: default avatarPravin B Shelar <pshelar@ovn.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      aa733660
    • David S. Miller's avatar
      Merge branch 'Support-tunnels-over-VLAN-in-NFP' · ef68de56
      David S. Miller authored
      John Hurley says:
      
      ====================
      Support tunnels over VLAN in NFP
      
      This patchset deals with tunnel encap and decap when the end-point IP
      address is on an internal port (for example and OvS VLAN port). Tunnel
      encap without VLAN is already supported in the NFP driver. This patchset
      extends that to include a push VLAN along with tunnel header push.
      
      Patches 1-4 extend the flow_offload IR API to include actions that use
      skbedit to set the ptype of an SKB and that send a packet to port ingress
      from the act_mirred module. Such actions are used in flower rules that
      forward tunnel packets to internal ports where they can be decapsulated.
      OvS and its TC API is an example of a user-space app that produces such
      rules.
      
      Patch 5 modifies the encap offload code to allow the pushing of a VLAN
      header after a tunnel header push.
      
      Patches 6-10 deal with tunnel decap when the end-point is on an internal
      port. They detect 'pre-tunnel rules' which do not deal with tunnels
      themselves but, rather, forward packets to internal ports where they
      can be decapped if required. Such rules are offloaded to a table in HW
      along with an indication of whether packets need to be passed to this
      table of not (based on their destination MAC address). Matching against
      this table prior to decapsulation in HW allows the correct parsing and
      handling of outer VLANs on tunnelled packets and the correct updating of
      stats for said 'pre-tunnel' rules.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ef68de56
    • John Hurley's avatar
      nfp: flower: encode mac indexes with pre-tunnel rule check · 2e0bc7f3
      John Hurley authored
      When a tunnel packet arrives on the NFP card, its destination MAC is
      looked up and MAC index returned for it. This index can help verify the
      tunnel by, for example, ensuring that the packet arrived on the expected
      port. If the packet is destined for a known MAC that is not connected to a
      given physical port then the mac index can have a global value (e.g. when
      a series of bonded ports shared the same MAC).
      
      If the packet is to be detunneled at a bridge device or internal port like
      an Open vSwitch VLAN port, then it should first match a 'pre-tunnel' rule
      to direct it to that internal port.
      
      Use the MAC index to indicate if a packet should match a pre-tunnel rule
      before decap is allowed. Do this by tracking the number of internal ports
      associated with a MAC address and, if the number if >0, set a bit in the
      mac_index to forward the packet to the pre-tunnel table before continuing
      with decap.
      Signed-off-by: default avatarJohn Hurley <john.hurley@netronome.com>
      Reviewed-by: default avatarSimon Horman <simon.horman@netronome.com>
      Acked-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2e0bc7f3
    • John Hurley's avatar
      nfp: flower: remove offloaded MACs when reprs are applied to OvS bridges · 09aa811b
      John Hurley authored
      MAC addresses along with an identifying index are offloaded to firmware to
      allow tunnel decapsulation. If a tunnel packet arrives with a matching
      destination MAC address and a verified index, it can continue on the
      decapsulation process. This replicates the MAC verifications carried out
      in the kernel network stack.
      
      When a netdev is added to a bridge (e.g. OvS) then packets arriving on
      that dev are directed through the bridge datapath instead of passing
      through the network stack. Therefore, tunnelled packets matching the MAC
      of that dev will not be decapped here.
      
      Replicate this behaviour on firmware by removing offloaded MAC addresses
      when a MAC representer is added to an OvS bridge. This can prevent any
      false positive tunnel decaps.
      Signed-off-by: default avatarJohn Hurley <john.hurley@netronome.com>
      Reviewed-by: default avatarSimon Horman <simon.horman@netronome.com>
      Acked-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      09aa811b
    • John Hurley's avatar
      nfp: flower: offload pre-tunnel rules · f12725d9
      John Hurley authored
      Pre-tunnel rules are TC flower and OvS rules that forward a packet to the
      tunnel end point where it can then pass through the network stack and be
      decapsulated. These are required if the tunnel end point is, say, an OvS
      internal port.
      
      Currently, firmware determines that a packet is in a tunnel and decaps it
      if it has a known destination IP and MAC address. However, this bypasses
      the flower pre-tunnel rule and so does not update the stats. Further to
      this it ignores VLANs that may exist outside of the tunnel header.
      
      Offload pre-tunnel rules to the NFP. This embeds the pre-tunnel rule into
      the tunnel decap process based on (firmware) mac index and VLAN. This
      means that decap can be carried out correctly with VLANs and that stats
      can be updated for all kernel rules correctly.
      Signed-off-by: default avatarJohn Hurley <john.hurley@netronome.com>
      Reviewed-by: default avatarSimon Horman <simon.horman@netronome.com>
      Acked-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f12725d9
    • John Hurley's avatar
      nfp: flower: verify pre-tunnel rules · 120ffd84
      John Hurley authored
      Pre-tunnel rules must direct packets to an internal port based on L2
      information. Rules that egress to an internal port are already indicated
      by a non-NULL device in its nfp_fl_payload struct. Verfiy the rest of the
      match fields indicate that the rule is a pre-tunnel rule. This requires a
      full match on the destination MAC address, an option VLAN field, and no
      specific matches on other lower layer fields (with the exception of L4
      proto and flags).
      
      If a rule is identified as a pre-tunnel rule then mark it for offload to
      the pre-tunnel table. Similarly, remove it from the pre-tunnel table on
      rule deletion. The actual offloading of these commands is left to a
      following patch.
      Signed-off-by: default avatarJohn Hurley <john.hurley@netronome.com>
      Reviewed-by: default avatarSimon Horman <simon.horman@netronome.com>
      Acked-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      120ffd84
    • John Hurley's avatar
      nfp: flower: detect potential pre-tunnel rules · f5c977ee
      John Hurley authored
      Pre-tunnel rules are used when the tunnel end-point is on an 'internal
      port'. These rules are used to direct the tunnelled packets (based on outer
      header fields) to the internal port where they can be detunnelled. The
      rule must send the packet to ingress the internal port at the TC layer.
      
      Currently FW does not support an action to send to ingress so cannot
      offload such rules. However, in preparation for populating the pre-tunnel
      table to represent such rules, check for rules that send to the ingress of
      an internal port and mark them as such. Further validation of such rules
      is left to subsequent patches.
      Signed-off-by: default avatarJohn Hurley <john.hurley@netronome.com>
      Reviewed-by: default avatarSimon Horman <simon.horman@netronome.com>
      Acked-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f5c977ee
    • John Hurley's avatar
      nfp: flower: push vlan after tunnel in merge · 4b10c53d
      John Hurley authored
      NFP allows the merging of 2 flows together into a single offloaded flow.
      In the kernel datapath the packet must match 1 flow, impliment its
      actions, recirculate, match the 2nd flow and also impliment its actions.
      Merging creates a single flow with all actions from the 2 original flows.
      
      Firmware impliments a tunnel header push as the packet is about to egress
      the card. Therefore, if the first merge rule candiate pushes a tunnel,
      then the second rule can only have an egress action for a valid merge to
      occur (or else the action ordering will be incorrect). This prevents the
      pushing of a tunnel header followed by the pushing of a vlan header.
      
      In order to support this behaviour, firmware allows VLAN information to
      be encoded in the tunnel push action. If this is non zero then the fw will
      push a VLAN after the tunnel header push meaning that 2 such flows with
      these actions can be merged (with action order being maintained).
      
      Support tunnel in VLAN pushes by encoding VLAN information in the tunnel
      push action of any merge flow requiring this.
      Signed-off-by: default avatarJohn Hurley <john.hurley@netronome.com>
      Reviewed-by: default avatarSimon Horman <simon.horman@netronome.com>
      Acked-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4b10c53d
    • John Hurley's avatar
      net: sched: add ingress mirred action to hardware IR · 48e584ac
      John Hurley authored
      TC mirred actions (redirect and mirred) can send to egress or ingress of a
      device. Currently only egress is used for hw offload rules.
      
      Modify the intermediate representation for hw offload to include mirred
      actions that go to ingress. This gives drivers access to such rules and
      can decide whether or not to offload them.
      Signed-off-by: default avatarJohn Hurley <john.hurley@netronome.com>
      Reviewed-by: default avatarSimon Horman <simon.horman@netronome.com>
      Reviewed-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      48e584ac
    • John Hurley's avatar
      net: tc_act: add helpers to detect ingress mirred actions · d7609c96
      John Hurley authored
      TC mirred actions can send to egress or ingress on a given netdev. Helpers
      exist to detect actions that are mirred to egress. Extend the header file
      to include helpers to detect ingress mirred actions.
      Signed-off-by: default avatarJohn Hurley <john.hurley@netronome.com>
      Reviewed-by: default avatarSimon Horman <simon.horman@netronome.com>
      Reviewed-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d7609c96
    • John Hurley's avatar
      net: sched: add skbedit of ptype action to hardware IR · fb1b775a
      John Hurley authored
      TC rules can impliment skbedit actions. Currently actions that modify the
      skb mark are passed to offloading drivers via the hardware intermediate
      representation in the flow_offload API.
      
      Extend this to include skbedit actions that modify the packet type of the
      skb. Such actions may be used to set the ptype to HOST when redirecting a
      packet to ingress.
      Signed-off-by: default avatarJohn Hurley <john.hurley@netronome.com>
      Reviewed-by: default avatarSimon Horman <simon.horman@netronome.com>
      Reviewed-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fb1b775a
    • John Hurley's avatar
      net: tc_act: add skbedit_ptype helper functions · 77feb4ee
      John Hurley authored
      The tc_act header file contains an inline function that checks if an
      action is changing the skb mark of a packet and a further function to
      extract the mark.
      
      Add similar functions to check for and get skbedit actions that modify
      the packet type of the skb.
      Signed-off-by: default avatarJohn Hurley <john.hurley@netronome.com>
      Reviewed-by: default avatarSimon Horman <simon.horman@netronome.com>
      Reviewed-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      77feb4ee
    • David S. Miller's avatar
      Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue · 55a47dc2
      David S. Miller authored
      Jeff Kirsher says:
      
      ====================
      100GbE Intel Wired LAN Driver Updates 2019-08-04
      
      This series contains more updates to fm10k from Jake Keller.
      
      Jake removes the unnecessary initialization of some variables to help
      resolve static code checker warnings.  Explicitly return success during
      resume, since the value of 'err' is always success.  Fixed a issue with
      incrementing a void pointer, which can produce undefined behavior.  Used
      the __always_unused macro for function templates that are passed as
      parameters in functions, but are not used.  Simplified the code by
      removing an unnecessary macro in determining the value of NON_Q_VECTORS.
      Fixed an issue, using bitwise operations to prevent the low address
      overwriting the high portion of the address.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      55a47dc2
    • Heiner Kallweit's avatar
      r8169: sync PCIe PHY init with vendor driver 8.047.01 · a7a92cf8
      Heiner Kallweit authored
      Synchronize PCIe PHY initialization with vendor driver version 8.047.01.
      Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a7a92cf8
    • Heiner Kallweit's avatar
      r8169: add helper r8168_mac_ocp_modify · ef712ede
      Heiner Kallweit authored
      Add a helper for MAC OCP read-modify-write operations.
      Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ef712ede
    • Heiner Kallweit's avatar
      r8169: remove access to legacy register MultiIntr · a14cc4d2
      Heiner Kallweit authored
      This code piece was inherited from RTL8139 code, the register at
      address 0x5c however has a different meaning on RTL8169 and is unused.
      So we can remove this.
      Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a14cc4d2
    • David S. Miller's avatar
      Merge branch 'fq_codel-small-optimizations' · 2af8cfac
      David S. Miller authored
      Dave Taht says:
      
      ====================
      Two small fq_codel optimizations
      
      These two patches improve fq_codel performance
      under extreme network loads. The first patch
      more rapidly escalates the codel count under
      overload, the second just kills a totally useless
      statistic.
      
      (sent together because they'd otherwise conflict)
      ====================
      Signed-off-by: default avatarDave Taht <dave.taht@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2af8cfac
    • Dave Taht's avatar
      fq_codel: Kill useless per-flow dropped statistic · 77ddaff2
      Dave Taht authored
      It is almost impossible to get anything other than a 0 out of
      flow->dropped statistic with a tc class dump, as it resets to 0
      on every round.
      
      It also conflates ecn marks with drops.
      
      It would have been useful had it kept a cumulative drop count, but
      it doesn't. This patch doesn't change the API, it just stops
      tracking a stat and state that is impossible to measure and nobody
      uses.
      Signed-off-by: default avatarDave Taht <dave.taht@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      77ddaff2
    • Dave Taht's avatar
      Increase fq_codel count in the bulk dropper · ae697f3b
      Dave Taht authored
      In the field fq_codel is often used with a smaller memory or
      packet limit than the default, and when the bulk dropper is hit,
      the drop pattern bifircates into one that more slowly increases
      the codel drop rate and hits the bulk dropper more than it should.
      
      The scan through the 1024 queues happens more often than it needs to.
      
      This patch increases the codel count in the bulk dropper, but
      does not change the drop rate there, relying on the next codel round
      to deliver the next packet at the original drop rate
      (after that burst of loss), then escalate to a higher signaling rate.
      Signed-off-by: default avatarDave Taht <dave.taht@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ae697f3b
    • Nathan Chancellor's avatar
      net: mdio-octeon: Fix Kconfig warnings and build errors · b8fb6406
      Nathan Chancellor authored
      After commit 171a9bae ("staging/octeon: Allow test build on
      !MIPS"), the following combination of configs cause a few Kconfig
      warnings and build errors (distilled from arm allyesconfig and Randy's
      randconfig builds):
      
          CONFIG_NETDEVICES=y
          CONFIG_STAGING=y
          CONFIG_COMPILE_TEST=y
      
      and CONFIG_OCTEON_ETHERNET as either a module or built-in.
      
      WARNING: unmet direct dependencies detected for MDIO_OCTEON
        Depends on [n]: NETDEVICES [=y] && MDIO_DEVICE [=y] && MDIO_BUS [=y]
      && 64BIT [=n] && HAS_IOMEM [=y] && OF_MDIO [=n]
        Selected by [y]:
        - OCTEON_ETHERNET [=y] && STAGING [=y] && (CAVIUM_OCTEON_SOC ||
      COMPILE_TEST [=y]) && NETDEVICES [=y]
      
      In file included from ../drivers/net/phy/mdio-octeon.c:14:
      ../drivers/net/phy/mdio-cavium.h:111:36: error: implicit declaration of
      function ‘writeq’; did you mean ‘writel’?
      [-Werror=implicit-function-declaration]
        111 | #define oct_mdio_writeq(val, addr) writeq(val, (void *)addr)
            |                                    ^~~~~~
      
      CONFIG_64BIT is not strictly necessary if the proper readq/writeq
      definitions are included from io-64-nonatomic-lo-hi.h.
      
      CONFIG_OF_MDIO is not needed when CONFIG_COMPILE_TEST is enabled because
      of commit f9dc9ac5 ("of/mdio: Add dummy functions in of_mdio.h.").
      
      Fixes: 171a9bae ("staging/octeon: Allow test build on !MIPS")
      Reported-by: default avatarkbuild test robot <lkp@intel.com>
      Reported-by: default avatarMark Brown <broonie@kernel.org>
      Reported-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: default avatarNathan Chancellor <natechancellor@gmail.com>
      Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b8fb6406
    • Vivien Didelot's avatar
      net: dsa: dump CPU port regs through master · 48e23311
      Vivien Didelot authored
      Merge the CPU port registers dump into the master interface registers
      dump through ethtool, by nesting the ethtool_drvinfo and ethtool_regs
      structures of the CPU port into the dump.
      
      drvinfo->regdump_len will contain the full data length, while regs->len
      will contain only the master interface registers dump length.
      
      This allows for example to dump the CPU port registers on a ZII Dev
      C board like this:
      
          # ethtool -d eth1
          0x004:                                              0x00000000
          0x008:                                              0x0a8000aa
          0x010:                                              0x01000000
          0x014:                                              0x00000000
          0x024:                                              0xf0000102
          0x040:                                              0x6d82c800
          0x044:                                              0x00000020
          0x064:                                              0x40000000
          0x084: RCR (Receive Control Register)               0x47c00104
              MAX_FL (Maximum frame length)                   1984
              FCE (Flow control enable)                       0
              BC_REJ (Broadcast frame reject)                 0
              PROM (Promiscuous mode)                         0
              DRT (Disable receive on transmit)               0
              LOOP (Internal loopback)                        0
          0x0c4: TCR (Transmit Control Register)              0x00000004
              RFC_PAUSE (Receive frame control pause)         0
              TFC_PAUSE (Transmit frame control pause)        0
              FDEN (Full duplex enable)                       1
              HBC (Heartbeat control)                         0
              GTS (Graceful transmit stop)                    0
          0x0e4:                                              0x76735d6d
          0x0e8:                                              0x7e9e8808
          0x0ec:                                              0x00010000
          .
          .
          .
          88E6352  Switch Port Registers
          ------------------------------
          00: Port Status                            0x4d04
                Pause Enabled                        0
                My Pause                             1
                802.3 PHY Detected                   0
                Link Status                          Up
                Duplex                               Full
                Speed                                100 or 200 Mbps
                EEE Enabled                          0
                Transmitter Paused                   0
                Flow Control                         0
                Config Mode                          0x4
          01: Physical Control                       0x003d
                RGMII Receive Timing Control         Default
                RGMII Transmit Timing Control        Default
                200 BASE Mode                        100
                Flow Control's Forced value          0
                Force Flow Control                   0
                Link's Forced value                  Up
                Force Link                           1
                Duplex's Forced value                Full
                Force Duplex                         1
                Force Speed                          100 or 200 Mbps
          .
          .
          .
      Signed-off-by: default avatarVivien Didelot <vivien.didelot@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      48e23311
    • David S. Miller's avatar
      Merge branch 'drop_monitor-Various-improvements-and-cleanups' · c4ed5253
      David S. Miller authored
      Ido Schimmel says:
      
      ====================
      drop_monitor: Various improvements and cleanups
      
      This patchset performs various improvements and cleanups in drop monitor
      with no functional changes intended. There are no changes in these
      patches relative to the RFC I sent two weeks ago [1].
      
      A followup patchset will extend drop monitor with a packet alert mode in
      which the dropped packet is notified to user space instead of just a
      summary of recent drops. Subsequent patchsets will add the ability to
      monitor hardware originated drops via drop monitor.
      
      [1] https://patchwork.ozlabs.org/cover/1135226/
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c4ed5253
    • Ido Schimmel's avatar
      drop_monitor: Use pre_doit / post_doit hooks · b19d9550
      Ido Schimmel authored
      Each operation from user space should be protected by the global drop
      monitor mutex. Use the pre_doit / post_doit hooks to take / release the
      lock instead of doing it explicitly in each function.
      Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b19d9550
    • Ido Schimmel's avatar
      drop_monitor: Add extack support · 96510096
      Ido Schimmel authored
      Add various extack messages to make drop_monitor more user friendly.
      Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      96510096
    • Ido Schimmel's avatar
      drop_monitor: Avoid multiple blank lines · ff3818ca
      Ido Schimmel authored
      Remove multiple blank lines which are visually annoying and useless.
      
      This suppresses the "Please don't use multiple blank lines" checkpatch
      messages.
      Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ff3818ca
    • Ido Schimmel's avatar
      drop_monitor: Document scope of spinlock · 01921d53
      Ido Schimmel authored
      While 'per_cpu_dm_data' is a per-CPU variable, its 'skb' and
      'send_timer' fields can be accessed concurrently by the CPU sending the
      netlink notification to user space from the workqueue and the CPU
      tracing kfree_skb(). This spinlock is meant to protect against that.
      
      Document its scope and suppress the checkpatch message "spinlock_t
      definition without comment".
      Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      01921d53
    • Ido Schimmel's avatar
      drop_monitor: Rename and document scope of mutex · dbf896b7
      Ido Schimmel authored
      The 'trace_state_mutex' does not only protect the global 'trace_state'
      variable, but also the global 'hw_stats_list'.
      
      Subsequent patches are going add more operations from user space to
      drop_monitor and these all need to be mutually exclusive.
      
      Rename 'trace_state_mutex' to the more fitting 'net_dm_mutex' name and
      document its scope.
      Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      dbf896b7
    • Ido Schimmel's avatar
      drop_monitor: Use correct error code · 2230a7ef
      Ido Schimmel authored
      The error code 'ENOTSUPP' is reserved for use with NFS. Use 'EOPNOTSUPP'
      instead.
      Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2230a7ef
    • Marek Vasut's avatar
      net: dsa: ksz: Drop NET_DSA_TAG_KSZ9477 · 267df70f
      Marek Vasut authored
      This Kconfig option is unused, drop it.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Andrew Lunn <andrew@lunn.ch>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Cc: Tristram Ha <Tristram.Ha@microchip.com>
      Cc: Vivien Didelot <vivien.didelot@gmail.com>
      Cc: Woojung Huh <woojung.huh@microchip.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      267df70f
    • Marek Vasut's avatar
      net: dsa: ksz: Merge ksz_priv.h into ksz_common.h · 6a7abc61
      Marek Vasut authored
      Merge the two headers into one, no functional change.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Andrew Lunn <andrew@lunn.ch>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Cc: Tristram Ha <Tristram.Ha@microchip.com>
      Cc: Vivien Didelot <vivien.didelot@gmail.com>
      Cc: Woojung Huh <woojung.huh@microchip.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6a7abc61
    • Marek Vasut's avatar
      net: dsa: ksz: Remove dead code and fix warnings · ffc60b55
      Marek Vasut authored
      Remove ksz_port_cleanup(), which is unused. Add missing include
      "ksz_common.h", which fixes the following warning when built with
      make ... W=1
      
      drivers/net/dsa/microchip/ksz_common.c:23:6: warning: no previous prototype for ‘...’ [-Wmissing-prototypes]
      
      Note that the order of the headers cannot be swapped, as that would
      trigger missing forward declaration errors, which would indicate the
      way forward is to merge the two headers into one.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Andrew Lunn <andrew@lunn.ch>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Cc: Tristram Ha <Tristram.Ha@microchip.com>
      Cc: Vivien Didelot <vivien.didelot@gmail.com>
      Cc: Woojung Huh <woojung.huh@microchip.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ffc60b55
  2. 05 Aug, 2019 8 commits