1. 30 Oct, 2020 40 commits
    • Andrew Lunn's avatar
      net: nfc: Fix kerneldoc warnings · 7cdda1c1
      Andrew Lunn authored
      net//nfc/core.c:1046: warning: Function parameter or member 'tx_headroom' not described in 'nfc_allocate_device'
      net//nfc/core.c:1046: warning: Function parameter or member 'tx_tailroom' not described in 'nfc_allocate_device'
      net//nfc/core.c:198: warning: Excess function parameter 'protocols' description in 'nfc_start_poll'
      net//nfc/core.c:198: warning: Function parameter or member 'im_protocols' not described in 'nfc_start_poll'
      net//nfc/core.c:198: warning: Function parameter or member 'tm_protocols' not described in 'nfc_start_poll'
      net//nfc/core.c:441: warning: Function parameter or member 'mode' not described in 'nfc_deactivate_target'
      net//nfc/core.c:711: warning: Function parameter or member 'dev' not described in 'nfc_alloc_send_skb'
      net//nfc/core.c:711: warning: Function parameter or member 'err' not described in 'nfc_alloc_send_skb'
      net//nfc/core.c:711: warning: Function parameter or member 'flags' not described in 'nfc_alloc_send_skb'
      net//nfc/core.c:711: warning: Function parameter or member 'sk' not described in 'nfc_alloc_send_skb'
      net//nfc/digital_core.c:470: warning: Function parameter or member 'im_protocols' not described in 'digital_start_poll'
      net//nfc/digital_core.c:470: warning: Function parameter or member 'nfc_dev' not described in 'digital_start_poll'
      net//nfc/digital_core.c:470: warning: Function parameter or member 'tm_protocols' not described in 'digital_start_poll'
      net//nfc/nci/core.c:1119: warning: Function parameter or member 'tx_headroom' not described in 'nci_allocate_device'
      net//nfc/nci/core.c:1119: warning: Function parameter or member 'tx_tailroom' not described in 'nci_allocate_device'
      Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Link: https://lore.kernel.org/r/20201028005653.930467-1-andrew@lunn.chSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      7cdda1c1
    • Andrew Lunn's avatar
      net: appletalk: fix kerneldoc warnings · 709565ae
      Andrew Lunn authored
      net/appletalk/aarp.c:68: warning: Function parameter or member 'dev' not described in 'aarp_entry'
      net/appletalk/aarp.c:68: warning: Function parameter or member 'expires_at' not described in 'aarp_entry'
      net/appletalk/aarp.c:68: warning: Function parameter or member 'hwaddr' not described in 'aarp_entry'
      net/appletalk/aarp.c:68: warning: Function parameter or member 'last_sent' not described in 'aarp_entry'
      net/appletalk/aarp.c:68: warning: Function parameter or member 'next' not described in 'aarp_entry'
      net/appletalk/aarp.c:68: warning: Function parameter or member 'packet_queue' not described in 'aarp_entry'
      net/appletalk/aarp.c:68: warning: Function parameter or member 'status' not described in 'aarp_entry'
      net/appletalk/aarp.c:68: warning: Function parameter or member 'target_addr' not described in 'aarp_entry'
      net/appletalk/aarp.c:68: warning: Function parameter or member 'xmit_count' not described in 'aarp_entry'
      net/appletalk/ddp.c:1422: warning: Function parameter or member 'dev' not described in 'atalk_rcv'
      net/appletalk/ddp.c:1422: warning: Function parameter or member 'orig_dev' not described in 'atalk_rcv'
      net/appletalk/ddp.c:1422: warning: Function parameter or member 'pt' not described in 'atalk_rcv'
      net/appletalk/ddp.c:1422: warning: Function parameter or member 'skb' not described in 'atalk_rcv'
      Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Link: https://lore.kernel.org/r/20201028005527.930388-1-andrew@lunn.chSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      709565ae
    • Andrew Lunn's avatar
      net: netlabel: Fix kerneldoc warnings · 294ea291
      Andrew Lunn authored
      net/netlabel/netlabel_calipso.c:376: warning: Function parameter or member 'ops' not described in 'netlbl_calipso_ops_register'
      Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Acked-by: default avatarPaul Moore <paul@paul-moore.com>
      Link: https://lore.kernel.org/r/20201028005350.930299-1-andrew@lunn.chSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      294ea291
    • Andrew Lunn's avatar
      net: l3mdev: Fix kerneldoc warning · 9d637f81
      Andrew Lunn authored
      net/l3mdev/l3mdev.c:249: warning: Function parameter or member 'arg' not described in 'l3mdev_fib_rule_match'
      Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Reviewed-by: default avatarDavid Ahern <dsahern@kernel.org>
      Link: https://lore.kernel.org/r/20201028005059.930192-1-andrew@lunn.chSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      9d637f81
    • Andrew Lunn's avatar
      net: openvswitch: Fix kerneldoc warnings · 210bba67
      Andrew Lunn authored
      net/openvswitch/flow.c:303: warning: Function parameter or member 'key_vh' not described in 'parse_vlan_tag'
      net/openvswitch/flow.c:303: warning: Function parameter or member 'skb' not described in 'parse_vlan_tag'
      net/openvswitch/flow.c:303: warning: Function parameter or member 'untag_vlan' not described in 'parse_vlan_tag'
      net/openvswitch/vport.c:122: warning: Function parameter or member 'parms' not described in 'ovs_vport_alloc'
      Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Link: https://lore.kernel.org/r/20201028004849.930094-1-andrew@lunn.chSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      210bba67
    • Andrew Lunn's avatar
      net: llc: Fix kerneldoc warnings · 8756f474
      Andrew Lunn authored
      net/llc/llc_conn.c:917: warning: Function parameter or member 'kern' not described in 'llc_sk_alloc'
      net/llc/llc_conn.c:917: warning: Function parameter or member 'prot' not described in 'llc_sk_alloc'
      Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Link: https://lore.kernel.org/r/20201028004644.929997-1-andrew@lunn.chSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      8756f474
    • Jakub Kicinski's avatar
      Merge branch 'markup-some-printk-like-functions' · bfa45445
      Jakub Kicinski authored
      Andrew Lunn says:
      
      ====================
      Markup some printk like functions
      
      W=1 warns of functions which look like printk but don't have
      attributes so the compile can check that arguments matches the format
      string.
      ====================
      
      Link: https://lore.kernel.org/r/20201028003849.929490-1-andrew@lunn.chSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      bfa45445
    • Andrew Lunn's avatar
      net: tipc: Add __printf() markup to fix -Wsuggest-attribute=format · 79b1119b
      Andrew Lunn authored
      net/tipc/netlink_compat.c: In function ‘tipc_tlv_sprintf’:
      net/tipc/netlink_compat.c:137:2: warning: function ‘tipc_tlv_sprintf’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
        137 |  n = vscnprintf(buf, rem, fmt, args);
      Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      79b1119b
    • Andrew Lunn's avatar
      net: dccp: Add __printf() markup to fix -Wsuggest-attribute=format · c7bb8688
      Andrew Lunn authored
      net/dccp/ccid.c: In function ‘ccid_kmem_cache_create’:
      net/dccp/ccid.c:85:2: warning: function ‘ccid_kmem_cache_create’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
         85 |  vsnprintf(slab_name_fmt, CCID_SLAB_NAME_LENGTH, fmt, args);
      Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      c7bb8688
    • Andrew Lunn's avatar
      net: tipc: Fix parameter types passed to %s formater · b3b7e64b
      Andrew Lunn authored
      Now that the compiler is performing printf checking, we get the warning:
      
      net/tipc/netlink_compat.c: In function ‘tipc_nl_compat_link_stat_dump’:
      net/tipc/netlink_compat.c:591:39: warning: format ‘%s’ expects argument of type ‘char *’, but argument 3 has type ‘void *’ [-Wformat=]
        591 |  tipc_tlv_sprintf(msg->rep, "\nLink <%s>\n",
            |                                      ~^
            |                                       |
            |                                       char *
            |                                      %p
        592 |     nla_data(link[TIPC_NLA_LINK_NAME]));
            |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            |     |
            |     void *
      
      There is no nla_string(), so cast to a char *.
      Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Link: https://lore.kernel.org/r/20201028004333.929816-1-andrew@lunn.chSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      b3b7e64b
    • Jakub Kicinski's avatar
      Merge branch 'selftests-net-bridge-add-tests-for-igmpv3' · 23306008
      Jakub Kicinski authored
      Nikolay Aleksandrov says:
      
      ====================
      selftests: net: bridge: add tests for IGMPv3
      
      This set adds tests for the bridge's new IGMPv3 support. The tests use
      precooked packets which are sent via mausezahn and the resulting state
      after each test is checked for proper X,Y sets, (*,G) source list, source
      list entry timers, (S,G) existence and flags, packet forwarding and
      blocking, exclude group expiration and (*,G) auto-add. The first 3 patches
      prepare the existing IGMPv2 tests, then patch 4 adds new helpers which are
      used throughout the rest of the v3 tests.
      The following new tests are added:
       - base case: IGMPv3 report 239.10.10.10 is_include (A)
       - include -> allow report
       - include -> is_include report
       - include -> is_exclude report
       - include -> to_exclude report
       - exclude -> allow report
       - exclude -> is_include report
       - exclude -> is_exclude report
       - exclude -> to_exclude report
       - include -> block report
       - exclude -> block report
       - exclude timeout (move to include + entry deletion)
       - S,G port entry automatic add to a *,G,exclude port
      
      The variable names and set notation are the same as per RFC 3376,
      for more information check RFC 3376 sections 4.2.15 and 6.4.1.
      MLDv2 tests will be added by a separate patch-set.
      ====================
      
      Link: https://lore.kernel.org/r/20201027185934.227040-1-razor@blackwall.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      23306008
    • Nikolay Aleksandrov's avatar
      selftests: net: bridge: add test for igmpv3 *,g auto-add · 414ea375
      Nikolay Aleksandrov authored
      When we have *,G ports in exclude mode and a new S,G,port is added
      the kernel has to automatically create an S,G entry for each exclude
      port to get proper forwarding.
      Signed-off-by: default avatarNikolay Aleksandrov <nikolay@nvidia.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      414ea375
    • Nikolay Aleksandrov's avatar
      selftests: net: bridge: add test for igmpv3 exclude timeout · 18f66c96
      Nikolay Aleksandrov authored
      Test that when a group in exclude mode expires it changes mode to
      include and the blocked entries are deleted.
      Signed-off-by: default avatarNikolay Aleksandrov <nikolay@nvidia.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      18f66c96
    • Nikolay Aleksandrov's avatar
      selftests: net: bridge: add test for igmpv3 exc -> block report · 9eb58e07
      Nikolay Aleksandrov authored
      The test checks for the following case:
         state          report        result                  action
       EXCLUDE (X,Y)  BLOCK (A)     EXCLUDE (X+(A-Y),Y)      (A-X-Y)=Group Timer
                                                             Send Q(G,A-Y)
      Signed-off-by: default avatarNikolay Aleksandrov <nikolay@nvidia.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      9eb58e07
    • Nikolay Aleksandrov's avatar
      selftests: net: bridge: add test for igmpv3 inc -> block report · 80899f1b
      Nikolay Aleksandrov authored
      The test checks for the following case:
          state          report        result                  action
        INCLUDE (A)    BLOCK (B)     INCLUDE (A)              Send Q(G,A*B)
      Signed-off-by: default avatarNikolay Aleksandrov <nikolay@nvidia.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      80899f1b
    • Nikolay Aleksandrov's avatar
      selftests: net: bridge: add test for igmpv3 exc -> to_exclude report · 65bfc146
      Nikolay Aleksandrov authored
      The test checks for the following case:
          state          report        result                  action
        EXCLUDE (X,Y)  TO_EX (A)     EXCLUDE (A-Y,Y*A)        (A-X-Y)=Group Timer
                                                              Delete (X-A)
                                                              Delete (Y-A)
                                                              Send Q(G,A-Y)
                                                              Group Timer=GMI
      Signed-off-by: default avatarNikolay Aleksandrov <nikolay@nvidia.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      65bfc146
    • Nikolay Aleksandrov's avatar
      selftests: net: bridge: add test for igmpv3 exc -> is_exclude report · 7b4f7138
      Nikolay Aleksandrov authored
      The test checks for the following case:
           state          report        result                  action
         EXCLUDE (X,Y)  IS_EX (A)     EXCLUDE (A-Y,Y*A)        (A-X-Y)=GMI
                                                               Delete (X-A)
                                                               Delete (Y-A)
                                                               Group Timer=GMI
      Signed-off-by: default avatarNikolay Aleksandrov <nikolay@nvidia.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      7b4f7138
    • Nikolay Aleksandrov's avatar
      selftests: net: bridge: add test for igmpv3 exc -> is_include report · e7e7ab7c
      Nikolay Aleksandrov authored
      The test checks for the following case:
          state          report        result                  action
         EXCLUDE (X,Y)  IS_IN (A)     EXCLUDE (X+A,Y-A)       (A)=GMI
      Signed-off-by: default avatarNikolay Aleksandrov <nikolay@nvidia.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      e7e7ab7c
    • Nikolay Aleksandrov's avatar
      selftests: net: bridge: add test for igmpv3 exc -> allow report · eecd8cfd
      Nikolay Aleksandrov authored
      The test checks for the following case:
         state          report        result                  action
        EXCLUDE (X,Y)  ALLOW (A)     EXCLUDE (X+A,Y-A)       (A)=GMI
      Signed-off-by: default avatarNikolay Aleksandrov <nikolay@nvidia.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      eecd8cfd
    • Nikolay Aleksandrov's avatar
      selftests: net: bridge: add test for igmpv3 inc -> to_exclude report · 735af7be
      Nikolay Aleksandrov authored
      The test checks for the following case:
        state          report        result                  action
       INCLUDE (A)    TO_EX (B)     EXCLUDE (A*B,B-A)       (B-A)=0
                                                            Delete (A-B)
                                                            Send Q(G,A*B)
                                                            Group Timer=GMI
      Signed-off-by: default avatarNikolay Aleksandrov <nikolay@nvidia.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      735af7be
    • Nikolay Aleksandrov's avatar
      selftests: net: bridge: add test for igmpv3 inc -> is_exclude report · 3c8b9fda
      Nikolay Aleksandrov authored
      The test checks for the following case:
         state          report        result                 action
        INCLUDE (A)    IS_EX (B)     EXCLUDE (A*B,B-A)      (B-A)=0
                                                            Delete (A-B)
                                                            Group Timer=GMI
      Signed-off-by: default avatarNikolay Aleksandrov <nikolay@nvidia.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      3c8b9fda
    • Nikolay Aleksandrov's avatar
      selftests: net: bridge: add test for igmpv3 inc -> is_include report · 47021771
      Nikolay Aleksandrov authored
      The test checks for the following case:
         state          report        result                 action
       INCLUDE (A)    IS_IN (B)     INCLUDE (A+B)            (B)=GMI
      Signed-off-by: default avatarNikolay Aleksandrov <nikolay@nvidia.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      47021771
    • Nikolay Aleksandrov's avatar
      selftests: net: bridge: add tests for igmpv3 is_include and inc -> allow reports · 98ae11cf
      Nikolay Aleksandrov authored
      First we test is_include/include mode then we build on that with allow
      effectively achieving:
        state          report        result                 action
       INCLUDE (A)    ALLOW (B)    INCLUDE (A+B)           (B)=GMI
      Signed-off-by: default avatarNikolay Aleksandrov <nikolay@nvidia.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      98ae11cf
    • Nikolay Aleksandrov's avatar
      selftests: net: bridge: igmp: add IGMPv3 entries' state helpers · 68d3163a
      Nikolay Aleksandrov authored
      Add helpers which will be used in subsequent tests, they are:
       - check_sg_entries: check for proper source list and S,G entry
         existence
       - check_sg_fwding: check for proper traffic forwarding/blocking
       - check_sg_state: check for proper blocked/forwarding entry state
      Signed-off-by: default avatarNikolay Aleksandrov <nikolay@nvidia.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      68d3163a
    • Nikolay Aleksandrov's avatar
      selftests: net: bridge: igmp: check for specific udp ip protocol · f0e260db
      Nikolay Aleksandrov authored
      We have to specifically check for udp protocol in addition to the mac
      address because in IGMPv3 tests group-specific queries will use the same
      mac address.
      Signed-off-by: default avatarNikolay Aleksandrov <nikolay@nvidia.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      f0e260db
    • Nikolay Aleksandrov's avatar
      selftests: net: bridge: igmp: add support for packet source address · 79ae3e25
      Nikolay Aleksandrov authored
      Add support for one more argument which specifies the source address to
      use. It will be later used for IGMPv3 S,G entry testing.
      Signed-off-by: default avatarNikolay Aleksandrov <nikolay@nvidia.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      79ae3e25
    • Nikolay Aleksandrov's avatar
      selftests: net: bridge: rename current igmp tests to igmpv2 · 7afc9d8f
      Nikolay Aleksandrov authored
      To prepare the bridge_igmp.sh for IGMPv3 we need to rename the
      current test to IGMPv2.
      Signed-off-by: default avatarNikolay Aleksandrov <nikolay@nvidia.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      7afc9d8f
    • Andy Shevchenko's avatar
      net: phy: leds: Deduplicate link LED trigger registration · 043d2be2
      Andy Shevchenko authored
      Refactor phy_led_trigger_register() and deduplicate its functionality
      when registering LED trigger for link.
      Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Link: https://lore.kernel.org/r/20201027182146.21355-1-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      043d2be2
    • Vineetha G. Jaya Kumaran's avatar
      net: stmmac: Enable EEE HW LPI timer with auto SW/HW switching · be1c7eae
      Vineetha G. Jaya Kumaran authored
      This patch enables the HW LPI Timer which controls the automatic entry
      and exit of the LPI state.
      The EEE LPI timer value is configured through ethtool. The driver will
      auto select the LPI HW timer if the value in the HW timer supported range.
      Else, the driver will fallback to SW timer.
      Signed-off-by: default avatarVineetha G. Jaya Kumaran <vineetha.g.jaya.kumaran@intel.com>
      Signed-off-by: default avatarVoon Weifeng <weifeng.voon@intel.com>
      Link: https://lore.kernel.org/r/20201027160051.22898-1-weifeng.voon@intel.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      be1c7eae
    • Jakub Kicinski's avatar
      Merge tag 'wimax-staging' of git://git.kernel.org:/pub/scm/linux/kernel/git/arnd/playground · 8911097f
      Jakub Kicinski authored
      Arnd Bergmann says:
      
      ====================
      wimax: move to staging
      
      After I sent a fix for what appeared to be a harmless warning in
      the wimax user interface code, the conclusion was that the whole
      thing has most likely not been used in a very long time, and the
      user interface possibly been broken since b61a5eea ("wimax: use
      genl_register_family_with_ops()").
      
      Using a shared branch between net-next and staging should help
      coordinate patches getting submitted against it.
      ====================
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      8911097f
    • Jon Maloy's avatar
      tipc: add stricter control of reserved service types · 72671b35
      Jon Maloy authored
      TIPC reserves 64 service types for current and future internal use.
      Therefore, the bind() function is meant to block regular user sockets
      from being bound to these values, while it should let through such
      bindings from internal users.
      
      However, since we at the design moment saw no way to distinguish
      between regular and internal users the filter function ended up
      with allowing all bindings of the reserved types which were really
      in use ([0,1]), and block all the rest ([2,63]).
      
      This is risky, since a regular user may bind to the service type
      representing the topology server (TIPC_TOP_SRV == 1) or the one used
      for indicating neighboring node status (TIPC_CFG_SRV == 0), and wreak
      havoc for users of those services, i.e., most users.
      
      The reality is however that TIPC_CFG_SRV never is bound through the
      bind() function, since it doesn't represent a regular socket, and
      TIPC_TOP_SRV can also be made to bypass the checks in tipc_bind()
      by introducing a different entry function, tipc_sk_bind().
      
      It should be noted that although this is a change of the API semantics,
      there is no risk we will break any currently working applications by
      doing this. Any application trying to bind to the values in question
      would be badly broken from the outset, so there is no chance we would
      find any such applications in real-world production systems.
      
      v2: Added warning printout when a user is blocked from binding,
          as suggested by Jakub Kicinski
      Acked-by: default avatarYung Xue <ying.xue@windriver.com>
      Signed-off-by: default avatarJon Maloy <jmaloy@redhat.com>
      Link: https://lore.kernel.org/r/20201030012938.489557-1-jmaloy@redhat.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      72671b35
    • Zhang Qilong's avatar
      net/mac8390: discard unnecessary breaks · 37d38ece
      Zhang Qilong authored
      The 'break' is unnecessary because of previous 'return',
      and we could discard it.
      Signed-off-by: default avatarZhang Qilong <zhangqilong3@huawei.com>
      Link: https://lore.kernel.org/r/20201027135159.71444-1-zhangqilong3@huawei.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      37d38ece
    • Łukasz Stelmach's avatar
      net: mii: Report advertised link capabilities when autonegotiation is off · 8027c85c
      Łukasz Stelmach authored
      Unify the set of information returned by mii_ethtool_get_link_ksettings(),
      mii_ethtool_gset() and phy_ethtool_ksettings_get(). Make the mii_*()
      functions report advertised settings when autonegotiation if disabled.
      Suggested-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarŁukasz Stelmach <l.stelmach@samsung.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Link: https://lore.kernel.org/r/20201027114317.8259-1-l.stelmach@samsung.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      8027c85c
    • Jakub Kicinski's avatar
      Merge branch 'net-bridge-cfm-add-support-for-connectivity-fault-management-cfm' · 6e2b243d
      Jakub Kicinski authored
      Henrik Bjoernlund says:
      
      ====================
      net: bridge: cfm: Add support for Connectivity Fault Management(CFM)
      
      Connectivity Fault Management (CFM) is defined in 802.1Q
      section 12.14.
      
      Connectivity Fault Management (CFM) comprises capabilities for
      detecting, verifying, and isolating connectivity failures in Virtual
      Bridged Networks. These capabilities can be used in networks
      operated by multiple independent organizations, each with restricted
      management access to each other’s equipment.
      
      CFM functions are partitioned as follows:
          — Path discovery
          — Fault detection
          — Fault verification and isolation
          — Fault notification
          — Fault recovery
      
      The primary CFM protocol shims are called Maintenance Points (MPs).
      A MP can be either a MEP or a MHF.
      The MEP:
          -It is the Maintenance association End Point
           described in 802.1Q section 19.2.
          -It is created on a specific level (1-7) and is assuring
           that no CFM frames are passing through this MEP on lower levels.
          -It initiates and terminates/validates CFM frames on its level.
          -It can only exist on a port that is related to a bridge.
      The MHF:
          -It is the Maintenance Domain Intermediate Point
           (MIP) Half Function (MHF) described in 802.1Q section 19.3.
          -It is created on a specific level (1-7).
          -It is extracting/injecting certain CFM frame on this level.
          -It can only exist on a port that is related to a bridge.
          -Currently not supported.
      
      There are defined the following CFM protocol functions:
          -Continuity Check
          -Loopback. Currently not supported.
          -Linktrace. Currently not supported.
      
      This CFM component supports create/delete of MEP instances and
      configuration of the different CFM protocols. Also status information
      can be fetched and delivered through notification due to defect
      status change.
      
      The user interacts with CFM using the 'cfm' user space client
      program, the client talks with the kernel using netlink.
      
      Any notification emitted by CFM from the kernel can be monitored in
      user space by starting 'cfm_server' program.
      
      Currently this 'cfm' and 'cfm_server' programs are standalone placed
      in a cfm repository https://github.com/microchip-ung/cfm but it is
      considered to integrate this into 'iproute2'.
      
      v1 -> v2
          Added the CFM switchdev interface and also added utilization by
          calling the interface from the kernel CFM implementation trying
          to offload CFM functionality to HW. This offload (CFM driver) is
          currently not implemented.
      
          Corrections based on RCF comments:
              -The single CFM kernel implementation Patch is broken up into
               three patches.
              -Changed the list of MEP instances from list_head to
               hlist_head.
              -Removed unnecessary RCU list traversing.
              -Solved RCU unlocking problem.
              -Removed unnecessary comments.
              -Added ASSERT_RTNL() where required.
              -Shaping up on error messages.
              -Correction NETLINK br_fill_ifinfo() to be able to handle
               'filter_mask' with multiple flags asserted.
      
      v2 -> v3
          -The switchdev definition and utilization has been removed as
           there was no switchdev implementation.
          -Some compiling issues are fixed as Reported-by:
           kernel test robot <lkp@intel.com>.
      
      v3 -> v4
          -Fixed potential crash during hlist walk where elements are
           removed.
          -Giving all commits unique titles.
          -NETLINK implementation split into three commits.
          -Commit "bridge: cfm: Bridge port remove" is merged with
           commit "bridge: cfm: Kernel space implementation of CFM. MEP
           create/delete."
      
      v4 -> v5
          -Reordered members in struct net_bridge to bring member
           frame_type_list to the first cache line.
          -Helper functions nla_get_mac() and nla_get_maid() are removed.
          -The NLA_POLICY_NESTED() macro is used to initialize the
           br_cfm_policy array.
          -Fixed reverse xmas tree.
      
      v5 -> v6
          -Fixed that the SKB buffer was not freed during error handling return.
          -Removed unused struct definition.
          -Changed bool to u8 bitfields for space save.
          -Utilizing the NETLINK policy validation feature.
      
      v6 -> v7
          -Removed check of parameters in br_cfm_mep_config_set() and
           br_cfm_cc_peer_mep_add() in first commit of MEP implementation
           (Patch 4 out of 10)
      Reviewed-by: default avatarHoratiu Vultur <horatiu.vultur@microchip.com>
      Signed-off-by: default avatarHenrik Bjoernlund <henrik.bjoernlund@microchip.com>
      ====================
      
      Link: https://lore.kernel.org/r/20201027100251.3241719-1-henrik.bjoernlund@microchip.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      6e2b243d
    • Henrik Bjoernlund's avatar
      bridge: cfm: Netlink Notifications. · b6d0425b
      Henrik Bjoernlund authored
      This is the implementation of Netlink notifications out of CFM.
      
      Notifications are initiated whenever a state change happens in CFM.
      
      IFLA_BRIDGE_CFM:
          Points to the CFM information.
      
      IFLA_BRIDGE_CFM_MEP_STATUS_INFO:
          This indicate that the MEP instance status are following.
      IFLA_BRIDGE_CFM_CC_PEER_STATUS_INFO:
          This indicate that the peer MEP status are following.
      
      CFM nested attribute has the following attributes in next level.
      
      IFLA_BRIDGE_CFM_MEP_STATUS_INSTANCE:
          The MEP instance number of the delivered status.
          The type is NLA_U32.
      IFLA_BRIDGE_CFM_MEP_STATUS_OPCODE_UNEXP_SEEN:
          The MEP instance received CFM PDU with unexpected Opcode.
          The type is NLA_U32 (bool).
      IFLA_BRIDGE_CFM_MEP_STATUS_VERSION_UNEXP_SEEN:
          The MEP instance received CFM PDU with unexpected version.
          The type is NLA_U32 (bool).
      IFLA_BRIDGE_CFM_MEP_STATUS_RX_LEVEL_LOW_SEEN:
          The MEP instance received CCM PDU with MD level lower than
          configured level. This frame is discarded.
          The type is NLA_U32 (bool).
      
      IFLA_BRIDGE_CFM_CC_PEER_STATUS_INSTANCE:
          The MEP instance number of the delivered status.
          The type is NLA_U32.
      IFLA_BRIDGE_CFM_CC_PEER_STATUS_PEER_MEPID:
          The added Peer MEP ID of the delivered status.
          The type is NLA_U32.
      IFLA_BRIDGE_CFM_CC_PEER_STATUS_CCM_DEFECT:
          The CCM defect status.
          The type is NLA_U32 (bool).
          True means no CCM frame is received for 3.25 intervals.
          IFLA_BRIDGE_CFM_CC_CONFIG_EXP_INTERVAL.
      IFLA_BRIDGE_CFM_CC_PEER_STATUS_RDI:
          The last received CCM PDU RDI.
          The type is NLA_U32 (bool).
      IFLA_BRIDGE_CFM_CC_PEER_STATUS_PORT_TLV_VALUE:
          The last received CCM PDU Port Status TLV value field.
          The type is NLA_U8.
      IFLA_BRIDGE_CFM_CC_PEER_STATUS_IF_TLV_VALUE:
          The last received CCM PDU Interface Status TLV value field.
          The type is NLA_U8.
      IFLA_BRIDGE_CFM_CC_PEER_STATUS_SEEN:
          A CCM frame has been received from Peer MEP.
          The type is NLA_U32 (bool).
          This is cleared after GETLINK IFLA_BRIDGE_CFM_CC_PEER_STATUS_INFO.
      IFLA_BRIDGE_CFM_CC_PEER_STATUS_TLV_SEEN:
          A CCM frame with TLV has been received from Peer MEP.
          The type is NLA_U32 (bool).
          This is cleared after GETLINK IFLA_BRIDGE_CFM_CC_PEER_STATUS_INFO.
      IFLA_BRIDGE_CFM_CC_PEER_STATUS_SEQ_UNEXP_SEEN:
          A CCM frame with unexpected sequence number has been received
          from Peer MEP.
          The type is NLA_U32 (bool).
          When a sequence number is not one higher than previously received
          then it is unexpected.
          This is cleared after GETLINK IFLA_BRIDGE_CFM_CC_PEER_STATUS_INFO.
      Signed-off-by: default avatarHenrik Bjoernlund  <henrik.bjoernlund@microchip.com>
      Reviewed-by: default avatarHoratiu Vultur  <horatiu.vultur@microchip.com>
      Acked-by: default avatarNikolay Aleksandrov <nikolay@nvidia.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      b6d0425b
    • Henrik Bjoernlund's avatar
      bridge: cfm: Netlink GET status Interface. · e77824d8
      Henrik Bjoernlund authored
      This is the implementation of CFM netlink status
      get information interface.
      
      Add new nested netlink attributes. These attributes are used by the
      user space to get status information.
      
      GETLINK:
          Request filter RTEXT_FILTER_CFM_STATUS:
          Indicating that CFM status information must be delivered.
      
          IFLA_BRIDGE_CFM:
              Points to the CFM information.
      
          IFLA_BRIDGE_CFM_MEP_STATUS_INFO:
              This indicate that the MEP instance status are following.
          IFLA_BRIDGE_CFM_CC_PEER_STATUS_INFO:
              This indicate that the peer MEP status are following.
      
      CFM nested attribute has the following attributes in next level.
      
      GETLINK RTEXT_FILTER_CFM_STATUS:
          IFLA_BRIDGE_CFM_MEP_STATUS_INSTANCE:
              The MEP instance number of the delivered status.
              The type is u32.
          IFLA_BRIDGE_CFM_MEP_STATUS_OPCODE_UNEXP_SEEN:
              The MEP instance received CFM PDU with unexpected Opcode.
              The type is u32 (bool).
          IFLA_BRIDGE_CFM_MEP_STATUS_VERSION_UNEXP_SEEN:
              The MEP instance received CFM PDU with unexpected version.
              The type is u32 (bool).
          IFLA_BRIDGE_CFM_MEP_STATUS_RX_LEVEL_LOW_SEEN:
              The MEP instance received CCM PDU with MD level lower than
              configured level. This frame is discarded.
              The type is u32 (bool).
      
          IFLA_BRIDGE_CFM_CC_PEER_STATUS_INSTANCE:
              The MEP instance number of the delivered status.
              The type is u32.
          IFLA_BRIDGE_CFM_CC_PEER_STATUS_PEER_MEPID:
              The added Peer MEP ID of the delivered status.
              The type is u32.
          IFLA_BRIDGE_CFM_CC_PEER_STATUS_CCM_DEFECT:
              The CCM defect status.
              The type is u32 (bool).
              True means no CCM frame is received for 3.25 intervals.
              IFLA_BRIDGE_CFM_CC_CONFIG_EXP_INTERVAL.
          IFLA_BRIDGE_CFM_CC_PEER_STATUS_RDI:
              The last received CCM PDU RDI.
              The type is u32 (bool).
          IFLA_BRIDGE_CFM_CC_PEER_STATUS_PORT_TLV_VALUE:
              The last received CCM PDU Port Status TLV value field.
              The type is u8.
          IFLA_BRIDGE_CFM_CC_PEER_STATUS_IF_TLV_VALUE:
              The last received CCM PDU Interface Status TLV value field.
              The type is u8.
          IFLA_BRIDGE_CFM_CC_PEER_STATUS_SEEN:
              A CCM frame has been received from Peer MEP.
              The type is u32 (bool).
              This is cleared after GETLINK IFLA_BRIDGE_CFM_CC_PEER_STATUS_INFO.
          IFLA_BRIDGE_CFM_CC_PEER_STATUS_TLV_SEEN:
              A CCM frame with TLV has been received from Peer MEP.
              The type is u32 (bool).
              This is cleared after GETLINK IFLA_BRIDGE_CFM_CC_PEER_STATUS_INFO.
          IFLA_BRIDGE_CFM_CC_PEER_STATUS_SEQ_UNEXP_SEEN:
              A CCM frame with unexpected sequence number has been received
              from Peer MEP.
              The type is u32 (bool).
              When a sequence number is not one higher than previously received
              then it is unexpected.
              This is cleared after GETLINK IFLA_BRIDGE_CFM_CC_PEER_STATUS_INFO.
      Signed-off-by: default avatarHenrik Bjoernlund  <henrik.bjoernlund@microchip.com>
      Reviewed-by: default avatarHoratiu Vultur  <horatiu.vultur@microchip.com>
      Acked-by: default avatarNikolay Aleksandrov <nikolay@nvidia.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      e77824d8
    • Henrik Bjoernlund's avatar
      bridge: cfm: Netlink GET configuration Interface. · 5e312fc0
      Henrik Bjoernlund authored
      This is the implementation of CFM netlink configuration
      get information interface.
      
      Add new nested netlink attributes. These attributes are used by the
      user space to get configuration information.
      
      GETLINK:
          Request filter RTEXT_FILTER_CFM_CONFIG:
          Indicating that CFM configuration information must be delivered.
      
          IFLA_BRIDGE_CFM:
              Points to the CFM information.
      
          IFLA_BRIDGE_CFM_MEP_CREATE_INFO:
              This indicate that MEP instance create parameters are following.
          IFLA_BRIDGE_CFM_MEP_CONFIG_INFO:
              This indicate that MEP instance config parameters are following.
          IFLA_BRIDGE_CFM_CC_CONFIG_INFO:
              This indicate that MEP instance CC functionality
              parameters are following.
          IFLA_BRIDGE_CFM_CC_RDI_INFO:
              This indicate that CC transmitted CCM PDU RDI
              parameters are following.
          IFLA_BRIDGE_CFM_CC_CCM_TX_INFO:
              This indicate that CC transmitted CCM PDU parameters are
              following.
          IFLA_BRIDGE_CFM_CC_PEER_MEP_INFO:
              This indicate that the added peer MEP IDs are following.
      
      CFM nested attribute has the following attributes in next level.
      
      GETLINK RTEXT_FILTER_CFM_CONFIG:
          IFLA_BRIDGE_CFM_MEP_CREATE_INSTANCE:
              The created MEP instance number.
              The type is u32.
          IFLA_BRIDGE_CFM_MEP_CREATE_DOMAIN:
              The created MEP domain.
              The type is u32 (br_cfm_domain).
              It must be BR_CFM_PORT.
              This means that CFM frames are transmitted and received
              directly on the port - untagged. Not in a VLAN.
          IFLA_BRIDGE_CFM_MEP_CREATE_DIRECTION:
              The created MEP direction.
              The type is u32 (br_cfm_mep_direction).
              It must be BR_CFM_MEP_DIRECTION_DOWN.
              This means that CFM frames are transmitted and received on
              the port. Not in the bridge.
          IFLA_BRIDGE_CFM_MEP_CREATE_IFINDEX:
              The created MEP residence port ifindex.
              The type is u32 (ifindex).
      
          IFLA_BRIDGE_CFM_MEP_DELETE_INSTANCE:
              The deleted MEP instance number.
              The type is u32.
      
          IFLA_BRIDGE_CFM_MEP_CONFIG_INSTANCE:
              The configured MEP instance number.
              The type is u32.
          IFLA_BRIDGE_CFM_MEP_CONFIG_UNICAST_MAC:
              The configured MEP unicast MAC address.
              The type is 6*u8 (array).
              This is used as SMAC in all transmitted CFM frames.
          IFLA_BRIDGE_CFM_MEP_CONFIG_MDLEVEL:
              The configured MEP unicast MD level.
              The type is u32.
              It must be in the range 1-7.
              No CFM frames are passing through this MEP on lower levels.
          IFLA_BRIDGE_CFM_MEP_CONFIG_MEPID:
              The configured MEP ID.
              The type is u32.
              It must be in the range 0-0x1FFF.
              This MEP ID is inserted in any transmitted CCM frame.
      
          IFLA_BRIDGE_CFM_CC_CONFIG_INSTANCE:
              The configured MEP instance number.
              The type is u32.
          IFLA_BRIDGE_CFM_CC_CONFIG_ENABLE:
              The Continuity Check (CC) functionality is enabled or disabled.
              The type is u32 (bool).
          IFLA_BRIDGE_CFM_CC_CONFIG_EXP_INTERVAL:
              The CC expected receive interval of CCM frames.
              The type is u32 (br_cfm_ccm_interval).
              This is also the transmission interval of CCM frames when enabled.
          IFLA_BRIDGE_CFM_CC_CONFIG_EXP_MAID:
              The CC expected receive MAID in CCM frames.
              The type is CFM_MAID_LENGTH*u8.
              This is MAID is also inserted in transmitted CCM frames.
      
          IFLA_BRIDGE_CFM_CC_PEER_MEP_INSTANCE:
              The configured MEP instance number.
              The type is u32.
          IFLA_BRIDGE_CFM_CC_PEER_MEPID:
              The CC Peer MEP ID added.
              The type is u32.
              When a Peer MEP ID is added and CC is enabled it is expected to
              receive CCM frames from that Peer MEP.
      
          IFLA_BRIDGE_CFM_CC_RDI_INSTANCE:
              The configured MEP instance number.
              The type is u32.
          IFLA_BRIDGE_CFM_CC_RDI_RDI:
              The RDI that is inserted in transmitted CCM PDU.
              The type is u32 (bool).
      
          IFLA_BRIDGE_CFM_CC_CCM_TX_INSTANCE:
              The configured MEP instance number.
              The type is u32.
          IFLA_BRIDGE_CFM_CC_CCM_TX_DMAC:
              The transmitted CCM frame destination MAC address.
              The type is 6*u8 (array).
              This is used as DMAC in all transmitted CFM frames.
          IFLA_BRIDGE_CFM_CC_CCM_TX_SEQ_NO_UPDATE:
              The transmitted CCM frame update (increment) of sequence
              number is enabled or disabled.
              The type is u32 (bool).
          IFLA_BRIDGE_CFM_CC_CCM_TX_PERIOD:
              The period of time where CCM frame are transmitted.
              The type is u32.
              The time is given in seconds. SETLINK IFLA_BRIDGE_CFM_CC_CCM_TX
              must be done before timeout to keep transmission alive.
              When period is zero any ongoing CCM frame transmission
              will be stopped.
          IFLA_BRIDGE_CFM_CC_CCM_TX_IF_TLV:
              The transmitted CCM frame update with Interface Status TLV
              is enabled or disabled.
              The type is u32 (bool).
          IFLA_BRIDGE_CFM_CC_CCM_TX_IF_TLV_VALUE:
              The transmitted Interface Status TLV value field.
              The type is u8.
          IFLA_BRIDGE_CFM_CC_CCM_TX_PORT_TLV:
              The transmitted CCM frame update with Port Status TLV is enabled
              or disabled.
              The type is u32 (bool).
          IFLA_BRIDGE_CFM_CC_CCM_TX_PORT_TLV_VALUE:
              The transmitted Port Status TLV value field.
              The type is u8.
      Signed-off-by: default avatarHenrik Bjoernlund  <henrik.bjoernlund@microchip.com>
      Reviewed-by: default avatarHoratiu Vultur  <horatiu.vultur@microchip.com>
      Acked-by: default avatarNikolay Aleksandrov <nikolay@nvidia.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      5e312fc0
    • Henrik Bjoernlund's avatar
      bridge: cfm: Netlink SET configuration Interface. · 2be665c3
      Henrik Bjoernlund authored
      This is the implementation of CFM netlink configuration
      set information interface.
      
      Add new nested netlink attributes. These attributes are used by the
      user space to create/delete/configure CFM instances.
      
      SETLINK:
          IFLA_BRIDGE_CFM:
              Indicate that the following attributes are CFM.
      
          IFLA_BRIDGE_CFM_MEP_CREATE:
              This indicate that a MEP instance must be created.
          IFLA_BRIDGE_CFM_MEP_DELETE:
              This indicate that a MEP instance must be deleted.
          IFLA_BRIDGE_CFM_MEP_CONFIG:
              This indicate that a MEP instance must be configured.
          IFLA_BRIDGE_CFM_CC_CONFIG:
              This indicate that a MEP instance Continuity Check (CC)
              functionality must be configured.
          IFLA_BRIDGE_CFM_CC_PEER_MEP_ADD:
              This indicate that a CC Peer MEP must be added.
          IFLA_BRIDGE_CFM_CC_PEER_MEP_REMOVE:
              This indicate that a CC Peer MEP must be removed.
          IFLA_BRIDGE_CFM_CC_CCM_TX:
              This indicate that the CC transmitted CCM PDU must be configured.
          IFLA_BRIDGE_CFM_CC_RDI:
              This indicate that the CC transmitted CCM PDU RDI must be
              configured.
      
      CFM nested attribute has the following attributes in next level.
      
      SETLINK RTEXT_FILTER_CFM_CONFIG:
          IFLA_BRIDGE_CFM_MEP_CREATE_INSTANCE:
              The created MEP instance number.
              The type is u32.
          IFLA_BRIDGE_CFM_MEP_CREATE_DOMAIN:
              The created MEP domain.
              The type is u32 (br_cfm_domain).
              It must be BR_CFM_PORT.
              This means that CFM frames are transmitted and received
              directly on the port - untagged. Not in a VLAN.
          IFLA_BRIDGE_CFM_MEP_CREATE_DIRECTION:
              The created MEP direction.
              The type is u32 (br_cfm_mep_direction).
              It must be BR_CFM_MEP_DIRECTION_DOWN.
              This means that CFM frames are transmitted and received on
              the port. Not in the bridge.
          IFLA_BRIDGE_CFM_MEP_CREATE_IFINDEX:
              The created MEP residence port ifindex.
              The type is u32 (ifindex).
      
          IFLA_BRIDGE_CFM_MEP_DELETE_INSTANCE:
              The deleted MEP instance number.
              The type is u32.
      
          IFLA_BRIDGE_CFM_MEP_CONFIG_INSTANCE:
              The configured MEP instance number.
              The type is u32.
          IFLA_BRIDGE_CFM_MEP_CONFIG_UNICAST_MAC:
              The configured MEP unicast MAC address.
              The type is 6*u8 (array).
              This is used as SMAC in all transmitted CFM frames.
          IFLA_BRIDGE_CFM_MEP_CONFIG_MDLEVEL:
              The configured MEP unicast MD level.
              The type is u32.
              It must be in the range 1-7.
              No CFM frames are passing through this MEP on lower levels.
          IFLA_BRIDGE_CFM_MEP_CONFIG_MEPID:
              The configured MEP ID.
              The type is u32.
              It must be in the range 0-0x1FFF.
              This MEP ID is inserted in any transmitted CCM frame.
      
          IFLA_BRIDGE_CFM_CC_CONFIG_INSTANCE:
              The configured MEP instance number.
              The type is u32.
          IFLA_BRIDGE_CFM_CC_CONFIG_ENABLE:
              The Continuity Check (CC) functionality is enabled or disabled.
              The type is u32 (bool).
          IFLA_BRIDGE_CFM_CC_CONFIG_EXP_INTERVAL:
              The CC expected receive interval of CCM frames.
              The type is u32 (br_cfm_ccm_interval).
              This is also the transmission interval of CCM frames when enabled.
          IFLA_BRIDGE_CFM_CC_CONFIG_EXP_MAID:
              The CC expected receive MAID in CCM frames.
              The type is CFM_MAID_LENGTH*u8.
              This is MAID is also inserted in transmitted CCM frames.
      
          IFLA_BRIDGE_CFM_CC_PEER_MEP_INSTANCE:
              The configured MEP instance number.
              The type is u32.
          IFLA_BRIDGE_CFM_CC_PEER_MEPID:
              The CC Peer MEP ID added.
              The type is u32.
              When a Peer MEP ID is added and CC is enabled it is expected to
              receive CCM frames from that Peer MEP.
      
          IFLA_BRIDGE_CFM_CC_RDI_INSTANCE:
              The configured MEP instance number.
              The type is u32.
          IFLA_BRIDGE_CFM_CC_RDI_RDI:
              The RDI that is inserted in transmitted CCM PDU.
              The type is u32 (bool).
      
          IFLA_BRIDGE_CFM_CC_CCM_TX_INSTANCE:
              The configured MEP instance number.
              The type is u32.
          IFLA_BRIDGE_CFM_CC_CCM_TX_DMAC:
              The transmitted CCM frame destination MAC address.
              The type is 6*u8 (array).
              This is used as DMAC in all transmitted CFM frames.
          IFLA_BRIDGE_CFM_CC_CCM_TX_SEQ_NO_UPDATE:
              The transmitted CCM frame update (increment) of sequence
              number is enabled or disabled.
              The type is u32 (bool).
          IFLA_BRIDGE_CFM_CC_CCM_TX_PERIOD:
              The period of time where CCM frame are transmitted.
              The type is u32.
              The time is given in seconds. SETLINK IFLA_BRIDGE_CFM_CC_CCM_TX
              must be done before timeout to keep transmission alive.
              When period is zero any ongoing CCM frame transmission
              will be stopped.
          IFLA_BRIDGE_CFM_CC_CCM_TX_IF_TLV:
              The transmitted CCM frame update with Interface Status TLV
              is enabled or disabled.
              The type is u32 (bool).
          IFLA_BRIDGE_CFM_CC_CCM_TX_IF_TLV_VALUE:
              The transmitted Interface Status TLV value field.
              The type is u8.
          IFLA_BRIDGE_CFM_CC_CCM_TX_PORT_TLV:
              The transmitted CCM frame update with Port Status TLV is enabled
              or disabled.
              The type is u32 (bool).
          IFLA_BRIDGE_CFM_CC_CCM_TX_PORT_TLV_VALUE:
              The transmitted Port Status TLV value field.
              The type is u8.
      Signed-off-by: default avatarHenrik Bjoernlund  <henrik.bjoernlund@microchip.com>
      Reviewed-by: default avatarHoratiu Vultur  <horatiu.vultur@microchip.com>
      Acked-by: default avatarNikolay Aleksandrov <nikolay@nvidia.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      2be665c3
    • Henrik Bjoernlund's avatar
      bridge: cfm: Kernel space implementation of CFM. CCM frame RX added. · dc32cbb3
      Henrik Bjoernlund authored
      This is the third commit of the implementation of the CFM protocol
      according to 802.1Q section 12.14.
      
      Functionality is extended with CCM frame reception.
      The MEP instance now contains CCM based status information.
      Most important is the CCM defect status indicating if correct
      CCM frames are received with the expected interval.
      Signed-off-by: default avatarHenrik Bjoernlund  <henrik.bjoernlund@microchip.com>
      Reviewed-by: default avatarHoratiu Vultur  <horatiu.vultur@microchip.com>
      Acked-by: default avatarNikolay Aleksandrov <nikolay@nvidia.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      dc32cbb3
    • Henrik Bjoernlund's avatar
      bridge: cfm: Kernel space implementation of CFM. CCM frame TX added. · a806ad8e
      Henrik Bjoernlund authored
      This is the second commit of the implementation of the CFM protocol
      according to 802.1Q section 12.14.
      
      Functionality is extended with CCM frame transmission.
      
      Interface is extended with these functions:
      br_cfm_cc_rdi_set()
      br_cfm_cc_ccm_tx()
      br_cfm_cc_config_set()
      
      A MEP Continuity Check feature can be configured by
      br_cfm_cc_config_set()
          The Continuity Check parameters can be configured to be used when
          transmitting CCM.
      
      A MEP can be configured to start or stop transmission of CCM frames by
      br_cfm_cc_ccm_tx()
          The CCM will be transmitted for a selected period in seconds.
          Must call this function before timeout to keep transmission alive.
      
      A MEP transmitting CCM can be configured with inserted RDI in PDU by
      br_cfm_cc_rdi_set()
      Signed-off-by: default avatarHenrik Bjoernlund  <henrik.bjoernlund@microchip.com>
      Reviewed-by: default avatarHoratiu Vultur  <horatiu.vultur@microchip.com>
      Acked-by: default avatarNikolay Aleksandrov <nikolay@nvidia.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      a806ad8e