1. 09 Mar, 2023 6 commits
  2. 27 Feb, 2023 19 commits
  3. 26 Feb, 2023 15 commits
    • Linus Torvalds's avatar
      Merge tag 'rproc-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux · f3a2439f
      Linus Torvalds authored
      Pull remoteproc updates from Bjorn Andersson:
      
       - Support for PRU clients to acquire a control reference to the PRU
         instances is introduced, and the PRU now allows specifying
         firmware-name in Devicetree. sysfs is requested to be read-only when
         the remoteproc instance is consumed by another kernel driver
      
       - Support for the C7xv DSP on AM62A SoC is introduced
      
       - The Devicetree binding for the Qualcomm PAS devices are split up in
         multiple files, to better account for the differences in resources
         between them. A number of missing Devicetree bindings are added, and
         the Qualcomm WCNSS binding is converted to YAML
      
       - A few cleanups are introduced for the Mediatek SCP driver. And a
         sanity check of the firmware image is introduced in the Mediatek
         driver
      
       - For Qualcomm SC7280 ADSP support is added, MSM8953 gains ADSP and
         modem support, SM6115 and SM8550 gains ADSP, CDSP and modem support,
         and support for pronto v3 support (used on e.g. MSM8953) is added
      
       - The Qualcomm modem remoteproc driver is modified to use a no-map
         reserved-memory region for it's authentication metadata, in order to
         avoid fatal security violations caused by accesses from Linux during
         the authentication process
      
       - Support for separate loading of a Devicetree blob is added to the PAS
         driver, and support for the PAS driver to carve out DSM memory for
         the modem is added as well
      
       - The Qualcomm ADSP remoteproc driver gains support for mapping memory
         into specific range using the IOMMU. The sysmon driver is
         transitioned to strlcpy()
      
      * tag 'rproc-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux: (69 commits)
        dt-bindings: mailbox: qcom,apcs-kpss-global: drop mbox-names from example
        dt-bindings: remoteproc: qcom,glink-edge: correct label description
        dt-bindings: remoteproc: qcom,glink-rpm-edge: convert to DT schema
        dt-bindings: remoteproc: qcom,sm8550-pas: correct power domains
        remoteproc: qcom_q6v5_pas: enable sm8550 adsp & cdsp autoboot
        dt-bindings: remoteproc: qcom: Add sm6115 pas yaml file
        remoteproc: qcom: pas: Add sm6115 remoteprocs
        remoteproc: qcom: pas: Adjust the phys addr wrt the mem region
        remoteproc: qcom: fix sparse warnings
        remoteproc: qcom: replace kstrdup with kstrndup
        remoteproc: mediatek: Check the SCP image format
        remoteproc: qcom_q6v5_mss: Use a carveout to authenticate modem headers
        Revert "remoteproc: qcom_q6v5_mss: map/unmap metadata region before/after use"
        dt-bindings: remoteproc: qcom,sc7280-mss-pil: Update memory-region
        dt-bindings: remoteproc: qcom,sc7180-mss-pil: Update memory-region
        dt-bindings: remoteproc: qcom,msm8996-mss-pil: Update memory region
        dt-bindings: remoteproc: qcom,q6v5: Move MSM8996 to schema
        remoteproc: qcom_q6v5_pas: add sm8550 adsp, cdsp & mpss compatible & data
        remoteproc: qcom_q6v5_pas: add support for assigning memory to firmware
        remoteproc: qcom_q6v5_pas: add support for dtb co-firmware loading
        ...
      f3a2439f
    • Linus Torvalds's avatar
      Merge tag 'rpmsg-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux · cc38a46d
      Linus Torvalds authored
      Pull rpmsg updates from Bjorn Andersson:
      
       - rpmsg ctrl and char driver locking is ensure ordering in cases where
         the communication link is being torn down in parallel with calls to
         open(2) or poll(2)
      
       - The glink driver is refactored, to move rpm/smem-specifics out of the
         common logic and better suite further improvements, such as
         transports without a mailbox controller. The handling of remoteproc
         shutdown is improved, to fail clients immediately instead of having
         them to wait for timeouts. A driver_override memory leak is corrected
         and a few spelling improvements are introduced
      
       - glink_ssr is transitioned off strlcpy() and "gpr" is added as a valid
         child node of the glink-edge DT binding
      
      * tag 'rpmsg-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux:
        rpmsg: glink: Release driver_override
        rpmsg: glink: Avoid infinite loop on intent for missing channel
        rpmsg: glink: Fix GLINK command prefix
        rpmsg: glink: Fix spelling of peek
        rpmsg: glink: Cancel pending intent requests at removal
        rpmsg: glink: Fail qcom_glink_tx() once remove has been initiated
        rpmsg: glink: Move irq and mbox handling to transports
        rpmsg: glink: rpm: Wrap driver context
        rpmsg: glink: smem: Wrap driver context
        rpmsg: glink: Extract tx kick operation
        rpmsg: glink: Include types in qcom_glink_native.h
        rpmsg: ctrl: Add lock to rpmsg_ctrldev_remove
        rpmsg: char: Add lock to avoid race when rpmsg device is released
        rpmsg: move from strlcpy with unused retval to strscpy
        dt-bindings: remoteproc: qcom,glink-edge: add GPR node
      cc38a46d
    • Linus Torvalds's avatar
      Merge tag 'hwlock-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux · 9b0b0dd8
      Linus Torvalds authored
      Pull hwspinlock updates from Bjorn Andersson:
       "This updates the sun6i DT binding to allow (and require) #hwlock-cells
        and makes use of device_match_of_node() to slight clean up the
        condition in of_hwspin_lock_get_id()"
      
      * tag 'hwlock-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux:
        dt-bindings: hwlock: sun6i: Add #hwlock-cells to example
        dt-bindings: hwlock: sun6i: Add missing #hwlock-cells
        hwspinlock: Use device_match_of_node()
      9b0b0dd8
    • Linus Torvalds's avatar
      Merge tag 'kbuild-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild · 498a1cf9
      Linus Torvalds authored
      Pull Kbuild updates from Masahiro Yamada:
      
       - Change V=1 option to print both short log and full command log
      
       - Allow V=1 and V=2 to be combined as V=12
      
       - Make W=1 detect wrong .gitignore files
      
       - Tree-wide cleanups for unused command line arguments passed to Clang
      
       - Stop using -Qunused-arguments with Clang
      
       - Make scripts/setlocalversion handle only correct release tags instead
         of any arbitrary annotated tag
      
       - Create Debian and RPM source packages without cleaning the source
         tree
      
       - Various cleanups for packaging
      
      * tag 'kbuild-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (74 commits)
        kbuild: rpm-pkg: remove unneeded KERNELRELEASE from modules/headers_install
        docs: kbuild: remove description of KBUILD_LDS_MODULE
        .gitattributes: use 'dts' diff driver for *.dtso files
        kbuild: deb-pkg: improve the usability of source package
        kbuild: deb-pkg: fix binary-arch and clean in debian/rules
        kbuild: tar-pkg: use tar rules in scripts/Makefile.package
        kbuild: make perf-tar*-src-pkg work without relying on git
        kbuild: deb-pkg: switch over to source format 3.0 (quilt)
        kbuild: deb-pkg: make .orig tarball a hard link if possible
        kbuild: deb-pkg: hide KDEB_SOURCENAME from Makefile
        kbuild: srcrpm-pkg: create source package without cleaning
        kbuild: rpm-pkg: build binary packages from source rpm
        kbuild: deb-pkg: create source package without cleaning
        kbuild: add a tool to list files ignored by git
        Documentation/llvm: add Chimera Linux, Google and Meta datacenters
        setlocalversion: use only the correct release tag for git-describe
        setlocalversion: clean up the construction of version output
        .gitignore: ignore *.cover and *.mbx
        kbuild: remove --include-dir MAKEFLAG from top Makefile
        kbuild: fix trivial typo in comment
        ...
      498a1cf9
    • Linus Torvalds's avatar
      Merge tag 'media/v6.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media · 4b8c673b
      Linus Torvalds authored
      Pull media updates from Mauro Carvalho Chehab:
      
       - Removal of several VB1-only deprecated drivers: cpia2, fsl-viu, meye,
         stkwebcam, tm6000, vpfe_capture and zr364xx
      
       - saa7146 recovered from staging/deprecated. We opted to give ti a
         chance, and, instead of deprecating it, the intention is to write
         patches migrating it from VB1 to VB2.
      
       - av7110 returned from staging/deprecated/ to staging/ as we're not
         planning on dropping it any time soon
      
       - media controller API has gained experimental support for G_ROUTING
         and streams API. No drivers use it right now. We're planning to add
         one after -rc1, giving some time to experience the API and eventually
         have changes during the next development cycle
      
       - New sensor drivers: imx296, imx415, ov8858
      
       - Atomisp had lots of changes, specially on its sensor's interface,
         making atomisp sensor drivers closer to normal sensor drivers
      
       - media controller kAPI has gained some helpers to traverse pipelines
      
       - uvcvideo now better support power line control
      
       - lots of bug fixes, cleanups and driver improvements
      
      * tag 'media/v6.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (296 commits)
        media: imx-mipi-csis: Check csis_fmt validity before use
        media: v4l2-subdev.c: clear stream field
        media: v4l2-ctrls-api.c: move ctrl->is_new = 1 to the correct line
        media: Revert "media: saa7146: deprecate hexium_gemini/orion, mxb and ttpci"
        media: Revert "media: av7110: move to staging/media/deprecated/saa7146"
        media: imx-pxp: convert to regmap
        media: imx-pxp: Use non-threaded IRQ
        media: imx-pxp: Introduce pxp_read() and pxp_write() wrappers
        media: imx-pxp: Implement frame size enumeration
        media: imx-pxp: Pass pixel format value to find_format()
        media: imx-pxp: Add media controller support
        media: imx-pxp: Don't set bus_info manually in .querycap()
        media: imx-pxp: Sort headers alphabetically
        media: imx-pxp: add support for i.MX7D
        media: imx-pxp: make data_path_ctrl0 platform dependent
        media: imx-pxp: disable LUT block
        media: imx-pxp: explicitly disable unused blocks
        media: imx-pxp: extract helper function to setup data path
        media: imx-pxp: detect PXP version
        media: dt-bindings: media: fsl-pxp: convert to yaml
        ...
      4b8c673b
    • Linus Torvalds's avatar
      Documentation: simplify and clarify DCO contribution example language · d4563201
      Linus Torvalds authored
      Long long ago, in a more innocent time, Greg wrote the clarification for
      how the DCO should work and that you couldn't make anonymous
      contributions, because the sign-off needed to be something we could
      check back with.
      
      It was 2006, and nobody reacted to the wording, the whole Facebook 'real
      name' controversy was a decade in the future, and nobody even thought
      about it.  And despite the language, we've always accepted nicknames and
      that language was never meant to be any kind of exclusionary wording.
      
      In fact, even when it became a discussion in other adjacent projects,
      apparently nobody even thought to just clarify the language in the
      kernel docs, and instead we had projects like the CNCF that had long
      discussions about it, and wrote their own clarifications [1] of it.
      
      Just simplify the wording to the point where it shouldn't be causing
      unnecessary angst and pain, or scare away people who go by preferred
      naming.
      
      Link: https://github.com/cncf/foundation/blob/659fd32c86dc/dco-guidelines.md [1]
      Fixes: af45f32d ("We can not allow anonymous contributions to the kernel")
      Acked-by: default avatarGreg KH <gregkh@linuxfoundation.org>
      Acked-by: default avatarMichael Dolan <mdolan@linuxfoundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d4563201
    • Russell King (Oracle)'s avatar
      net: dsa: ocelot_ext: remove unnecessary phylink.h include · 724337be
      Russell King (Oracle) authored
      During review of ocelot_ext, it created a private phylink instance
      that wasn't necessary. This was removed for subsequent postings,
      but the include file seems to have been left behind. Remove it.
      Signed-off-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      724337be
    • David S. Miller's avatar
      Merge branch 'net-ocelot-switch-regressions' · 5f79f12c
      David S. Miller authored
      Vladimir Oltean says:
      
      ====================
      Regressions in Ocelot switch drivers
      
      These are 3 patches which resolve a regression in the Seville driver,
      one in the Felix driver and a generic one which affects any kernel
      compiled with 2 Kconfig options enabled. All of them have in common my
      lack of attention during review/testing. The patches touch the DSA, MFD
      and MDIO drivers for Ocelot. I think it would be preferable if all
      patches went through netdev (with Lee's Ack).
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5f79f12c
    • Vladimir Oltean's avatar
      net: mscc: ocelot: fix duplicate driver name error · ef1a99c6
      Vladimir Oltean authored
      When compiling a kernel which has both CONFIG_NET_DSA_MSCC_OCELOT_EXT
      and CONFIG_MSCC_OCELOT_SWITCH enabled, the following error message will
      be printed:
      
      [    5.266588] Error: Driver 'ocelot-switch' is already registered, aborting...
      
      Rename the ocelot_ext.c driver to "ocelot-ext-switch" to avoid the name
      duplication, and update the mfd_cell entry for its resources.
      
      Fixes: 3d7316ac ("net: dsa: ocelot: add external ocelot switch control")
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ef1a99c6
    • Vladimir Oltean's avatar
      net: dsa: felix: fix internal MDIO controller resource length · 940af261
      Vladimir Oltean authored
      The blamed commit did not properly convert the resource start/end format
      into the DEFINE_RES_MEM_NAMED() start/length format, resulting in a
      resource for vsc9959_imdio_res which is much longer than expected:
      
      $ cat /proc/iomem
      1f8000000-1f815ffff : pcie@1f0000000
        1f8140000-1f815ffff : 0000:00:00.5
          1f8148030-1f815006f : imdio
      
      vs (correct)
      
      $ cat /proc/iomem
      1f8000000-1f815ffff : pcie@1f0000000
        1f8140000-1f815ffff : 0000:00:00.5
          1f8148030-1f814803f : imdio
      
      Luckily it's not big enough to exceed the size of the parent resource
      (pci_resource_end(pdev, VSC9959_IMDIO_PCI_BAR)), and it doesn't overlap
      with anything else that the Linux driver uses currently, so the larger
      than expected size isn't a practical problem that I can see. Although it
      is clearly wrong in the /proc/iomem output.
      
      Fixes: 044d447a ("net: dsa: felix: use DEFINE_RES_MEM_NAMED for resources")
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      940af261
    • Vladimir Oltean's avatar
      net: dsa: seville: ignore mscc-miim read errors from Lynx PCS · 0322ef49
      Vladimir Oltean authored
      During the refactoring in the commit below, vsc9953_mdio_read() was
      replaced with mscc_miim_read(), which has one extra step: it checks for
      the MSCC_MIIM_DATA_ERROR bits before returning the result.
      
      On T1040RDB, there are 8 QSGMII PCSes belonging to the switch, and they
      are organized in 2 groups. First group responds to MDIO addresses 4-7
      because QSGMIIACR1[MDEV_PORT] is 1, and the second group responds to
      MDIO addresses 8-11 because QSGMIIBCR1[MDEV_PORT] is 2. I have double
      checked that these values are correctly set in the SERDES, as well as
      PCCR1[QSGMA_CFG] and PCCR1[QSGMB_CFG] are both 0b01.
      
      mscc_miim_read: phyad 8 reg 0x1 MIIM_DATA 0x2d
      mscc_miim_read: phyad 8 reg 0x5 MIIM_DATA 0x5801
      mscc_miim_read: phyad 8 reg 0x1 MIIM_DATA 0x2d
      mscc_miim_read: phyad 8 reg 0x5 MIIM_DATA 0x5801
      mscc_miim_read: phyad 9 reg 0x1 MIIM_DATA 0x2d
      mscc_miim_read: phyad 9 reg 0x5 MIIM_DATA 0x5801
      mscc_miim_read: phyad 9 reg 0x1 MIIM_DATA 0x2d
      mscc_miim_read: phyad 9 reg 0x5 MIIM_DATA 0x5801
      mscc_miim_read: phyad 10 reg 0x1 MIIM_DATA 0x2d
      mscc_miim_read: phyad 10 reg 0x5 MIIM_DATA 0x5801
      mscc_miim_read: phyad 10 reg 0x1 MIIM_DATA 0x2d
      mscc_miim_read: phyad 10 reg 0x5 MIIM_DATA 0x5801
      mscc_miim_read: phyad 11 reg 0x1 MIIM_DATA 0x2d
      mscc_miim_read: phyad 11 reg 0x5 MIIM_DATA 0x5801
      mscc_miim_read: phyad 11 reg 0x1 MIIM_DATA 0x2d
      mscc_miim_read: phyad 11 reg 0x5 MIIM_DATA 0x5801
      mscc_miim_read: phyad 4 reg 0x1 MIIM_DATA 0x3002d, ERROR
      mscc_miim_read: phyad 4 reg 0x5 MIIM_DATA 0x3da01, ERROR
      mscc_miim_read: phyad 5 reg 0x1 MIIM_DATA 0x3002d, ERROR
      mscc_miim_read: phyad 5 reg 0x5 MIIM_DATA 0x35801, ERROR
      mscc_miim_read: phyad 5 reg 0x1 MIIM_DATA 0x3002d, ERROR
      mscc_miim_read: phyad 5 reg 0x5 MIIM_DATA 0x35801, ERROR
      mscc_miim_read: phyad 6 reg 0x1 MIIM_DATA 0x3002d, ERROR
      mscc_miim_read: phyad 6 reg 0x5 MIIM_DATA 0x35801, ERROR
      mscc_miim_read: phyad 6 reg 0x1 MIIM_DATA 0x3002d, ERROR
      mscc_miim_read: phyad 6 reg 0x5 MIIM_DATA 0x35801, ERROR
      mscc_miim_read: phyad 7 reg 0x1 MIIM_DATA 0x3002d, ERROR
      mscc_miim_read: phyad 7 reg 0x5 MIIM_DATA 0x35801, ERROR
      mscc_miim_read: phyad 7 reg 0x1 MIIM_DATA 0x3002d, ERROR
      mscc_miim_read: phyad 7 reg 0x5 MIIM_DATA 0x35801, ERROR
      
      As can be seen, the data in MIIM_DATA is still valid despite having the
      MSCC_MIIM_DATA_ERROR bits set. The driver as introduced in commit
      84705fc1 ("net: dsa: felix: introduce support for Seville VSC9953
      switch") was ignoring these bits, perhaps deliberately (although
      unbeknownst to me).
      
      This is an old IP and the hardware team cannot seem to be able to help
      me track down a plausible reason for these failures. I'll keep
      investigating, but in the meantime, this is a direct regression which
      must be restored to a working state.
      
      The only thing I can do is keep ignoring the errors as before.
      
      Fixes: b9965845 ("net: dsa: ocelot: felix: utilize shared mscc-miim driver for indirect MDIO access")
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0322ef49
    • David S. Miller's avatar
      Merge branch 'net-sched-action-bind' · 3fa10563
      David S. Miller authored
      Pedro Tammela says:
      
      ====================
      net/sched: fix action bind logic
      
      Some actions are not handling the case where an action can be created and bound to a
      filter independently. These actions are checking for parameters only passed
      in the netlink message for create/change/replace, which then errors out
      for valid uses like:
      tc filter ... action pedit index 1
      
      In the iproute2 side, we saw a couple of actions with their parsers
      broken when passing "index 1" as the only action argument, while the kernel
      side accepted it correctly. We fixed those as well.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3fa10563
    • Pedro Tammela's avatar
      net/sched: act_sample: fix action bind logic · 4a20056a
      Pedro Tammela authored
      The TC architecture allows filters and actions to be created independently.
      In filters the user can reference action objects using:
      tc action add action sample ... index 1
      tc filter add ... action pedit index 1
      
      In the current code for act_sample this is broken as it checks netlink
      attributes for create/update before actually checking if we are binding to an
      existing action.
      
      tdc results:
      1..29
      ok 1 9784 - Add valid sample action with mandatory arguments
      ok 2 5c91 - Add valid sample action with mandatory arguments and continue control action
      ok 3 334b - Add valid sample action with mandatory arguments and drop control action
      ok 4 da69 - Add valid sample action with mandatory arguments and reclassify control action
      ok 5 13ce - Add valid sample action with mandatory arguments and pipe control action
      ok 6 1886 - Add valid sample action with mandatory arguments and jump control action
      ok 7 7571 - Add sample action with invalid rate
      ok 8 b6d4 - Add sample action with mandatory arguments and invalid control action
      ok 9 a874 - Add invalid sample action without mandatory arguments
      ok 10 ac01 - Add invalid sample action without mandatory argument rate
      ok 11 4203 - Add invalid sample action without mandatory argument group
      ok 12 14a7 - Add invalid sample action without mandatory argument group
      ok 13 8f2e - Add valid sample action with trunc argument
      ok 14 45f8 - Add sample action with maximum rate argument
      ok 15 ad0c - Add sample action with maximum trunc argument
      ok 16 83a9 - Add sample action with maximum group argument
      ok 17 ed27 - Add sample action with invalid rate argument
      ok 18 2eae - Add sample action with invalid group argument
      ok 19 6ff3 - Add sample action with invalid trunc size
      ok 20 2b2a - Add sample action with invalid index
      ok 21 dee2 - Add sample action with maximum allowed index
      ok 22 560e - Add sample action with cookie
      ok 23 704a - Replace existing sample action with new rate argument
      ok 24 60eb - Replace existing sample action with new group argument
      ok 25 2cce - Replace existing sample action with new trunc argument
      ok 26 59d1 - Replace existing sample action with new control argument
      ok 27 0a6e - Replace sample action with invalid goto chain control
      ok 28 3872 - Delete sample action with valid index
      ok 29 a394 - Delete sample action with invalid index
      
      Fixes: 5c5670fa ("net/sched: Introduce sample tc action")
      Reviewed-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
      Signed-off-by: default avatarPedro Tammela <pctammela@mojatatu.com>
      Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4a20056a
    • Pedro Tammela's avatar
      net/sched: act_mpls: fix action bind logic · e88d78a7
      Pedro Tammela authored
      The TC architecture allows filters and actions to be created independently.
      In filters the user can reference action objects using:
      tc action add action mpls ... index 1
      tc filter add ... action mpls index 1
      
      In the current code for act_mpls this is broken as it checks netlink
      attributes for create/update before actually checking if we are binding to an
      existing action.
      
      tdc results:
      1..53
      ok 1 a933 - Add MPLS dec_ttl action with pipe opcode
      ok 2 08d1 - Add mpls dec_ttl action with pass opcode
      ok 3 d786 - Add mpls dec_ttl action with drop opcode
      ok 4 f334 - Add mpls dec_ttl action with reclassify opcode
      ok 5 29bd - Add mpls dec_ttl action with continue opcode
      ok 6 48df - Add mpls dec_ttl action with jump opcode
      ok 7 62eb - Add mpls dec_ttl action with trap opcode
      ok 8 09d2 - Add mpls dec_ttl action with opcode and cookie
      ok 9 c170 - Add mpls dec_ttl action with opcode and cookie of max length
      ok 10 9118 - Add mpls dec_ttl action with invalid opcode
      ok 11 6ce1 - Add mpls dec_ttl action with label (invalid)
      ok 12 352f - Add mpls dec_ttl action with tc (invalid)
      ok 13 fa1c - Add mpls dec_ttl action with ttl (invalid)
      ok 14 6b79 - Add mpls dec_ttl action with bos (invalid)
      ok 15 d4c4 - Add mpls pop action with ip proto
      ok 16 91fb - Add mpls pop action with ip proto and cookie
      ok 17 92fe - Add mpls pop action with mpls proto
      ok 18 7e23 - Add mpls pop action with no protocol (invalid)
      ok 19 6182 - Add mpls pop action with label (invalid)
      ok 20 6475 - Add mpls pop action with tc (invalid)
      ok 21 067b - Add mpls pop action with ttl (invalid)
      ok 22 7316 - Add mpls pop action with bos (invalid)
      ok 23 38cc - Add mpls push action with label
      ok 24 c281 - Add mpls push action with mpls_mc protocol
      ok 25 5db4 - Add mpls push action with label, tc and ttl
      ok 26 7c34 - Add mpls push action with label, tc ttl and cookie of max length
      ok 27 16eb - Add mpls push action with label and bos
      ok 28 d69d - Add mpls push action with no label (invalid)
      ok 29 e8e4 - Add mpls push action with ipv4 protocol (invalid)
      ok 30 ecd0 - Add mpls push action with out of range label (invalid)
      ok 31 d303 - Add mpls push action with out of range tc (invalid)
      ok 32 fd6e - Add mpls push action with ttl of 0 (invalid)
      ok 33 19e9 - Add mpls mod action with mpls label
      ok 34 1fde - Add mpls mod action with max mpls label
      ok 35 0c50 - Add mpls mod action with mpls label exceeding max (invalid)
      ok 36 10b6 - Add mpls mod action with mpls label of MPLS_LABEL_IMPLNULL (invalid)
      ok 37 57c9 - Add mpls mod action with mpls min tc
      ok 38 6872 - Add mpls mod action with mpls max tc
      ok 39 a70a - Add mpls mod action with mpls tc exceeding max (invalid)
      ok 40 6ed5 - Add mpls mod action with mpls ttl
      ok 41 77c1 - Add mpls mod action with mpls ttl and cookie
      ok 42 b80f - Add mpls mod action with mpls max ttl
      ok 43 8864 - Add mpls mod action with mpls min ttl
      ok 44 6c06 - Add mpls mod action with mpls ttl of 0 (invalid)
      ok 45 b5d8 - Add mpls mod action with mpls ttl exceeding max (invalid)
      ok 46 451f - Add mpls mod action with mpls max bos
      ok 47 a1ed - Add mpls mod action with mpls min bos
      ok 48 3dcf - Add mpls mod action with mpls bos exceeding max (invalid)
      ok 49 db7c - Add mpls mod action with protocol (invalid)
      ok 50 b070 - Replace existing mpls push action with new ID
      ok 51 95a9 - Replace existing mpls push action with new label, tc, ttl and cookie
      ok 52 6cce - Delete mpls pop action
      ok 53 d138 - Flush mpls actions
      
      Fixes: 2a2ea508 ("net: sched: add mpls manipulation actions to TC")
      Reviewed-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
      Signed-off-by: default avatarPedro Tammela <pctammela@mojatatu.com>
      Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e88d78a7
    • Pedro Tammela's avatar
      net/sched: act_pedit: fix action bind logic · e9e42292
      Pedro Tammela authored
      The TC architecture allows filters and actions to be created independently.
      In filters the user can reference action objects using:
      tc action add action pedit ... index 1
      tc filter add ... action pedit index 1
      
      In the current code for act_pedit this is broken as it checks netlink
      attributes for create/update before actually checking if we are binding to an
      existing action.
      
      tdc results:
      1..69
      ok 1 319a - Add pedit action that mangles IP TTL
      ok 2 7e67 - Replace pedit action with invalid goto chain
      ok 3 377e - Add pedit action with RAW_OP offset u32
      ok 4 a0ca - Add pedit action with RAW_OP offset u32 (INVALID)
      ok 5 dd8a - Add pedit action with RAW_OP offset u16 u16
      ok 6 53db - Add pedit action with RAW_OP offset u16 (INVALID)
      ok 7 5c7e - Add pedit action with RAW_OP offset u8 add value
      ok 8 2893 - Add pedit action with RAW_OP offset u8 quad
      ok 9 3a07 - Add pedit action with RAW_OP offset u8-u16-u8
      ok 10 ab0f - Add pedit action with RAW_OP offset u16-u8-u8
      ok 11 9d12 - Add pedit action with RAW_OP offset u32 set u16 clear u8 invert
      ok 12 ebfa - Add pedit action with RAW_OP offset overflow u32 (INVALID)
      ok 13 f512 - Add pedit action with RAW_OP offset u16 at offmask shift set
      ok 14 c2cb - Add pedit action with RAW_OP offset u32 retain value
      ok 15 1762 - Add pedit action with RAW_OP offset u8 clear value
      ok 16 bcee - Add pedit action with RAW_OP offset u8 retain value
      ok 17 e89f - Add pedit action with RAW_OP offset u16 retain value
      ok 18 c282 - Add pedit action with RAW_OP offset u32 clear value
      ok 19 c422 - Add pedit action with RAW_OP offset u16 invert value
      ok 20 d3d3 - Add pedit action with RAW_OP offset u32 invert value
      ok 21 57e5 - Add pedit action with RAW_OP offset u8 preserve value
      ok 22 99e0 - Add pedit action with RAW_OP offset u16 preserve value
      ok 23 1892 - Add pedit action with RAW_OP offset u32 preserve value
      ok 24 4b60 - Add pedit action with RAW_OP negative offset u16/u32 set value
      ok 25 a5a7 - Add pedit action with LAYERED_OP eth set src
      ok 26 86d4 - Add pedit action with LAYERED_OP eth set src & dst
      ok 27 f8a9 - Add pedit action with LAYERED_OP eth set dst
      ok 28 c715 - Add pedit action with LAYERED_OP eth set src (INVALID)
      ok 29 8131 - Add pedit action with LAYERED_OP eth set dst (INVALID)
      ok 30 ba22 - Add pedit action with LAYERED_OP eth type set/clear sequence
      ok 31 dec4 - Add pedit action with LAYERED_OP eth set type (INVALID)
      ok 32 ab06 - Add pedit action with LAYERED_OP eth add type
      ok 33 918d - Add pedit action with LAYERED_OP eth invert src
      ok 34 a8d4 - Add pedit action with LAYERED_OP eth invert dst
      ok 35 ee13 - Add pedit action with LAYERED_OP eth invert type
      ok 36 7588 - Add pedit action with LAYERED_OP ip set src
      ok 37 0fa7 - Add pedit action with LAYERED_OP ip set dst
      ok 38 5810 - Add pedit action with LAYERED_OP ip set src & dst
      ok 39 1092 - Add pedit action with LAYERED_OP ip set ihl & dsfield
      ok 40 02d8 - Add pedit action with LAYERED_OP ip set ttl & protocol
      ok 41 3e2d - Add pedit action with LAYERED_OP ip set ttl (INVALID)
      ok 42 31ae - Add pedit action with LAYERED_OP ip ttl clear/set
      ok 43 486f - Add pedit action with LAYERED_OP ip set duplicate fields
      ok 44 e790 - Add pedit action with LAYERED_OP ip set ce, df, mf, firstfrag, nofrag fields
      ok 45 cc8a - Add pedit action with LAYERED_OP ip set tos
      ok 46 7a17 - Add pedit action with LAYERED_OP ip set precedence
      ok 47 c3b6 - Add pedit action with LAYERED_OP ip add tos
      ok 48 43d3 - Add pedit action with LAYERED_OP ip add precedence
      ok 49 438e - Add pedit action with LAYERED_OP ip clear tos
      ok 50 6b1b - Add pedit action with LAYERED_OP ip clear precedence
      ok 51 824a - Add pedit action with LAYERED_OP ip invert tos
      ok 52 106f - Add pedit action with LAYERED_OP ip invert precedence
      ok 53 6829 - Add pedit action with LAYERED_OP beyond ip set dport & sport
      ok 54 afd8 - Add pedit action with LAYERED_OP beyond ip set icmp_type & icmp_code
      ok 55 3143 - Add pedit action with LAYERED_OP beyond ip set dport (INVALID)
      ok 56 815c - Add pedit action with LAYERED_OP ip6 set src
      ok 57 4dae - Add pedit action with LAYERED_OP ip6 set dst
      ok 58 fc1f - Add pedit action with LAYERED_OP ip6 set src & dst
      ok 59 6d34 - Add pedit action with LAYERED_OP ip6 dst retain value (INVALID)
      ok 60 94bb - Add pedit action with LAYERED_OP ip6 traffic_class
      ok 61 6f5e - Add pedit action with LAYERED_OP ip6 flow_lbl
      ok 62 6795 - Add pedit action with LAYERED_OP ip6 set payload_len, nexthdr, hoplimit
      ok 63 1442 - Add pedit action with LAYERED_OP tcp set dport & sport
      ok 64 b7ac - Add pedit action with LAYERED_OP tcp sport set (INVALID)
      ok 65 cfcc - Add pedit action with LAYERED_OP tcp flags set
      ok 66 3bc4 - Add pedit action with LAYERED_OP tcp set dport, sport & flags fields
      ok 67 f1c8 - Add pedit action with LAYERED_OP udp set dport & sport
      ok 68 d784 - Add pedit action with mixed RAW/LAYERED_OP #1
      ok 69 70ca - Add pedit action with mixed RAW/LAYERED_OP #2
      
      Fixes: 71d0ed70 ("net/act_pedit: Support using offset relative to the conventional network headers")
      Fixes: f67169fe ("net/sched: act_pedit: fix WARN() in the traffic path")
      Reviewed-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
      Signed-off-by: default avatarPedro Tammela <pctammela@mojatatu.com>
      Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e9e42292