1. 02 12月, 2020 40 次提交
    • G
      net/smc: Add diagnostic information to link structure · 6443b2f6
      Guvenc Gulce 提交于
      During link creation add net-device ifindex and ib-device
      name to link structure. This is needed for diagnostic purposes.
      
      When diagnostic information is gathered, we need to traverse
      device, linkgroup and link structures, to be able to do that
      we need to hold a spinlock for the linkgroup list, without this
      diagnostic information in link structure, another device list
      mutex holding would be necessary to dereference the device
      pointer in the link structure which would be impossible when
      holding a spinlock already.
      Signed-off-by: NGuvenc Gulce <guvenc@linux.ibm.com>
      Signed-off-by: NKarsten Graul <kgraul@linux.ibm.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      6443b2f6
    • G
      net/smc: Add diagnostic information to smc ib-device · 3d453f53
      Guvenc Gulce 提交于
      During smc ib-device creation, add network device ifindex to smc
      ib-device structure. Register for netdevice changes and update ib-device
      accordingly. This is needed for diagnostic purposes.
      Signed-off-by: NGuvenc Gulce <guvenc@linux.ibm.com>
      Signed-off-by: NKarsten Graul <kgraul@linux.ibm.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      3d453f53
    • G
      net/smc: Add link counters for IB device ports · ddc99286
      Guvenc Gulce 提交于
      Add link counters to the structure of the smc ib device, one counter per
      ib port. Increase/decrease the counters as needed in the corresponding
      routines.
      Signed-off-by: NGuvenc Gulce <guvenc@linux.ibm.com>
      Signed-off-by: NKarsten Graul <kgraul@linux.ibm.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      ddc99286
    • G
      net/smc: Add connection counters for links · 07d51580
      Guvenc Gulce 提交于
      Add connection counters to the structure of the link.
      Increase/decrease the counters as needed in the corresponding
      routines.
      Signed-off-by: NGuvenc Gulce <guvenc@linux.ibm.com>
      Signed-off-by: NKarsten Graul <kgraul@linux.ibm.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      07d51580
    • G
      net/smc: Use active link of the connection · 8b2f0f44
      Guvenc Gulce 提交于
      Use active link of the connection directly and not
      via linkgroup array structure when obtaining link
      data of the connection.
      Signed-off-by: NGuvenc Gulce <guvenc@linux.ibm.com>
      Signed-off-by: NKarsten Graul <kgraul@linux.ibm.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      8b2f0f44
    • K
      net/smc: use helper smc_conn_abort() in listen processing · 8cf3f3e4
      Karsten Graul 提交于
      The helper smc_connect_abort() can be used by the listen processing
      functions, too. And rename this helper to smc_conn_abort() to make the
      purpose clearer.
      No functional change.
      Signed-off-by: NKarsten Graul <kgraul@linux.ibm.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      8cf3f3e4
    • R
      net/tls: make sure tls offload sets salt_size · d31c0800
      Rohit Maheshwari 提交于
      Recent changes made to remove AES constants started using protocol
      aware salt_size. ctx->prot_info's salt_size is filled in tls sw case,
      but not in tls offload mode, and was working so far because of the
      hard coded value was used.
      
      Fixes: 6942a284 ("net/tls: make inline helpers protocol-aware")
      Signed-off-by: NRohit Maheshwari <rohitm@chelsio.com>
      Link: https://lore.kernel.org/r/20201201090752.27355-1-rohitm@chelsio.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      d31c0800
    • J
      Merge branch 'ionic-updates' · 3d2f670a
      Jakub Kicinski 提交于
      Shannon Nelson says:
      
      ====================
      ionic updates
      
      These are a pair of small code cleanups.
      ====================
      
      Link: https://lore.kernel.org/r/20201201002546.4123-1-snelson@pensando.ioSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      3d2f670a
    • S
      ionic: change mtu after queues are stopped · 79ba55a3
      Shannon Nelson 提交于
      Order of operations is slightly more correct in the driver
      to change the netdev->mtu after the queues have been stopped
      rather than before.
      Signed-off-by: NShannon Nelson <snelson@pensando.io>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      79ba55a3
    • S
      ionic: remove some unnecessary oom messages · c0c682ee
      Shannon Nelson 提交于
      Remove memory allocation fail messages where the OOM stack
      trace will make it obvious which allocation request failed.
      Signed-off-by: NShannon Nelson <snelson@pensando.io>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      c0c682ee
    • Y
      net: phy: marvell: replace phy_modify() · 832913c3
      Yejune Deng 提交于
      a set of phy_set_bits() looks more neater
      Signed-off-by: NYejune Deng <yejune.deng@gmail.com>
      Link: https://lore.kernel.org/r/1606732895-9136-1-git-send-email-yejune.deng@gmail.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      832913c3
    • J
      Merge branch 's390-ctcm-updates-2020-11-30' · aaea1bab
      Jakub Kicinski 提交于
      Julian Wiedmann says:
      
      ====================
      s390/ctcm: updates 2020-11-30
      
      Some rare ctcm updates by Sebastian, who cleans up all places where
      in_interrupt() was used to determine the correct GFP_* mask for
      allocations.
      In the first three patches we can get rid of those allocations entirely,
      as they just end up being copied into the skb.
      ====================
      
      Link: https://lore.kernel.org/r/20201130100950.42051-1-jwi@linux.ibm.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      aaea1bab
    • S
      s390/ctcm: Use GFP_ATOMIC in ctcmpc_tx(). · 8f4b6e35
      Sebastian Andrzej Siewior 提交于
      gfp_type() uses in_interrupt() to figure out the correct GFP mask.
      
      The usage of in_interrupt() in drivers is phased out and Linus clearly
      requested that code which changes behaviour depending on context should
      either be separated or the context be conveyed in an argument passed by the
      caller, which usually knows the context.
      
      ctcmpc_tx() is used as net_device_ops::ndo_start_xmit. This callback is
      invoked with disabled bottom halves.
      
      Use GFP_ATOMIC for memory allocation in ctcmpc_tx().
      Remove gfp_type() since the last user is gone.
      Reviewed-by: NJulian Wiedmann <jwi@linux.ibm.com>
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NJulian Wiedmann <jwi@linux.ibm.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      8f4b6e35
    • S
      s390/ctcm: Use GFP_KERNEL in add_channel(). · 04e4e469
      Sebastian Andrzej Siewior 提交于
      gfp_type() uses in_interrupt() to figure out the correct GFP mask.
      
      The usage of in_interrupt() in drivers is phased out and Linus clearly
      requested that code which changes behaviour depending on context should
      either be separated or the context be conveyed in an argument passed by the
      caller, which usually knows the context.
      
      The memory allocation of `ch' a few lines above is using GFP_KERNEL,
      also an allocation a few lines later is using GFP_KERNEL.
      
      Use GFP_KERNEL for the memory allocation.
      Reviewed-by: NJulian Wiedmann <jwi@linux.ibm.com>
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NJulian Wiedmann <jwi@linux.ibm.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      04e4e469
    • S
      s390/ctcm: Use explicit allocation mask in ctcmpc_unpack_skb(). · 8dc4b6af
      Sebastian Andrzej Siewior 提交于
      gfp_type() uses in_interrupt() to figure out the correct GFP mask.
      
      The usage of in_interrupt() in drivers is phased out and Linus clearly
      requested that code which changes behaviour depending on context should
      either be separated or the context be conveyed in an argument passed by the
      caller, which usually knows the context.
      
      The call chain of ctcmpc_unpack_skb():
      ctcmpc_bh()
       -> ctcmpc_unpack_skb()
      
      ctcmpc_bh() is a tasklet handler so GFP_ATOMIC is needed.
      
      Use GFP_ATOMIC as allocation type in ctcmpc_unpack_skb().
      Reviewed-by: NJulian Wiedmann <jwi@linux.ibm.com>
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NJulian Wiedmann <jwi@linux.ibm.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      8dc4b6af
    • S
      s390/ctcm: Avoid temporary allocation of struct pdu. · ca738f5a
      Sebastian Andrzej Siewior 提交于
      The size of struct pdu is 8 byte. The memory is allocated, initialized,
      used and deallocated a few lines later.
      
      It is more efficient to avoid the allocation/free dance and assign the
      values directly to skb's data part instead of using memcpy() for it.
      
      Avoid an allocation of struct pdu and use the resulting skb pointer
      instead.
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      [jwi: Fix-up the pdu_offset, adjust skb->len for the pushed length.
            Reflow the commit msg.]
      Signed-off-by: NJulian Wiedmann <jwi@linux.ibm.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      ca738f5a
    • S
      s390/ctcm: Avoid temporary allocation of struct qllc. · d38aa396
      Sebastian Andrzej Siewior 提交于
      The size of struct qllc is 2 byte. The memory for is allocated,
      initialized, used and deallocated a few lines later.
      
      It is more efficient to avoid the allocation/free dance and assign the
      values directly to skb's data part instead of using memcpy() for it.
      
      Avoid an allocation of struct qllc and use the resulting skb pointer
      instead.
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      [jwi: remove a newline, reflow the commit msg]
      Signed-off-by: NJulian Wiedmann <jwi@linux.ibm.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      d38aa396
    • S
      s390/ctcm: Avoid temporary allocation of struct th_header and th_sweep. · 94e0028a
      Sebastian Andrzej Siewior 提交于
      The size of struct th_header is 8 byte and the size of struct th_sweep
      is 16 byte. The memory for is allocated, initialized, used and
      deallocated a few lines later.
      
      It is more efficient to avoid the allocation/free dance and assign the
      values directly to skb's data part instead of using memcpy() for it.
      
      Avoid an allocation of struct th_sweep/th_header and use the resulting
      skb pointer instead.
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      [jwi: use skb_put_zero(), instead of skb_put() + memset to 0]
      Signed-off-by: NJulian Wiedmann <jwi@linux.ibm.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      94e0028a
    • C
      net: freescale: ucc_geth: remove unused SKB_ALLOC_TIMEOUT · 2bf7d377
      Chris Packham 提交于
      This was added in commit ce973b14 ("[PATCH] Freescale QE UCC gigabit
      ethernet driver") but doesn't appear to have been used. Remove it now.
      Signed-off-by: NChris Packham <chris.packham@alliedtelesis.co.nz>
      Link: https://lore.kernel.org/r/20201130001010.28998-1-chris.packham@alliedtelesis.co.nzSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      2bf7d377
    • V
      net: delete __dev_getfirstbyhwtype · c214550f
      Vladimir Oltean 提交于
      The last user of the RTNL brother of dev_getfirstbyhwtype (the latter
      being synchronized under RCU) has been deleted in commit b4db2b35
      ("afs: Use core kernel UUID generation").
      
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
      Link: https://lore.kernel.org/r/20201129200550.2433401-1-vladimir.oltean@nxp.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      c214550f
    • J
      Merge branch 'net-tipc-fix-all-kernel-doc-and-add-tipc-networking-chapter' · f7cf335c
      Jakub Kicinski 提交于
      Randy Dunlap says:
      
      ====================
      net/tipc: fix all kernel-doc and add TIPC networking chapter
      
      Fix lots of net/tipc/ kernel-doc warnings. Add many struct field and
      function parameter descriptions.
      
      Then add a TIPC chapter to the networking documentation book.
      
      All patches have been rebased to current net-next.
      
      Note: some of the struct members and function parameters are marked
      with "FIXME". They could use some additional descriptions if
      someone could help add to them. Thanks.
      ====================
      
      Link: https://lore.kernel.org/r/20201129183251.7049-1-rdunlap@infradead.orgSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      f7cf335c
    • R
      net/tipc: add TIPC chapter to networking Documentation · 2fc30dec
      Randy Dunlap 提交于
      Add a TIPC chapter to the networking docbook.
      Signed-off-by: NRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      2fc30dec
    • R
      net/tipc: fix all function Return: notation · 637b77fd
      Randy Dunlap 提交于
      Fix Return: kernel-doc notation in all net/tipc/ source files.
      Also keep ReST list notation intact for output formatting.
      Fix a few typos in comments.
      Signed-off-by: NRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      637b77fd
    • R
      net/tipc: fix socket.c kernel-doc · f172f4b8
      Randy Dunlap 提交于
      Fix socket.c kernel-doc warnings in preparation for adding to the
      networking docbook.
      
      Also, for rcvbuf_limit(), use bullet notation so that the lines do
      not run together.
      
      ../net/tipc/socket.c:130: warning: Function parameter or member 'cong_links' not described in 'tipc_sock'
      ../net/tipc/socket.c:130: warning: Function parameter or member 'probe_unacked' not described in 'tipc_sock'
      ../net/tipc/socket.c:130: warning: Function parameter or member 'snd_win' not described in 'tipc_sock'
      ../net/tipc/socket.c:130: warning: Function parameter or member 'peer_caps' not described in 'tipc_sock'
      ../net/tipc/socket.c:130: warning: Function parameter or member 'rcv_win' not described in 'tipc_sock'
      ../net/tipc/socket.c:130: warning: Function parameter or member 'group' not described in 'tipc_sock'
      ../net/tipc/socket.c:130: warning: Function parameter or member 'oneway' not described in 'tipc_sock'
      ../net/tipc/socket.c:130: warning: Function parameter or member 'nagle_start' not described in 'tipc_sock'
      ../net/tipc/socket.c:130: warning: Function parameter or member 'snd_backlog' not described in 'tipc_sock'
      ../net/tipc/socket.c:130: warning: Function parameter or member 'msg_acc' not described in 'tipc_sock'
      ../net/tipc/socket.c:130: warning: Function parameter or member 'pkt_cnt' not described in 'tipc_sock'
      ../net/tipc/socket.c:130: warning: Function parameter or member 'expect_ack' not described in 'tipc_sock'
      ../net/tipc/socket.c:130: warning: Function parameter or member 'nodelay' not described in 'tipc_sock'
      ../net/tipc/socket.c:130: warning: Function parameter or member 'group_is_open' not described in 'tipc_sock'
      ../net/tipc/socket.c:267: warning: Function parameter or member 'sk' not described in 'tsk_advance_rx_queue'
      ../net/tipc/socket.c:295: warning: Function parameter or member 'sk' not described in 'tsk_rej_rx_queue'
      ../net/tipc/socket.c:295: warning: Function parameter or member 'error' not described in 'tsk_rej_rx_queue'
      ../net/tipc/socket.c:894: warning: Function parameter or member 'tsk' not described in 'tipc_send_group_msg'
      ../net/tipc/socket.c:1187: warning: Function parameter or member 'net' not described in 'tipc_sk_mcast_rcv'
      ../net/tipc/socket.c:1323: warning: Function parameter or member 'inputq' not described in 'tipc_sk_conn_proto_rcv'
      ../net/tipc/socket.c:1323: warning: Function parameter or member 'xmitq' not described in 'tipc_sk_conn_proto_rcv'
      ../net/tipc/socket.c:1885: warning: Function parameter or member 'sock' not described in 'tipc_recvmsg'
      ../net/tipc/socket.c:1993: warning: Function parameter or member 'sock' not described in 'tipc_recvstream'
      ../net/tipc/socket.c:2313: warning: Function parameter or member 'xmitq' not described in 'tipc_sk_filter_rcv'
      ../net/tipc/socket.c:2404: warning: Function parameter or member 'xmitq' not described in 'tipc_sk_enqueue'
      ../net/tipc/socket.c:2456: warning: Function parameter or member 'net' not described in 'tipc_sk_rcv'
      ../net/tipc/socket.c:2693: warning: Function parameter or member 'kern' not described in 'tipc_accept'
      ../net/tipc/socket.c:3816: warning: Excess function parameter 'sysctl_tipc_sk_filter' description in 'tipc_sk_filtering'
      Signed-off-by: NRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      f172f4b8
    • R
      net/tipc: fix node.c kernel-doc · 4476441e
      Randy Dunlap 提交于
      Fix node.c kernel-doc warnings in preparation for adding to the
      networking docbook.
      
      ../net/tipc/node.c:141: warning: Function parameter or member 'kref' not described in 'tipc_node'
      ../net/tipc/node.c:141: warning: Function parameter or member 'bc_entry' not described in 'tipc_node'
      ../net/tipc/node.c:141: warning: Function parameter or member 'failover_sent' not described in 'tipc_node'
      ../net/tipc/node.c:141: warning: Function parameter or member 'peer_id' not described in 'tipc_node'
      ../net/tipc/node.c:141: warning: Function parameter or member 'peer_id_string' not described in 'tipc_node'
      ../net/tipc/node.c:141: warning: Function parameter or member 'conn_sks' not described in 'tipc_node'
      ../net/tipc/node.c:141: warning: Function parameter or member 'keepalive_intv' not described in 'tipc_node'
      ../net/tipc/node.c:141: warning: Function parameter or member 'timer' not described in 'tipc_node'
      ../net/tipc/node.c:141: warning: Function parameter or member 'peer_net' not described in 'tipc_node'
      ../net/tipc/node.c:141: warning: Function parameter or member 'peer_hash_mix' not described in 'tipc_node'
      ../net/tipc/node.c:273: warning: Function parameter or member '__n' not described in 'tipc_node_crypto_rx'
      ../net/tipc/node.c:822: warning: Function parameter or member 'n' not described in '__tipc_node_link_up'
      ../net/tipc/node.c:822: warning: Function parameter or member 'bearer_id' not described in '__tipc_node_link_up'
      ../net/tipc/node.c:822: warning: Function parameter or member 'xmitq' not described in '__tipc_node_link_up'
      ../net/tipc/node.c:888: warning: Function parameter or member 'n' not described in 'tipc_node_link_up'
      ../net/tipc/node.c:888: warning: Function parameter or member 'bearer_id' not described in 'tipc_node_link_up'
      ../net/tipc/node.c:888: warning: Function parameter or member 'xmitq' not described in 'tipc_node_link_up'
      ../net/tipc/node.c:948: warning: Function parameter or member 'n' not described in '__tipc_node_link_down'
      ../net/tipc/node.c:948: warning: Function parameter or member 'bearer_id' not described in '__tipc_node_link_down'
      ../net/tipc/node.c:948: warning: Function parameter or member 'xmitq' not described in '__tipc_node_link_down'
      ../net/tipc/node.c:948: warning: Function parameter or member 'maddr' not described in '__tipc_node_link_down'
      ../net/tipc/node.c:1537: warning: Function parameter or member 'net' not described in 'tipc_node_get_linkname'
      ../net/tipc/node.c:1537: warning: Function parameter or member 'len' not described in 'tipc_node_get_linkname'
      ../net/tipc/node.c:1891: warning: Function parameter or member 'n' not described in 'tipc_node_check_state'
      ../net/tipc/node.c:1891: warning: Function parameter or member 'xmitq' not described in 'tipc_node_check_state'
      Signed-off-by: NRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      4476441e
    • R
      net/tipc: fix name_table.c kernel-doc · 5c5d6796
      Randy Dunlap 提交于
      Fix name_table.c kernel-doc warnings in preparation for adding to the
      networking docbook.
      
      ../net/tipc/name_table.c:115: warning: Function parameter or member 'start' not described in 'service_range_foreach_match'
      ../net/tipc/name_table.c:115: warning: Function parameter or member 'end' not described in 'service_range_foreach_match'
      ../net/tipc/name_table.c:127: warning: Function parameter or member 'start' not described in 'service_range_match_first'
      ../net/tipc/name_table.c:127: warning: Function parameter or member 'end' not described in 'service_range_match_first'
      ../net/tipc/name_table.c:176: warning: Function parameter or member 'start' not described in 'service_range_match_next'
      ../net/tipc/name_table.c:176: warning: Function parameter or member 'end' not described in 'service_range_match_next'
      ../net/tipc/name_table.c:225: warning: Function parameter or member 'type' not described in 'tipc_publ_create'
      ../net/tipc/name_table.c:225: warning: Function parameter or member 'lower' not described in 'tipc_publ_create'
      ../net/tipc/name_table.c:225: warning: Function parameter or member 'upper' not described in 'tipc_publ_create'
      ../net/tipc/name_table.c:225: warning: Function parameter or member 'scope' not described in 'tipc_publ_create'
      ../net/tipc/name_table.c:225: warning: Function parameter or member 'node' not described in 'tipc_publ_create'
      ../net/tipc/name_table.c:225: warning: Function parameter or member 'port' not described in 'tipc_publ_create'
      ../net/tipc/name_table.c:225: warning: Function parameter or member 'key' not described in 'tipc_publ_create'
      ../net/tipc/name_table.c:252: warning: Function parameter or member 'type' not described in 'tipc_service_create'
      ../net/tipc/name_table.c:252: warning: Function parameter or member 'hd' not described in 'tipc_service_create'
      ../net/tipc/name_table.c:367: warning: Function parameter or member 'sr' not described in 'tipc_service_remove_publ'
      ../net/tipc/name_table.c:367: warning: Function parameter or member 'node' not described in 'tipc_service_remove_publ'
      ../net/tipc/name_table.c:367: warning: Function parameter or member 'key' not described in 'tipc_service_remove_publ'
      ../net/tipc/name_table.c:383: warning: Function parameter or member 'pa' not described in 'publication_after'
      ../net/tipc/name_table.c:383: warning: Function parameter or member 'pb' not described in 'publication_after'
      ../net/tipc/name_table.c:401: warning: Function parameter or member 'service' not described in 'tipc_service_subscribe'
      ../net/tipc/name_table.c:401: warning: Function parameter or member 'sub' not described in 'tipc_service_subscribe'
      ../net/tipc/name_table.c:546: warning: Function parameter or member 'net' not described in 'tipc_nametbl_translate'
      ../net/tipc/name_table.c:546: warning: Function parameter or member 'type' not described in 'tipc_nametbl_translate'
      ../net/tipc/name_table.c:546: warning: Function parameter or member 'instance' not described in 'tipc_nametbl_translate'
      ../net/tipc/name_table.c:546: warning: Function parameter or member 'dnode' not described in 'tipc_nametbl_translate'
      ../net/tipc/name_table.c:762: warning: Function parameter or member 'net' not described in 'tipc_nametbl_withdraw'
      ../net/tipc/name_table.c:762: warning: Function parameter or member 'type' not described in 'tipc_nametbl_withdraw'
      ../net/tipc/name_table.c:762: warning: Function parameter or member 'lower' not described in 'tipc_nametbl_withdraw'
      ../net/tipc/name_table.c:762: warning: Function parameter or member 'upper' not described in 'tipc_nametbl_withdraw'
      ../net/tipc/name_table.c:762: warning: Function parameter or member 'key' not described in 'tipc_nametbl_withdraw'
      ../net/tipc/name_table.c:796: warning: Function parameter or member 'sub' not described in 'tipc_nametbl_subscribe'
      ../net/tipc/name_table.c:826: warning: Function parameter or member 'sub' not described in 'tipc_nametbl_unsubscribe'
      ../net/tipc/name_table.c:876: warning: Function parameter or member 'net' not described in 'tipc_service_delete'
      ../net/tipc/name_table.c:876: warning: Function parameter or member 'sc' not described in 'tipc_service_delete'
      Signed-off-by: NRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      5c5d6796
    • R
      net/tipc: fix name_distr.c kernel-doc · cb67296e
      Randy Dunlap 提交于
      Fix name_distr.c kernel-doc warnings in preparation for adding to the
      networking docbook.
      
      ../net/tipc/name_distr.c:55: warning: Function parameter or member 'i' not described in 'publ_to_item'
      ../net/tipc/name_distr.c:55: warning: Function parameter or member 'p' not described in 'publ_to_item'
      ../net/tipc/name_distr.c:70: warning: Function parameter or member 'net' not described in 'named_prepare_buf'
      ../net/tipc/name_distr.c:70: warning: Function parameter or member 'type' not described in 'named_prepare_buf'
      ../net/tipc/name_distr.c:70: warning: Function parameter or member 'size' not described in 'named_prepare_buf'
      ../net/tipc/name_distr.c:70: warning: Function parameter or member 'dest' not described in 'named_prepare_buf'
      ../net/tipc/name_distr.c:88: warning: Function parameter or member 'net' not described in 'tipc_named_publish'
      ../net/tipc/name_distr.c:88: warning: Function parameter or member 'publ' not described in 'tipc_named_publish'
      ../net/tipc/name_distr.c:116: warning: Function parameter or member 'net' not described in 'tipc_named_withdraw'
      ../net/tipc/name_distr.c:116: warning: Function parameter or member 'publ' not described in 'tipc_named_withdraw'
      ../net/tipc/name_distr.c:147: warning: Function parameter or member 'net' not described in 'named_distribute'
      ../net/tipc/name_distr.c:147: warning: Function parameter or member 'seqno' not described in 'named_distribute'
      ../net/tipc/name_distr.c:199: warning: Function parameter or member 'net' not described in 'tipc_named_node_up'
      ../net/tipc/name_distr.c:199: warning: Function parameter or member 'dnode' not described in 'tipc_named_node_up'
      ../net/tipc/name_distr.c:199: warning: Function parameter or member 'capabilities' not described in 'tipc_named_node_up'
      ../net/tipc/name_distr.c:225: warning: Function parameter or member 'net' not described in 'tipc_publ_purge'
      ../net/tipc/name_distr.c:225: warning: Function parameter or member 'publ' not described in 'tipc_publ_purge'
      ../net/tipc/name_distr.c:225: warning: Function parameter or member 'addr' not described in 'tipc_publ_purge'
      ../net/tipc/name_distr.c:272: warning: Function parameter or member 'net' not described in 'tipc_update_nametbl'
      ../net/tipc/name_distr.c:272: warning: Function parameter or member 'i' not described in 'tipc_update_nametbl'
      ../net/tipc/name_distr.c:272: warning: Function parameter or member 'node' not described in 'tipc_update_nametbl'
      ../net/tipc/name_distr.c:272: warning: Function parameter or member 'dtype' not described in 'tipc_update_nametbl'
      ../net/tipc/name_distr.c:353: warning: Function parameter or member 'net' not described in 'tipc_named_rcv'
      ../net/tipc/name_distr.c:353: warning: Function parameter or member 'namedq' not described in 'tipc_named_rcv'
      ../net/tipc/name_distr.c:353: warning: Function parameter or member 'rcv_nxt' not described in 'tipc_named_rcv'
      ../net/tipc/name_distr.c:353: warning: Function parameter or member 'open' not described in 'tipc_named_rcv'
      ../net/tipc/name_distr.c:383: warning: Function parameter or member 'net' not described in 'tipc_named_reinit'
      Signed-off-by: NRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      cb67296e
    • R
      net/tipc: fix link.c kernel-doc · a99df449
      Randy Dunlap 提交于
      Fix link.c kernel-doc warnings in preparation for adding to the
      networking docbook.
      
      ../net/tipc/link.c:200: warning: Function parameter or member 'session' not described in 'tipc_link'
      ../net/tipc/link.c:200: warning: Function parameter or member 'snd_nxt_state' not described in 'tipc_link'
      ../net/tipc/link.c:200: warning: Function parameter or member 'rcv_nxt_state' not described in 'tipc_link'
      ../net/tipc/link.c:200: warning: Function parameter or member 'in_session' not described in 'tipc_link'
      ../net/tipc/link.c:200: warning: Function parameter or member 'active' not described in 'tipc_link'
      ../net/tipc/link.c:200: warning: Function parameter or member 'if_name' not described in 'tipc_link'
      ../net/tipc/link.c:200: warning: Function parameter or member 'rst_cnt' not described in 'tipc_link'
      ../net/tipc/link.c:200: warning: Function parameter or member 'drop_point' not described in 'tipc_link'
      ../net/tipc/link.c:200: warning: Function parameter or member 'failover_reasm_skb' not described in 'tipc_link'
      ../net/tipc/link.c:200: warning: Function parameter or member 'failover_deferdq' not described in 'tipc_link'
      ../net/tipc/link.c:200: warning: Function parameter or member 'transmq' not described in 'tipc_link'
      ../net/tipc/link.c:200: warning: Function parameter or member 'backlog' not described in 'tipc_link'
      ../net/tipc/link.c:200: warning: Function parameter or member 'snd_nxt' not described in 'tipc_link'
      ../net/tipc/link.c:200: warning: Function parameter or member 'rcv_unacked' not described in 'tipc_link'
      ../net/tipc/link.c:200: warning: Function parameter or member 'deferdq' not described in 'tipc_link'
      ../net/tipc/link.c:200: warning: Function parameter or member 'window' not described in 'tipc_link'
      ../net/tipc/link.c:200: warning: Function parameter or member 'min_win' not described in 'tipc_link'
      ../net/tipc/link.c:200: warning: Function parameter or member 'ssthresh' not described in 'tipc_link'
      ../net/tipc/link.c:200: warning: Function parameter or member 'max_win' not described in 'tipc_link'
      ../net/tipc/link.c:200: warning: Function parameter or member 'cong_acks' not described in 'tipc_link'
      ../net/tipc/link.c:200: warning: Function parameter or member 'checkpoint' not described in 'tipc_link'
      ../net/tipc/link.c:200: warning: Function parameter or member 'reasm_tnlmsg' not described in 'tipc_link'
      ../net/tipc/link.c:200: warning: Function parameter or member 'last_gap' not described in 'tipc_link'
      ../net/tipc/link.c:200: warning: Function parameter or member 'last_ga' not described in 'tipc_link'
      ../net/tipc/link.c:200: warning: Function parameter or member 'bc_rcvlink' not described in 'tipc_link'
      ../net/tipc/link.c:200: warning: Function parameter or member 'bc_sndlink' not described in 'tipc_link'
      ../net/tipc/link.c:200: warning: Function parameter or member 'nack_state' not described in 'tipc_link'
      ../net/tipc/link.c:200: warning: Function parameter or member 'bc_peer_is_up' not described in 'tipc_link'
      ../net/tipc/link.c:473: warning: Function parameter or member 'self' not described in 'tipc_link_create'
      ../net/tipc/link.c:473: warning: Function parameter or member 'peer_id' not described in 'tipc_link_create'
      ../net/tipc/link.c:473: warning: Excess function parameter 'ownnode' description in 'tipc_link_create'
      ../net/tipc/link.c:544: warning: Function parameter or member 'ownnode' not described in 'tipc_link_bc_create'
      ../net/tipc/link.c:544: warning: Function parameter or member 'peer' not described in 'tipc_link_bc_create'
      ../net/tipc/link.c:544: warning: Function parameter or member 'peer_id' not described in 'tipc_link_bc_create'
      ../net/tipc/link.c:544: warning: Function parameter or member 'peer_caps' not described in 'tipc_link_bc_create'
      ../net/tipc/link.c:544: warning: Function parameter or member 'bc_sndlink' not described in 'tipc_link_bc_create'
      Signed-off-by: NRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      a99df449
    • R
      net/tipc: fix bearer.c for kernel-doc · ec6a1649
      Randy Dunlap 提交于
      Fix kernel-doc warnings in bearer.c:
      
      ../net/tipc/bearer.c:77: warning: Function parameter or member 'name' not described in 'tipc_media_find'
      ../net/tipc/bearer.c:91: warning: Function parameter or member 'type' not described in 'media_find_id'
      ../net/tipc/bearer.c:105: warning: Function parameter or member 'buf' not described in 'tipc_media_addr_printf'
      ../net/tipc/bearer.c:105: warning: Function parameter or member 'len' not described in 'tipc_media_addr_printf'
      ../net/tipc/bearer.c:105: warning: Function parameter or member 'a' not described in 'tipc_media_addr_printf'
      ../net/tipc/bearer.c:174: warning: Function parameter or member 'net' not described in 'tipc_bearer_find'
      ../net/tipc/bearer.c:174: warning: Function parameter or member 'name' not described in 'tipc_bearer_find'
      ../net/tipc/bearer.c:238: warning: Function parameter or member 'net' not described in 'tipc_enable_bearer'
      ../net/tipc/bearer.c:238: warning: Function parameter or member 'name' not described in 'tipc_enable_bearer'
      ../net/tipc/bearer.c:238: warning: Function parameter or member 'disc_domain' not described in 'tipc_enable_bearer'
      ../net/tipc/bearer.c:238: warning: Function parameter or member 'prio' not described in 'tipc_enable_bearer'
      ../net/tipc/bearer.c:238: warning: Function parameter or member 'attr' not described in 'tipc_enable_bearer'
      ../net/tipc/bearer.c:350: warning: Function parameter or member 'net' not described in 'tipc_reset_bearer'
      ../net/tipc/bearer.c:350: warning: Function parameter or member 'b' not described in 'tipc_reset_bearer'
      ../net/tipc/bearer.c:374: warning: Function parameter or member 'net' not described in 'bearer_disable'
      ../net/tipc/bearer.c:374: warning: Function parameter or member 'b' not described in 'bearer_disable'
      ../net/tipc/bearer.c:462: warning: Function parameter or member 'net' not described in 'tipc_l2_send_msg'
      ../net/tipc/bearer.c:479: warning: Function parameter or member 'net' not described in 'tipc_l2_send_msg'
      Signed-off-by: NRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      ec6a1649
    • R
      net/tipc: fix various kernel-doc warnings · 5fcb7d47
      Randy Dunlap 提交于
      kernel-doc and Sphinx fixes to eliminate lots of warnings
      in preparation for adding to the networking docbook.
      
      ../net/tipc/crypto.c:57: warning: cannot understand function prototype: 'enum '
      ../net/tipc/crypto.c:69: warning: cannot understand function prototype: 'enum '
      ../net/tipc/crypto.c:130: warning: Function parameter or member 'tfm' not described in 'tipc_tfm'
      ../net/tipc/crypto.c:130: warning: Function parameter or member 'list' not described in 'tipc_tfm'
      ../net/tipc/crypto.c:172: warning: Function parameter or member 'stat' not described in 'tipc_crypto_stats'
      ../net/tipc/crypto.c:232: warning: Function parameter or member 'flags' not described in 'tipc_crypto'
      ../net/tipc/crypto.c:329: warning: Function parameter or member 'ukey' not described in 'tipc_aead_key_validate'
      ../net/tipc/crypto.c:329: warning: Function parameter or member 'info' not described in 'tipc_aead_key_validate'
      ../net/tipc/crypto.c:482: warning: Function parameter or member 'aead' not described in 'tipc_aead_tfm_next'
      ../net/tipc/trace.c:43: warning: cannot understand function prototype: 'unsigned long sysctl_tipc_sk_filter[5] __read_mostly = '
      
      Documentation/networking/tipc:57: ../net/tipc/msg.c:584: WARNING: Unexpected indentation.
      Documentation/networking/tipc:63: ../net/tipc/name_table.c:536: WARNING: Unexpected indentation.
      Documentation/networking/tipc:63: ../net/tipc/name_table.c:537: WARNING: Block quote ends without a blank line; unexpected unindent.
      Documentation/networking/tipc:78: ../net/tipc/socket.c:3809: WARNING: Unexpected indentation.
      Documentation/networking/tipc:78: ../net/tipc/socket.c:3807: WARNING: Inline strong start-string without end-string.
      Documentation/networking/tipc:72: ../net/tipc/node.c:904: WARNING: Unexpected indentation.
      Documentation/networking/tipc:39: ../net/tipc/crypto.c:97: WARNING: Block quote ends without a blank line; unexpected unindent.
      Documentation/networking/tipc:39: ../net/tipc/crypto.c:98: WARNING: Block quote ends without a blank line; unexpected unindent.
      Documentation/networking/tipc:39: ../net/tipc/crypto.c:141: WARNING: Inline strong start-string without end-string.
      
      ../net/tipc/discover.c:82: warning: Function parameter or member 'skb' not described in 'tipc_disc_init_msg'
      
      ../net/tipc/msg.c:69: warning: Function parameter or member 'gfp' not described in 'tipc_buf_acquire'
      ../net/tipc/msg.c:382: warning: Function parameter or member 'offset' not described in 'tipc_msg_build'
      ../net/tipc/msg.c:708: warning: Function parameter or member 'net' not described in 'tipc_msg_lookup_dest'
      
      ../net/tipc/subscr.c:65: warning: Function parameter or member 'seq' not described in 'tipc_sub_check_overlap'
      ../net/tipc/subscr.c:65: warning: Function parameter or member 'found_lower' not described in 'tipc_sub_check_overlap'
      ../net/tipc/subscr.c:65: warning: Function parameter or member 'found_upper' not described in 'tipc_sub_check_overlap'
      
      ../net/tipc/udp_media.c:75: warning: Function parameter or member 'proto' not described in 'udp_media_addr'
      ../net/tipc/udp_media.c:75: warning: Function parameter or member 'port' not described in 'udp_media_addr'
      ../net/tipc/udp_media.c:75: warning: Function parameter or member 'ipv4' not described in 'udp_media_addr'
      ../net/tipc/udp_media.c:75: warning: Function parameter or member 'ipv6' not described in 'udp_media_addr'
      ../net/tipc/udp_media.c:98: warning: Function parameter or member 'rcast' not described in 'udp_bearer'
      
      Also fixed a typo of "duest" to "dest".
      Signed-off-by: NRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      5fcb7d47
    • R
      net/tipc: fix tipc header files for kernel-doc · ff10527e
      Randy Dunlap 提交于
      Fix tipc header files for adding to the networking docbook.
      
      Remove some uses of "/**" that were not kernel-doc notation.
      
      Fix some source formatting to eliminate Sphinx warnings.
      
      Add missing struct member and function argument kernel-doc descriptions.
      
      Correct the description of a couple of struct members that were
      marked as "(FIXME)".
      
      Documentation/networking/tipc:18: ../net/tipc/name_table.h:65: WARNING: Unexpected indentation.
      Documentation/networking/tipc:18: ../net/tipc/name_table.h:66: WARNING: Block quote ends without a blank line; unexpected unindent.
      
      ../net/tipc/bearer.h:128: warning: Function parameter or member 'min_win' not described in 'tipc_media'
      ../net/tipc/bearer.h:128: warning: Function parameter or member 'max_win' not described in 'tipc_media'
      
      ../net/tipc/bearer.h:171: warning: Function parameter or member 'min_win' not described in 'tipc_bearer'
      ../net/tipc/bearer.h:171: warning: Function parameter or member 'max_win' not described in 'tipc_bearer'
      ../net/tipc/bearer.h:171: warning: Function parameter or member 'disc' not described in 'tipc_bearer'
      ../net/tipc/bearer.h:171: warning: Function parameter or member 'up' not described in 'tipc_bearer'
      ../net/tipc/bearer.h:171: warning: Function parameter or member 'refcnt' not described in 'tipc_bearer'
      
      ../net/tipc/name_distr.h:68: warning: Function parameter or member 'port' not described in 'distr_item'
      
      ../net/tipc/name_table.h:111: warning: Function parameter or member 'services' not described in 'name_table'
      ../net/tipc/name_table.h:111: warning: Function parameter or member 'cluster_scope_lock' not described in 'name_table'
      ../net/tipc/name_table.h:111: warning: Function parameter or member 'rc_dests' not described in 'name_table'
      ../net/tipc/name_table.h:111: warning: Function parameter or member 'snd_nxt' not described in 'name_table'
      
      ../net/tipc/subscr.h:67: warning: Function parameter or member 'kref' not described in 'tipc_subscription'
      ../net/tipc/subscr.h:67: warning: Function parameter or member 'net' not described in 'tipc_subscription'
      ../net/tipc/subscr.h:67: warning: Function parameter or member 'service_list' not described in 'tipc_subscription'
      ../net/tipc/subscr.h:67: warning: Function parameter or member 'conid' not described in 'tipc_subscription'
      ../net/tipc/subscr.h:67: warning: Function parameter or member 'inactive' not described in 'tipc_subscription'
      ../net/tipc/subscr.h:67: warning: Function parameter or member 'lock' not described in 'tipc_subscription'
      Signed-off-by: NRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      ff10527e
    • J
      Merge branch 'mlxsw-add-support-for-802-1ad-bridging' · 7fe2af16
      Jakub Kicinski 提交于
      Ido Schimmel says:
      
      ====================
      mlxsw: Add support for 802.1ad bridging
      
      802.1ad, also known as QinQ, is an extension to the 802.1q standard,
      which is concerned with passing possibly 802.1q-tagged packets through
      another VLAN-like tunnel. The format of 802.1ad tag is the same as
      802.1q, except it uses the EtherType of 0x88a8, unlike 802.1q's 0x8100.
      
      Currently, mlxsw supports bridging with VLAN-unaware (802.1d) bridges
      and with VLAN-aware bridges whose VLAN protocol is 802.1q. This set adds
      support for VLAN-aware bridges whose VLAN protocol is 802.1ad.
      
      From mlxsw perspective, 802.1ad support entails two main changes:
      
      1. Ports member in an 802.1ad bridge need to be configured to classify
      802.1ad packets as tagged and all other packets as untagged
      
      2. When pushing a VLAN at ingress (PVID), its EtherType needs to be
      0x88a8 instead of 802.1q's 0x8100
      
      The rest stays the same as with 802.1q bridges.
      
      A follow-up patch set will add support for QinQ with VXLAN, also known
      as QinVNI. Currently, linking of a VXLAN netdev to an 802.1ad bridge is
      vetoed and an error is returned to user space.
      
      Patch set overview:
      
      Patches #1-#2 add the registers required to configure the two changes
      described above.
      
      Patch #3 changes the device to only treat 802.1q packets as tagged by
      default, as opposed to both 802.1q and 802.1ad packets. This is more
      inline with the behavior supported by the driver.
      
      Patch #4 adds the ability to configure the EtherType when pushing a PVID
      at ingress.
      
      Patch #5 performs small refactoring to allow for code re-use in the next
      patch.
      
      Patch #6 adds support for 802.1ad bridging and allows mlxsw ports and
      their uppers to join such a bridge.
      
      Patch #7 changes the bridge driver to notify about changes to its VLAN
      protocol, so that these could be vetoed by mlxsw in the next patch.
      
      Patches #8-#9 teach mlxsw to veto unsupported 802.1ad configurations and
      add a corresponding selftest to make sure such configurations are indeed
      vetoed.
      ====================
      
      Link: https://lore.kernel.org/r/20201129125407.1391557-1-idosch@idosch.orgSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      7fe2af16
    • D
      selftests: forwarding: Add QinQ veto testing · 008cb2ec
      Danielle Ratson 提交于
      Test that each veto that was added in the previous patch, is indeed
      vetoed.
      
      $ ./q_in_q_veto.sh
      
      TEST: create 802.1ad vlan upper on top of a front panel             [ OK ]
      TEST: create 802.1ad vlan upper on top of a bridge port             [ OK ]
      TEST: create 802.1ad vlan upper on top of a lag                     [ OK ]
      TEST: create 802.1ad vlan upper on top 802.1q bridge                [ OK ]
      TEST: create 802.1ad vlan upper on top 802.1ad bridge               [ OK ]
      TEST: create 802.1q vlan upper on top 802.1ad bridge                [ OK ]
      TEST: create vlan upper on top of front panel enslaved to 802.1ad bridge
      [ OK ]
      TEST: create vlan upper on top of lag enslaved to 802.1ad bridge    [ OK ]
      TEST: enslave front panel with vlan upper to 802.1ad bridge         [ OK ]
      TEST: enslave lag with vlan upper to 802.1ad bridge                 [ OK ]
      TEST: IP address addition to 802.1ad bridge                         [ OK ]
      TEST: switch bridge protocol                                        [ OK ]
      Signed-off-by: NDanielle Ratson <danieller@nvidia.com>
      Reviewed-by: NPetr Machata <petrm@nvidia.com>
      Signed-off-by: NIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      008cb2ec
    • D
      mlxsw: Add QinQ configuration vetoes · 09139f67
      Danielle Ratson 提交于
      After adding support for QinQ, a.k.a 802.1ad protocol, there are a few
      scenarios that should be vetoed.
      
      The vetoes are motivated by various ASIC limitations.
      For example, a port that is member in a 802.1ad bridge cannot have 802.1q
      uppers as the port needs to be configured to treat 802.1q packets as
      untagged packets.
      
      Veto all those unsupported scenarios and return suitable messages.
      Signed-off-by: NDanielle Ratson <danieller@nvidia.com>
      Reviewed-by: NPetr Machata <petrm@nvidia.com>
      Signed-off-by: NIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      09139f67
    • D
      bridge: switchdev: Notify about VLAN protocol changes · 22ec19f3
      Danielle Ratson 提交于
      Drivers that support bridge offload need to be notified about changes to
      the bridge's VLAN protocol so that they could react accordingly and
      potentially veto the change.
      
      Add a new switchdev attribute to communicate the change to drivers.
      Signed-off-by: NDanielle Ratson <danieller@nvidia.com>
      Reviewed-by: NPetr Machata <petrm@nvidia.com>
      Acked-by: NNikolay Aleksandrov <nikolay@nvidia.com>
      Signed-off-by: NIdo Schimmel <idosch@nvidia.com>
      Reviewed-by: NIvan Vecera <ivecera@redhat.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      22ec19f3
    • A
      mlxsw: spectrum_switchdev: Add support of QinQ traffic · 80dfeafd
      Amit Cohen 提交于
      802.1ad, also known as QinQ is an extension to the 802.1q standard, which
      is concerned with passing possibly 802.1q-tagged packets through another
      VLAN-like tunnel. The format of 802.1ad tag is the same as 802.1q, except
      it uses the EtherType of 0x88a8, unlike 802.1q's 0x8100.
      
      Add support for 802.1ad protocol. Most of the configuration is the same
      as 802.1q. The difference is that before a port joins an 802.1ad bridge it
      needs to be configured to recognize 802.1ad packets as tagged and other
      packets (e.g., 802.1q) as untagged.
      
      VXLAN is not currently supported with 802.1ad bridge, so return an error
      with an appropriate extack message.
      Signed-off-by: NAmit Cohen <amcohen@nvidia.com>
      Reviewed-by: NPetr Machata <petrm@nvidia.com>
      Signed-off-by: NIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      80dfeafd
    • A
      mlxsw: spectrum_switchdev: Create common functions for VLAN-aware bridge · 773ce33a
      Amit Cohen 提交于
      The code in mlxsw_sp_bridge_8021q_port_{join, leave}() can be used also
      for 802.1ad bridge.
      
      Move the code to functions called
      mlxsw_sp_bridge_vlan_aware_port_{join, leave}() and call them from
      mlxsw_sp_bridge_8021q_port_{join, leave}() respectively to enable code
      reuse.
      Signed-off-by: NAmit Cohen <amcohen@nvidia.com>
      Reviewed-by: NPetr Machata <petrm@nvidia.com>
      Signed-off-by: NIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      773ce33a
    • A
      mlxsw: Make EtherType configurable when pushing VLAN at ingress · 3ae7a65b
      Amit Cohen 提交于
      Currently, when pushing a PVID at ingress, mlxsw always uses 802.1q
      EtherType.
      
      Make this EtherType configurable by extending mlxsw_sp_port_pvid_set()
      with an EtherType argument.
      
      This is a preparation for QinQ support, that needs to push a PVID with
      802.1ad EtherType.
      Signed-off-by: NAmit Cohen <amcohen@nvidia.com>
      Reviewed-by: NPetr Machata <petrm@nvidia.com>
      Signed-off-by: NIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      3ae7a65b
    • A
      mlxsw: spectrum: Only treat 802.1q packets as tagged packets · a2ef3ae1
      Amit Cohen 提交于
      By default, the device considers both 802.1ad and 802.1q packets as tagged,
      but this is not supported by the driver. It only supports VLAN and bridge
      devices that use 802.1q protocol.
      
      Instead, configure the device to only treat 802.1q packets as tagged
      packets.
      Signed-off-by: NAmit Cohen <amcohen@nvidia.com>
      Reviewed-by: NPetr Machata <petrm@nvidia.com>
      Signed-off-by: NIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      a2ef3ae1
    • A
      mlxsw: reg: Add et_vlan field to SPVID register · 2a5a290d
      Amit Cohen 提交于
      et_vlan field is used to configure which EtherType is used when VLAN is
      pushed at ingress (for untagged packets or for QinQ push mode).
      
      It will be used to configure tagging with ether_type1 (i.e., 0x88A8) for
      QinQ mode.
      Signed-off-by: NAmit Cohen <amcohen@nvidia.com>
      Reviewed-by: NPetr Machata <petrm@nvidia.com>
      Signed-off-by: NIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      2a5a290d