1. 13 Mar, 2020 11 commits
  2. 12 Mar, 2020 29 commits
    • Dave Airlie's avatar
      Merge tag 'drm-intel-fixes-2020-03-12' of... · f31d83f0
      Dave Airlie authored
      Merge tag 'drm-intel-fixes-2020-03-12' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
      
      drm/i915 fixes for v5.6-rc6:
      - hard lockup fix
      - GVT fixes
      - 32-bit alignment issue fix
      - timeline wait fixes
      - cacheline_retire and free
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      
      From: Jani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/87lfo6ksvw.fsf@intel.com
      f31d83f0
    • Dave Airlie's avatar
      Merge tag 'amd-drm-fixes-5.6-2020-03-11' of... · d9443265
      Dave Airlie authored
      Merge tag 'amd-drm-fixes-5.6-2020-03-11' of git://people.freedesktop.org/~agd5f/linux into drm-fixes
      
      amd-drm-fixes-5.6-2020-03-11:
      
      amdgpu:
      - Update the display watermark bounding box for navi14
      - Fix fetching vbios directly from rom on vega20/arcturus
      - Navi and renoir watermark fixes
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: Alex Deucher <alexdeucher@gmail.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200312020924.4161-1-alexander.deucher@amd.com
      d9443265
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 1b51f694
      Linus Torvalds authored
      Pull networking fixes from David Miller:
       "It looks like a decent sized set of fixes, but a lot of these are one
        liner off-by-one and similar type changes:
      
         1) Fix netlink header pointer to calcular bad attribute offset
            reported to user. From Pablo Neira Ayuso.
      
         2) Don't double clear PHY interrupts when ->did_interrupt is set,
            from Heiner Kallweit.
      
         3) Add missing validation of various (devlink, nl802154, fib, etc.)
            attributes, from Jakub Kicinski.
      
         4) Missing *pos increments in various netfilter seq_next ops, from
            Vasily Averin.
      
         5) Missing break in of_mdiobus_register() loop, from Dajun Jin.
      
         6) Don't double bump tx_dropped in veth driver, from Jiang Lidong.
      
         7) Work around FMAN erratum A050385, from Madalin Bucur.
      
         8) Make sure ARP header is pulled early enough in bonding driver,
            from Eric Dumazet.
      
         9) Do a cond_resched() during multicast processing of ipvlan and
            macvlan, from Mahesh Bandewar.
      
        10) Don't attach cgroups to unrelated sockets when in interrupt
            context, from Shakeel Butt.
      
        11) Fix tpacket ring state management when encountering unknown GSO
            types. From Willem de Bruijn.
      
        12) Fix MDIO bus PHY resume by checking mdio_bus_phy_may_suspend()
            only in the suspend context. From Heiner Kallweit"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (112 commits)
        net: systemport: fix index check to avoid an array out of bounds access
        tc-testing: add ETS scheduler to tdc build configuration
        net: phy: fix MDIO bus PM PHY resuming
        net: hns3: clear port base VLAN when unload PF
        net: hns3: fix RMW issue for VLAN filter switch
        net: hns3: fix VF VLAN table entries inconsistent issue
        net: hns3: fix "tc qdisc del" failed issue
        taprio: Fix sending packets without dequeueing them
        net: mvmdio: avoid error message for optional IRQ
        net: dsa: mv88e6xxx: Add missing mask of ATU occupancy register
        net: memcg: fix lockdep splat in inet_csk_accept()
        s390/qeth: implement smarter resizing of the RX buffer pool
        s390/qeth: refactor buffer pool code
        s390/qeth: use page pointers to manage RX buffer pool
        seg6: fix SRv6 L2 tunnels to use IANA-assigned protocol number
        net: dsa: Don't instantiate phylink for CPU/DSA ports unless needed
        net/packet: tpacket_rcv: do not increment ring index on drop
        sxgbe: Fix off by one in samsung driver strncpy size arg
        net: caif: Add lockdep expression to RCU traversal primitive
        MAINTAINERS: remove Sathya Perla as Emulex NIC maintainer
        ...
      1b51f694
    • Lyude Paul's avatar
      drm/dp_mst: Rewrite and fix bandwidth limit checks · 047d4cd2
      Lyude Paul authored
      Sigh, this is mostly my fault for not giving commit cd82d82c
      ("drm/dp_mst: Add branch bandwidth validation to MST atomic check")
      enough scrutiny during review. The way we're checking bandwidth
      limitations here is mostly wrong:
      
      For starters, drm_dp_mst_atomic_check_bw_limit() determines the
      pbn_limit of a branch by simply scanning each port on the current branch
      device, then uses the last non-zero full_pbn value that it finds. It
      then counts the sum of the PBN used on each branch device for that
      level, and compares against the full_pbn value it found before.
      
      This is wrong because ports can and will have different PBN limitations
      on many hubs, especially since a number of DisplayPort hubs out there
      will be clever and only use the smallest link rate required for each
      downstream sink - potentially giving every port a different full_pbn
      value depending on what link rate it's trained at. This means with our
      current code, which max PBN value we end up with is not well defined.
      
      Additionally, we also need to remember when checking bandwidth
      limitations that the top-most device in any MST topology is a branch
      device, not a port. This means that the first level of a topology
      doesn't technically have a full_pbn value that needs to be checked.
      Instead, we should assume that so long as our VCPI allocations fit we're
      within the bandwidth limitations of the primary MSTB.
      
      We do however, want to check full_pbn on every port including those of
      the primary MSTB. However, it's important to keep in mind that this
      value represents the minimum link rate /between a port's sink or mstb,
      and the mstb itself/. A quick diagram to explain:
      
                                      MSTB #1
                                     /       \
                                    /         \
                                 Port #1    Port #2
             full_pbn for Port #1 → |          | ← full_pbn for Port #2
                                 Sink #1    MSTB #2
                                               |
                                             etc...
      
      Note that in the above diagram, the combined PBN from all VCPI
      allocations on said hub should not exceed the full_pbn value of port #2,
      and the display configuration on sink #1 should not exceed the full_pbn
      value of port #1. However, port #1 and port #2 can otherwise consume as
      much bandwidth as they want so long as their VCPI allocations still fit.
      
      And finally - our current bandwidth checking code also makes the mistake
      of not checking whether something is an end device or not before trying
      to traverse down it.
      
      So, let's fix it by rewriting our bandwidth checking helpers. We split
      the function into one part for handling branches which simply adds up
      the total PBN on each branch and returns it, and one for checking each
      port to ensure we're not going over its PBN limit. Phew.
      
      This should fix regressions seen, where we erroneously reject display
      configurations due to thinking they're going over our bandwidth limits
      when they're not.
      
      Changes since v1:
      * Took an even closer look at how PBN limitations are supposed to be
        handled, and did some experimenting with Sean Paul. Ended up rewriting
        these helpers again, but this time they should actually be correct!
      Changes since v2:
      * Small indenting fix
      * Fix pbn_used check in drm_dp_mst_atomic_check_port_bw_limit()
      Signed-off-by: default avatarLyude Paul <lyude@redhat.com>
      Fixes: cd82d82c ("drm/dp_mst: Add branch bandwidth validation to MST atomic check")
      Cc: Sean Paul <seanpaul@google.com>
      Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Reviewed-by: default avatarMikita Lipski <mikita.lipski@amd.com>
      Tested-by: default avatarHans de Goede <hdegoede@redhat.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200309210131.1497545-1-lyude@redhat.com
      047d4cd2
    • Lyude Paul's avatar
      drm/dp_mst: Reprobe path resources in CSN handler · 87212b51
      Lyude Paul authored
      We used to punt off reprobing path resources to the link address probe
      work, but now that we handle CSNs asynchronously from the driver's HPD
      handling we can do whatever the heck we want from the CSN!
      
      So, reprobe the path resources from drm_dp_mst_handle_conn_stat(). Also,
      get rid of the path resource reprobing code in
      drm_dp_check_and_send_link_address() since it's needlessly complicated
      when we already reprobe path resources from
      drm_dp_handle_link_address_port(). And finally, teach
      drm_dp_send_enum_path_resources() to return 1 on PBN changes so we know
      if we need to send another hotplug or not.
      
      This fixes issues where we've indicated to userspace that a port has
      just been connected, before we actually probed it's available PBN -
      something that results in unexpected atomic check failures.
      Signed-off-by: default avatarLyude Paul <lyude@redhat.com>
      Fixes: cd82d82c ("drm/dp_mst: Add branch bandwidth validation to MST atomic check")
      Cc: Mikita Lipski <mikita.lipski@amd.com>
      Cc: Hans de Goede <hdegoede@redhat.com>
      Cc: Sean Paul <sean@poorly.run>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200306234623.547525-4-lyude@redhat.comReviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Tested-by: default avatarHans de Goede <hdegoede@redhat.com>
      87212b51
    • Lyude Paul's avatar
      drm/dp_mst: Use full_pbn instead of available_pbn for bandwidth checks · fcf46380
      Lyude Paul authored
      DisplayPort specifications are fun. For a while, it's been really
      unclear to us what available_pbn actually does. There's a somewhat vague
      explanation in the DisplayPort spec (starting from 1.2) that partially
      explains it:
      
        The minimum payload bandwidth number supported by the path. Each node
        updates this number with its available payload bandwidth number if its
        payload bandwidth number is less than that in the Message Transaction
        reply.
      
      So, it sounds like available_pbn represents the smallest link rate in
      use between the source and the branch device. Cool, so full_pbn is just
      the highest possible PBN that the branch device supports right?
      
      Well, we assumed that for quite a while until Sean Paul noticed that on
      some MST hubs, available_pbn will actually get set to 0 whenever there's
      any active payloads on the respective branch device. This caused quite a
      bit of confusion since clearing the payload ID table would end up fixing
      the available_pbn value.
      
      So, we just went with that until commit cd82d82c ("drm/dp_mst: Add
      branch bandwidth validation to MST atomic check") started breaking
      people's setups due to us getting erroneous available_pbn values. So, we
      did some more digging and got confused until we finally looked at the
      definition for full_pbn:
      
        The bandwidth of the link at the trained link rate and lane count
        between the DP Source device and the DP Sink device with no time slots
        allocated to VC Payloads, represented as a Payload Bandwidth Number. As
        with the Available_Payload_Bandwidth_Number, this number is determined
        by the link with the lowest lane count and link rate.
      
      That's what we get for not reading specs closely enough, hehe. So, since
      full_pbn is definitely what we want for doing bandwidth restriction
      checks - let's start using that instead and ignore available_pbn
      entirely.
      Signed-off-by: default avatarLyude Paul <lyude@redhat.com>
      Fixes: cd82d82c ("drm/dp_mst: Add branch bandwidth validation to MST atomic check")
      Cc: Mikita Lipski <mikita.lipski@amd.com>
      Cc: Hans de Goede <hdegoede@redhat.com>
      Cc: Sean Paul <sean@poorly.run>
      Reviewed-by: default avatarMikita Lipski <mikita.lipski@amd.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200306234623.547525-3-lyude@redhat.comReviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Tested-by: default avatarHans de Goede <hdegoede@redhat.com>
      fcf46380
    • Lyude Paul's avatar
      drm/dp_mst: Rename drm_dp_mst_is_dp_mst_end_device() to be less redundant · b2feb1d6
      Lyude Paul authored
      It's already prefixed by dp_mst, so we don't really need to repeat
      ourselves here. One of the changes I should have picked up originally
      when reviewing MST DSC support.
      
      There should be no functional changes here
      
      Cc: Mikita Lipski <mikita.lipski@amd.com>
      Cc: Sean Paul <seanpaul@google.com>
      Cc: Hans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarLyude Paul <lyude@redhat.com>
      Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Tested-by: default avatarHans de Goede <hdegoede@redhat.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200306234623.547525-2-lyude@redhat.com
      b2feb1d6
    • Joe Perches's avatar
      inet: Use fallthrough; · a8eceea8
      Joe Perches authored
      Convert the various uses of fallthrough comments to fallthrough;
      
      Done via script
      Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe@perches.com/
      
      And by hand:
      
      net/ipv6/ip6_fib.c has a fallthrough comment outside of an #ifdef block
      that causes gcc to emit a warning if converted in-place.
      
      So move the new fallthrough; inside the containing #ifdef/#endif too.
      Signed-off-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a8eceea8
    • Dan Carpenter's avatar
      octeontx2-pf: unlock on error path in otx2_config_pause_frm() · 8a765471
      Dan Carpenter authored
      We need to unlock before returning if this allocation fails.
      
      Fixes: 75f36270 ("octeontx2-pf: Support to enable/disable pause frames via ethtool")
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8a765471
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 807f030b
      Linus Torvalds authored
      Pull vfs fixes from Al Viro:
       "A couple of fixes for old crap in ->atomic_open() instances"
      
      * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        cifs_atomic_open(): fix double-put on late allocation failure
        gfs2_atomic_open(): fix O_EXCL|O_CREAT handling on cold dcache
      807f030b
    • Colin Ian King's avatar
      net: systemport: fix index check to avoid an array out of bounds access · c0368595
      Colin Ian King authored
      Currently the bounds check on index is off by one and can lead to
      an out of bounds access on array priv->filters_loc when index is
      RXCHK_BRCM_TAG_MAX.
      
      Fixes: bb9051a2 ("net: systemport: Add support for WAKE_FILTER")
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c0368595
    • David S. Miller's avatar
      Merge branch 'ipa-fixes' · 0f70eedc
      David S. Miller authored
      Alex Elder says:
      
      ====================
      net: fix net-next
      
      David:	These patches resolve two issues caused by the IPA driver
      	being incorporated into net-next.  I hope you will merge
      	them as soon as you can.
      
      The IPA driver was merged into net-next last week, but two problems
      arise as a result, affecting net-next and linux-next:
        - The patch that defines field_max() was not incorporated into
          net-next, but is required by the IPA code
        - A patch that updates "sdm845.dtsi" *was* incorporated into
          net-next, but other changes to that file in the Qualcomm
          for-next branch lead to errors
      
      Bjorn has agreed to incorporate the DTS file change into the
      Qualcomm tree after it is reverted from net-next.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0f70eedc
    • Alex Elder's avatar
      Revert "arm64: dts: sdm845: add IPA information" · 4639b38b
      Alex Elder authored
      This reverts commit 9cc5ae12.
      
      This commit:
        b303f9f0 arm64: dts: sdm845: Redefine interconnect provider DT nodes
      found in the Qualcomm for-next tree removes/redefines the interconnect
      provider node(s) used for IPA.  I'm not sure whether it technically
      conflicts with the IPA change to "sdm845.dtsi" in for-next, but it renders
      it broken.
      
      Revert this commit in the for-next tree, with the plan to incorporate
      it into the Qualcomm tree instead.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4639b38b
    • Alex Elder's avatar
      bitfield.h: add FIELD_MAX() and field_max() · e31a5016
      Alex Elder authored
      Define FIELD_MAX(), which supplies the maximum value that can be
      represented by a field value.  Define field_max() as well, to go
      along with the lower-case forms of the field mask functions.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Acked-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e31a5016
    • Davide Caratti's avatar
      tc-testing: add ETS scheduler to tdc build configuration · 9d0e0cd9
      Davide Caratti authored
      add CONFIG_NET_SCH_ETS to 'config', otherwise test suites using this file
      to perform a full tdc run will encounter the following warning:
      
        ok 645 e90e - Add ETS qdisc using bands # skipped - "-----> teardown stage" did not complete successfully
      
      Fixes: 82c664b6 ("selftests: qdiscs: Add test coverage for ETS Qdisc")
      Reported-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
      Signed-off-by: default avatarDavide Caratti <dcaratti@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9d0e0cd9
    • Heiner Kallweit's avatar
      net: phy: fix MDIO bus PM PHY resuming · 611d779a
      Heiner Kallweit authored
      So far we have the unfortunate situation that mdio_bus_phy_may_suspend()
      is called in suspend AND resume path, assuming that function result is
      the same. After the original change this is no longer the case,
      resulting in broken resume as reported by Geert.
      
      To fix this call mdio_bus_phy_may_suspend() in the suspend path only,
      and let the phy_device store the info whether it was suspended by
      MDIO bus PM.
      
      Fixes: 503ba7c6 ("net: phy: Avoid multiple suspends")
      Reported-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Tested-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      611d779a
    • David S. Miller's avatar
      Merge branch 'ethtool-netlink-interface-part-3' · 82a9822b
      David S. Miller authored
      Michal Kubecek says:
      
      ====================
      ethtool netlink interface, part 3
      
      Implementation of more netlink request types:
      
        - netdev features (ethtool -k/-K, patches 3-6)
        - private flags (--show-priv-flags / --set-priv-flags, patches 7-9)
        - ring sizes (ethtool -g/-G, patches 10-12)
        - channel counts (ethtool -l/-L, patches 13-15)
      
      Patch 1 is a style cleanup suggested in part 2 review and patch 2 updates
      the mapping between netdev features and legacy ioctl requests (which are
      still used by ethtool for backward compatibility).
      
      Changes in v2:
        - fix netdev reference leaks in error path of ethnl_set_rings() and
          ethnl_set_channels() (found by Jakub Kicinski)
        - use __set_bit() rather than set_bit() (suggested by David Miller)
        - in replies to RINGS_GET and CHANNELS_GET requests, omit ring and
          channel types not supported by driver/device (suggested by Jakub
          Kicinski)
        - more descriptive message size calculations in rings_reply_size() and
          channels_reply_size() (suggested by Jakub Kicinski)
        - coding style cleanup (suggested by Jakub Kicinski)
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      82a9822b
    • Michal Kubecek's avatar
      ethtool: add CHANNELS_NTF notification · 546379b9
      Michal Kubecek authored
      Send ETHTOOL_MSG_CHANNELS_NTF notification whenever channel counts of
      a network device are modified using ETHTOOL_MSG_CHANNELS_SET netlink
      message or ETHTOOL_SCHANNELS ioctl request.
      Signed-off-by: default avatarMichal Kubecek <mkubecek@suse.cz>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      546379b9
    • Michal Kubecek's avatar
      ethtool: set device channel counts with CHANNELS_SET request · e19c591e
      Michal Kubecek authored
      Implement CHANNELS_SET netlink request to set channel counts of a network
      device. These are traditionally set with ETHTOOL_SCHANNELS ioctl request.
      
      Like the ioctl implementation, the generic ethtool code checks if supplied
      values do not exceed driver defined limits; if they do, first offending
      attribute is reported using extack. Checks preventing removing channels
      used for RX indirection table or zerocopy AF_XDP socket are also
      implemented.
      
      Move ethtool_get_max_rxfh_channel() helper into common.c so that it can be
      used by both ioctl and netlink code.
      
      v2:
        - fix netdev reference leak in error path (found by Jakub Kicinsky)
      Signed-off-by: default avatarMichal Kubecek <mkubecek@suse.cz>
      Reviewed-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e19c591e
    • Michal Kubecek's avatar
      ethtool: provide channel counts with CHANNELS_GET request · 0c84979c
      Michal Kubecek authored
      Implement CHANNELS_GET request to get channel counts of a network device.
      These are traditionally available via ETHTOOL_GCHANNELS ioctl request.
      
      Omit attributes for channel types which are not supported by driver or
      device (zero reported for maximum).
      
      v2: (all suggested by Jakub Kicinski)
        - minor cleanup in channels_prepare_data()
        - more descriptive channels_reply_size()
        - omit attributes with zero max count
      Signed-off-by: default avatarMichal Kubecek <mkubecek@suse.cz>
      Reviewed-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0c84979c
    • Michal Kubecek's avatar
      ethtool: add RINGS_NTF notification · bc9d1c99
      Michal Kubecek authored
      Send ETHTOOL_MSG_RINGS_NTF notification whenever ring sizes of a network
      device are modified using ETHTOOL_MSG_RINGS_SET netlink message or
      ETHTOOL_SRINGPARAM ioctl request.
      Signed-off-by: default avatarMichal Kubecek <mkubecek@suse.cz>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bc9d1c99
    • Michal Kubecek's avatar
      ethtool: set device ring sizes with RINGS_SET request · 2fc2929e
      Michal Kubecek authored
      Implement RINGS_SET netlink request to set ring sizes of a network device.
      These are traditionally set with ETHTOOL_SRINGPARAM ioctl request.
      
      Like the ioctl implementation, the generic ethtool code checks if supplied
      values do not exceed driver defined limits; if they do, first offending
      attribute is reported using extack.
      
      v2:
        - fix netdev reference leak in error path (found by Jakub Kicinsky)
      Signed-off-by: default avatarMichal Kubecek <mkubecek@suse.cz>
      Reviewed-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2fc2929e
    • Michal Kubecek's avatar
      ethtool: provide ring sizes with RINGS_GET request · e4a1717b
      Michal Kubecek authored
      Implement RINGS_GET request to get ring sizes of a network device. These
      are traditionally available via ETHTOOL_GRINGPARAM ioctl request.
      
      Omit attributes for ring types which are not supported by driver or device
      (zero reported for maximum).
      
      v2: (all suggested by Jakub Kicinski)
        - minor cleanup in rings_prepare_data()
        - more descriptive rings_reply_size()
        - omit attributes with zero max size
      Signed-off-by: default avatarMichal Kubecek <mkubecek@suse.cz>
      Reviewed-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e4a1717b
    • Michal Kubecek's avatar
      ethtool: add PRIVFLAGS_NTF notification · 111dcba3
      Michal Kubecek authored
      Send ETHTOOL_MSG_PRIVFLAGS_NTF notification whenever private flags of
      a network device are modified using ETHTOOL_MSG_PRIVFLAGS_SET netlink
      message or ETHTOOL_SPFLAGS ioctl request.
      Signed-off-by: default avatarMichal Kubecek <mkubecek@suse.cz>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      111dcba3
    • Michal Kubecek's avatar
      ethtool: set device private flags with PRIVFLAGS_SET request · f265d799
      Michal Kubecek authored
      Implement PRIVFLAGS_SET netlink request to set private flags of a network
      device. These are traditionally set with ETHTOOL_SPFLAGS ioctl request.
      Signed-off-by: default avatarMichal Kubecek <mkubecek@suse.cz>
      Reviewed-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f265d799
    • Michal Kubecek's avatar
      ethtool: provide private flags with PRIVFLAGS_GET request · e16c3386
      Michal Kubecek authored
      Implement PRIVFLAGS_GET request to get private flags for a network device.
      These are traditionally available via ETHTOOL_GPFLAGS ioctl request.
      Signed-off-by: default avatarMichal Kubecek <mkubecek@suse.cz>
      Reviewed-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e16c3386
    • Michal Kubecek's avatar
      ethtool: add FEATURES_NTF notification · 9c6451ef
      Michal Kubecek authored
      Send ETHTOOL_MSG_FEATURES_NTF notification whenever network device features
      are modified using ETHTOOL_MSG_FEATURES_SET netlink message, ethtool ioctl
      request or any other way resulting in call to netdev_update_features() or
      netdev_change_features()
      Signed-off-by: default avatarMichal Kubecek <mkubecek@suse.cz>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9c6451ef
    • Michal Kubecek's avatar
      ethtool: set netdev features with FEATURES_SET request · 0980bfcd
      Michal Kubecek authored
      Implement FEATURES_SET netlink request to set network device features.
      These are traditionally set using ETHTOOL_SFEATURES ioctl request.
      
      Actual change is subject to netdev_change_features() sanity checks so that
      it can differ from what was requested. Unlike with most other SET requests,
      in addition to error code and optional extack, kernel provides an optional
      reply message (ETHTOOL_MSG_FEATURES_SET_REPLY) in the same format but with
      different semantics: information about difference between user request and
      actual result and difference between old and new state of dev->features.
      This reply message can be suppressed by setting ETHTOOL_FLAG_OMIT_REPLY
      flag in request header.
      Signed-off-by: default avatarMichal Kubecek <mkubecek@suse.cz>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0980bfcd
    • Michal Kubecek's avatar
      ethtool: add ethnl_parse_bitset() helper · 88db6d1e
      Michal Kubecek authored
      Unlike other SET type commands, modifying netdev features is required to
      provide a reply telling userspace what was actually changed, compared to
      what was requested. For that purpose, the "modified" flag provided by
      ethnl_update_bitset() is not sufficient, we need full information which
      bits were requested to change.
      
      Therefore provide ethnl_parse_bitset() returning effective value and mask
      bitmaps equivalent to the contents of a bitset nested attribute.
      
      v2: use non-atomic __set_bit() (suggested by David Miller)
      Signed-off-by: default avatarMichal Kubecek <mkubecek@suse.cz>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      88db6d1e