1. 28 Jun, 2021 19 commits
    • Michael Chan's avatar
      bnxt_en: Add PTP clock APIs, ioctls, and ethtool methods · 118612d5
      Michael Chan authored
      Add the clock APIs to set/get/adjust the hw clock, and the related
      ioctls and ethtool methods.
      
      v2: Propagate error code from ptp_clock_register().
          Add spinlock to serialize access to the timecounter.  The
          timecounter is accessed in process context and the RX datapath.
          Read the PHC using direct registers.
      Reviewed-by: default avatarEdwin Peer <edwin.peer@broadcom.com>
      Signed-off-by: default avatarPavan Chebbi <pavan.chebbi@broadcom.com>
      Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      118612d5
    • Michael Chan's avatar
      bnxt_en: Get PTP hardware capability from firmware · ae5c42f0
      Michael Chan authored
      Store PTP hardware info in a structure if hardware and firmware support PTP.
      Reviewed-by: default avatarEdwin Peer <edwin.peer@broadcom.com>
      Reviewed-by: default avatarPavan Chebbi <pavan.chebbi@broadcom.com>
      Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ae5c42f0
    • Michael Chan's avatar
      bnxt_en: Update firmware interface to 1.10.2.47 · 78eeadb8
      Michael Chan authored
      Adding the PTP related firmware interface is the main change.
      
      There is also a name change for admin_mtu, requiring code fixup.
      Reviewed-by: default avatarPavan Chebbi <pavan.chebbi@broadcom.com>
      Signed-off-by: default avatarEdwin Peer <edwin.peer@broadcom.com>
      Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      78eeadb8
    • David S. Miller's avatar
      Merge branch 'hns3-next' · 2eeae3a5
      David S. Miller authored
      Guangbin Huang says:
      
      ====================
      net: hns3: add new debugfs commands
      
      This series adds three new debugfs commands for the HNS3 ethernet driver.
      
      change log:
      V1 -> V2:
      1. remove patch "net: hns3: add support for link diagnosis info in debugfs"
         and use ethtool extended link state to implement similar function
         according to Jakub Kicinski's opinion.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2eeae3a5
    • Jian Shen's avatar
      net: hns3: add support for dumping MAC umv counter in debugfs · d59daf6a
      Jian Shen authored
      This patch adds support of dumping MAC umv counter in debugfs,
      which will be helpful for debugging.
      
      The display style is below:
      $ cat umv_info
      num_alloc_vport  : 2
      max_umv_size     : 256
      wanted_umv_size  : 256
      priv_umv_size    : 85
      share_umv_size   : 86
      vport(0) used_umv_num : 1
      vport(1) used_umv_num : 1
      Signed-off-by: default avatarJian Shen <shenjian15@huawei.com>
      Signed-off-by: default avatarGuangbin Huang <huangguangbin2@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d59daf6a
    • Jian Shen's avatar
      net: hns3: add support for FD counter in debugfs · 03a92fe8
      Jian Shen authored
      Previously, the flow director counter is not enabled. To improve the
      maintainability for chechking whether flow director hit or not, enable
      flow director counter for each function, and add debugfs query inerface
      to query the counters for each function.
      
      The debugfs command is below:
      cat fd_counter
      func_id    hit_times
      pf         0
      vf0        0
      vf1        0
      Signed-off-by: default avatarJian Shen <shenjian15@huawei.com>
      Signed-off-by: default avatarGuangbin Huang <huangguangbin2@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      03a92fe8
    • David S. Miller's avatar
      Merge branch 'tipc-next' · c948b46a
      David S. Miller authored
      Menglong Dong says:
      
      ====================
      net: tipc: fix FB_MTU eat two pages and do some code cleanup
      
      In the first patch, FB_MTU is redefined to make sure data size will not
      exceed PAGE_SIZE. Besides, I removed the alignment for buf_size in
      tipc_buf_acquire, because skb_alloc_fclone will do the alignment job.
      
      In the second patch, I removed align() in msg.c and replace it with
      ALIGN().
      
      Changes since V5:
      - remove blank line after Fixes in commit log in the first patch
      
      Changes since V4:
      - remove ONE_PAGE_SKB_SZ and replace it with one_page_mtu in the first
        patch.
      - fix some code style problems for the second patch.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c948b46a
    • Menglong Dong's avatar
      net: tipc: replace align() with ALIGN in msg.c · d4cfb7fe
      Menglong Dong authored
      The function align() which is defined in msg.c is redundant, replace it
      with ALIGN() and introduce a BUF_ALIGN().
      Signed-off-by: default avatarMenglong Dong <dong.menglong@zte.com.cn>
      Acked-by: default avatarJon Maloy <jmaloy@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d4cfb7fe
    • Menglong Dong's avatar
      net: tipc: fix FB_MTU eat two pages · 0c6de0c9
      Menglong Dong authored
      FB_MTU is used in 'tipc_msg_build()' to alloc smaller skb when memory
      allocation fails, which can avoid unnecessary sending failures.
      
      The value of FB_MTU now is 3744, and the data size will be:
      
        (3744 + SKB_DATA_ALIGN(sizeof(struct skb_shared_info)) + \
          SKB_DATA_ALIGN(BUF_HEADROOM + BUF_TAILROOM + 3))
      
      which is larger than one page(4096), and two pages will be allocated.
      
      To avoid it, replace '3744' with a calculation:
      
        (PAGE_SIZE - SKB_DATA_ALIGN(BUF_OVERHEAD) - \
          SKB_DATA_ALIGN(sizeof(struct skb_shared_info)))
      
      What's more, alloc_skb_fclone() will call SKB_DATA_ALIGN for data size,
      and it's not necessary to make alignment for buf_size in
      tipc_buf_acquire(). So, just remove it.
      
      Fixes: 4c94cc2d ("tipc: fall back to smaller MTU if allocation of local send skb fails")
      Signed-off-by: default avatarMenglong Dong <dong.menglong@zte.com.cn>
      Acked-by: default avatarJon Maloy <jmaloy@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0c6de0c9
    • David S. Miller's avatar
      Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git · 1b077ce1
      David S. Miller authored
      /klassert/ipsec-next
      
      Steffen Klassert says:
      
      ====================
      pull request (net-next): ipsec-next 2021-06-28
      
      1) Remove an unneeded error assignment in esp4_gro_receive().
         From Yang Li.
      
      2) Add a new byseq state hashtable to find acquire states faster.
         From Sabrina Dubroca.
      
      3) Remove some unnecessary variables in pfkey_create().
         From zuoqilin.
      
      4) Remove the unused description from xfrm_type struct.
         From Florian Westphal.
      
      5) Fix a spelling mistake in the comment of xfrm_state_ok().
         From gushengxian.
      
      6) Replace hdr_off indirections by a small helper function.
         From Florian Westphal.
      
      7) Remove xfrm4_output_finish and xfrm6_output_finish declarations,
         they are not used anymore.From Antony Antony.
      
      8) Remove xfrm replay indirections.
         From Florian Westphal.
      
      Please pull or let me know if there are problems.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1b077ce1
    • David S. Miller's avatar
      Merge tag 'mac80211-next-for-net-next-2021-06-25' of... · 007b312c
      David S. Miller authored
      Merge tag 'mac80211-next-for-net-next-2021-06-25' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
      
      Johannes berg says:
      
      ====================
      Lots of changes:
       * aggregation handling improvements for some drivers
       * hidden AP discovery on 6 GHz and other HE 6 GHz
         improvements
       * minstrel improvements for no-ack frames
       * deferred rate control for TXQs to improve reaction
         times
       * virtual time-based airtime scheduler
       * along with various little cleanups/fixups
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      007b312c
    • Matthieu Baerts's avatar
      mptcp: fix 'masking a bool' warning · c4512c63
      Matthieu Baerts authored
      Dan Carpenter reported an issue introduced in
      commit fde56eea ("mptcp: refine mptcp_cleanup_rbuf") where a new
      boolean (ack_pending) is masked with 0x9.
      
      This is not the intention to ignore values by using a boolean. This
      variable should not have a 'bool' type: we should keep the 'u8' to allow
      this comparison.
      
      Fixes: fde56eea ("mptcp: refine mptcp_cleanup_rbuf")
      Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarMatthieu Baerts <matthieu.baerts@tessares.net>
      Signed-off-by: default avatarMat Martineau <mathew.j.martineau@linux.intel.com>
      Acked-by: default avatarPaolo Abeni <pabeni@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c4512c63
    • David S. Miller's avatar
      Merge branch 'reset-mac' · 8eb517a2
      David S. Miller authored
      Guillaume Nault says:
      
      ====================
      net: reset MAC header consistently across L3 virtual devices
      
      Some virtual L3 devices, like vxlan-gpe and gre (in collect_md mode),
      reset the MAC header pointer after they parsed the outer headers. This
      accurately reflects the fact that the decapsulated packet is pure L3
      packet, as that makes the MAC header 0 bytes long (the MAC and network
      header pointers are equal).
      
      However, many L3 devices only adjust the network header after
      decapsulation and leave the MAC header pointer to its original value.
      This can confuse other parts of the networking stack, like TC, which
      then considers the outer headers as one big MAC header.
      
      This patch series makes the following L3 tunnels behave like VXLAN-GPE:
      bareudp, ipip, sit, gre, ip6gre, ip6tnl, gtp.
      
      The case of gre is a bit special. It already resets the MAC header
      pointer in collect_md mode, so only the classical mode needs to be
      adjusted. However, gre also has a special case that expects the MAC
      header pointer to keep pointing to the outer header even after
      decapsulation. Therefore, patch 4 keeps an exception for this case.
      
      Ideally, we'd centralise the call to skb_reset_mac_header() in
      ip_tunnel_rcv(), to avoid manual calls in ipip (patch 2),
      sit (patch 3) and gre (patch 4). That's unfortunately not feasible
      currently, because of the gre special case discussed above that
      precludes us from resetting the MAC header unconditionally.
      
      The original motivation is to redirect bareudp packets to Ethernet
      devices (as described in patch 1). The rest of this series aims at
      bringing consistency across all L3 devices (apart from gre's special
      case unfortunately).
      
      Note: the gtp patch results from pure code inspection and has been
      compiled tested only.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8eb517a2
    • Guillaume Nault's avatar
      gtp: reset mac_header after decap · b2d898c8
      Guillaume Nault authored
      For consistency with other L3 tunnel devices, reset the mac_header
      pointer after decapsulation. This makes the mac_header 0 bytes long,
      thus making it clear that this skb has no mac_header.
      
      Compile tested only.
      Signed-off-by: default avatarGuillaume Nault <gnault@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b2d898c8
    • Guillaume Nault's avatar
      ip6_tunnel: allow redirecting ip6gre and ipxip6 packets to eth devices · da5a2e49
      Guillaume Nault authored
      Reset the mac_header pointer even when the tunnel transports only L3
      data (in the ARPHRD_ETHER case, this is already done by eth_type_trans).
      This prevents other parts of the stack from mistakenly accessing the
      outer header after the packet has been decapsulated.
      
      In practice, this allows to push an Ethernet header to ipip6, ip6ip6,
      mplsip6 or ip6gre packets and redirect them to an Ethernet device:
      
        $ tc filter add dev ip6tnl0 ingress matchall       \
            action vlan push_eth dst_mac 00:00:5e:00:53:01 \
                                 src_mac 00:00:5e:00:53:00 \
            action mirred egress redirect dev eth0
      
      Without this patch, push_eth refuses to add an ethernet header because
      the skb appears to already have a MAC header.
      Signed-off-by: default avatarGuillaume Nault <gnault@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      da5a2e49
    • Guillaume Nault's avatar
      gre: let mac_header point to outer header only when necessary · aab1e898
      Guillaume Nault authored
      Commit e271c7b4 ("gre: do not keep the GRE header around in collect
      medata mode") did reset the mac_header for the collect_md case. Let's
      extend this behaviour to classical gre devices as well.
      
      ipgre_header_parse() seems to be the only case that requires mac_header
      to point to the outer header. We can detect this case accurately by
      checking ->header_ops. For all other cases, we can reset mac_header.
      
      This allows to push an Ethernet header to ipgre packets and redirect
      them to an Ethernet device:
      
        $ tc filter add dev gre0 ingress matchall          \
            action vlan push_eth dst_mac 00:00:5e:00:53:01 \
                                 src_mac 00:00:5e:00:53:00 \
            action mirred egress redirect dev eth0
      
      Before this patch, this worked only for collect_md gre devices.
      Now this works for regular gre devices as well. Only the special case
      of gre devices that use ipgre_header_ops isn't supported.
      Signed-off-by: default avatarGuillaume Nault <gnault@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      aab1e898
    • Guillaume Nault's avatar
      sit: allow redirecting ip6ip, ipip and mplsip packets to eth devices · 730eed27
      Guillaume Nault authored
      Even though sit transports L3 data (IPv6, IPv4 or MPLS) packets, it
      needs to reset the mac_header pointer, so that other parts of the stack
      don't mistakenly access the outer header after the packet has been
      decapsulated. There are two rx handlers to modify: ipip6_rcv() for the
      ip6ip mode and sit_tunnel_rcv() which is used to re-implement the ipip
      and mplsip modes of ipip.ko.
      
      This allows to push an Ethernet header to sit packets and redirect
      them to an Ethernet device:
      
        $ tc filter add dev sit0 ingress matchall          \
            action vlan push_eth dst_mac 00:00:5e:00:53:01 \
                                 src_mac 00:00:5e:00:53:00 \
            action mirred egress redirect dev eth0
      
      Without this patch, push_eth refuses to add an ethernet header because
      the skb appears to already have a MAC header.
      Signed-off-by: default avatarGuillaume Nault <gnault@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      730eed27
    • Guillaume Nault's avatar
      ipip: allow redirecting ipip and mplsip packets to eth devices · 7ad136fd
      Guillaume Nault authored
      Even though ipip transports IPv4 or MPLS packets, it needs to reset the
      mac_header pointer, so that other parts of the stack don't mistakenly
      access the outer header after the packet has been decapsulated.
      
      This allows to push an Ethernet header to ipip or mplsip packets and
      redirect them to an Ethernet device:
      
        $ tc filter add dev ipip0 ingress matchall         \
            action vlan push_eth dst_mac 00:00:5e:00:53:01 \
                                 src_mac 00:00:5e:00:53:00 \
            action mirred egress redirect dev eth0
      
      Without this patch, push_eth refuses to add an ethernet header because
      the skb appears to already have a MAC header.
      Signed-off-by: default avatarGuillaume Nault <gnault@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7ad136fd
    • Guillaume Nault's avatar
      bareudp: allow redirecting bareudp packets to eth devices · 99c8719b
      Guillaume Nault authored
      Even though bareudp transports L3 data (typically IP or MPLS), it needs
      to reset the mac_header pointer, so that other parts of the stack don't
      mistakenly access the outer header after the packet has been
      decapsulated.
      
      This allows to push an Ethernet header to bareudp packets and redirect
      them to an Ethernet device:
      
        $ tc filter add dev bareudp0 ingress matchall      \
            action vlan push_eth dst_mac 00:00:5e:00:53:01 \
                                 src_mac 00:00:5e:00:53:00 \
            action mirred egress redirect dev eth0
      
      Without this patch, push_eth refuses to add an ethernet header because
      the skb appears to already have a MAC header.
      Signed-off-by: default avatarGuillaume Nault <gnault@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      99c8719b
  2. 25 Jun, 2021 10 commits
    • David S. Miller's avatar
      Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue · ff8744b5
      David S. Miller authored
      Tony Nguyen says:
      
      ====================
      100GbE Intel Wired LAN Driver Updates 2021-06-25
      
      This series contains updates to ice driver only.
      
      Jesse adds support for tracepoints to aide in debugging.
      
      Maciej adds support for PTP auxiliary pin support.
      
      Victor removes the VSI info from the old aggregator when moving the VSI
      to another aggregator.
      
      Tony removes an unnecessary VSI assignment.
      
      Christophe Jaillet fixes a memory leak for failed allocation in
      ice_pf_dcb_cfg().
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ff8744b5
    • Guvenc Gulce's avatar
      net/smc: Ensure correct state of the socket in send path · 17081633
      Guvenc Gulce authored
      When smc_sendmsg() is called before the SMC socket initialization has
      completed, smc_tx_sendmsg() will access un-initialized fields of the
      SMC socket which results in a null-pointer dereference.
      Fix this by checking the socket state first in smc_tx_sendmsg().
      
      Fixes: e0e4b8fa ("net/smc: Add SMC statistics support")
      Reported-by: syzbot+5dda108b672b54141857@syzkaller.appspotmail.com
      Reviewed-by: default avatarKarsten Graul <kgraul@linux.ibm.com>
      Signed-off-by: default avatarGuvenc Gulce <guvenc@linux.ibm.com>
      Signed-off-by: default avatarKarsten Graul <kgraul@linux.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      17081633
    • David S. Miller's avatar
      Merge tag 'wireless-drivers-next-2021-06-25' of... · 4e3db44a
      David S. Miller authored
      Merge tag 'wireless-drivers-next-2021-06-25' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next
      
      Kalle Valo says:
      
      ====================
      wireless-drivers-next patches for v5.14
      
      Second, and most likely the last, set of patches for v5.14. mt76 and
      iwlwifi have most patches in this round, but rtw88 also has some new
      features. Nothing special really standing out.
      
      mt76
      
      * mt7915 MSI support
      
      * disable ASPM on mt7915
      
      * mt7915 tx status reporting
      
      * mt7921 decap offload
      
      rtw88
      
      * beacon filter support
      
      * path diversity support
      
      * firmware crash information via devcoredump
      
      * quirks for disabling pci capabilities
      
      mt7601u
      
      * add USB ID for a XiaoDu WiFi Dongle
      
      ath11k
      
      * enable support for QCN9074 PCI devices
      
      brcmfmac
      
      * support parse country code map from DeviceTree
      
      iwlwifi
      
      * support for new hardware
      
      * support for BIOS control of 11ax enablement in Russia
      
      * support UNII4 band enablement from BIOS
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4e3db44a
    • Marcin Wojtas's avatar
      net: mdiobus: withdraw fwnode_mdbiobus_register · ac53c264
      Marcin Wojtas authored
      The newly implemented fwnode_mdbiobus_register turned out to be
      problematic - in case the fwnode_/of_/acpi_mdio are built as
      modules, a dependency cycle can be observed during the depmod phase of
      modules_install, eg.:
      
      depmod: ERROR: Cycle detected: fwnode_mdio -> of_mdio -> fwnode_mdio
      depmod: ERROR: Found 2 modules in dependency cycles!
      
      OR:
      
      depmod: ERROR: Cycle detected: acpi_mdio -> fwnode_mdio -> acpi_mdio
      depmod: ERROR: Found 2 modules in dependency cycles!
      
      A possible solution could be to rework fwnode_mdiobus_register,
      so that to merge the contents of acpi_mdiobus_register and
      of_mdiobus_register. However feasible, such change would
      be very intrusive and affect huge amount of the of_mdiobus_register
      users.
      
      Since there are currently 2 users of ACPI and MDIO
      (xgmac_mdio and mvmdio), withdraw the fwnode_mdbiobus_register
      and roll back to a simple 'if' condition in affected drivers.
      
      Fixes: 62a6ef6a ("net: mdiobus: Introduce fwnode_mdbiobus_register()")
      Signed-off-by: default avatarMarcin Wojtas <mw@semihalf.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ac53c264
    • Christophe JAILLET's avatar
      ice: Fix a memory leak in an error handling path in 'ice_pf_dcb_cfg()' · b81c191c
      Christophe JAILLET authored
      If this 'kzalloc()' fails we must free some resources as in all the other
      error handling paths of this function.
      
      Fixes: 348048e7 ("ice: Implement iidc operations")
      Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      b81c191c
    • Tony Nguyen's avatar
      ice: remove unnecessary VSI assignment · 70fa0a07
      Tony Nguyen authored
      ice_get_vf_vsi() is being called twice for the same VSI. Remove the
      unnecessary call/assignment.
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      Tested-by: default avatarTony Brelinski <tonyx.brelinski@intel.com>
      70fa0a07
    • Victor Raj's avatar
      ice: remove the VSI info from previous agg · 37c59206
      Victor Raj authored
      Remove the VSI info from previous aggregator after moving the VSI to a
      new aggregator.
      Signed-off-by: default avatarVictor Raj <victor.raj@intel.com>
      Tested-by: default avatarTony Brelinski <tonyx.brelinski@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      37c59206
    • Maciej Machnikowski's avatar
      ice: add support for auxiliary input/output pins · 172db5f9
      Maciej Machnikowski authored
      The E810 device supports programmable pins for enabling both input and
      output events related to the PTP hardware clock. This includes both
      output signals with programmable period, as well as timestamping of
      events on input pins.
      
      Add support for enabling these using the CONFIG_PTP_1588_CLOCK
      interface.
      
      This allows programming the software defined pins to take advantage of
      the hardware clock features.
      Signed-off-by: default avatarMaciej Machnikowski <maciej.machnikowski@intel.com>
      Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      172db5f9
    • David Thompson's avatar
      Add Mellanox BlueField Gigabit Ethernet driver · f92e1869
      David Thompson authored
      This patch adds build and driver logic for the "mlxbf_gige"
      Ethernet driver from Mellanox Technologies. The second
      generation BlueField SoC from Mellanox supports an
      out-of-band GigaBit Ethernet management port to the Arm
      subsystem.  This driver supports TCP/IP network connectivity
      for that port, and provides back-end routines to handle
      basic ethtool requests.
      
      The driver interfaces to the Gigabit Ethernet block of
      BlueField SoC via MMIO accesses to registers, which contain
      control information or pointers describing transmit and
      receive resources.  There is a single transmit queue, and
      the port supports transmit ring sizes of 4 to 256 entries.
      There is a single receive queue, and the port supports
      receive ring sizes of 32 to 32K entries. The transmit and
      receive rings are allocated from DMA coherent memory. There
      is a 16-bit producer and consumer index per ring to denote
      software ownership and hardware ownership, respectively.
      
      The main driver logic such as probe(), remove(), and netdev
      ops are in "mlxbf_gige_main.c".  Logic in "mlxbf_gige_rx.c"
      and "mlxbf_gige_tx.c" handles the packet processing for
      receive and transmit respectively.
      
      The logic in "mlxbf_gige_ethtool.c" supports the handling
      of some basic ethtool requests: get driver info, get ring
      parameters, get registers, and get statistics.
      
      The logic in "mlxbf_gige_mdio.c" is the driver controlling
      the Mellanox BlueField hardware that interacts with a PHY
      device via MDIO/MDC pins.  This driver does the following:
        - At driver probe time, it configures several BlueField MDIO
          parameters such as sample rate, full drive, voltage and MDC
        - It defines functions to read and write MDIO registers and
          registers the MDIO bus.
        - It defines the phy interrupt handler reporting a
          link up/down status change
        - This driver's probe is invoked from the main driver logic
          while the phy interrupt handler is registered in ndo_open.
      
      Driver limitations
        - Only supports 1Gbps speed
        - Only supports GMII protocol
        - Supports maximum packet size of 2KB
        - Does not support scatter-gather buffering
      
      Testing
        - Successful build of kernel for ARM64, ARM32, X86_64
        - Tested ARM64 build on FastModels & Palladium
        - Tested ARM64 build on several Mellanox boards that are built with
          the BlueField-2 SoC.  The testing includes coverage in the areas
          of networking (e.g. ping, iperf, ifconfig, route), file transfers
          (e.g. SCP), and various ethtool options relevant to this driver.
      Signed-off-by: default avatarDavid Thompson <davthompson@nvidia.com>
      Signed-off-by: default avatarAsmaa Mnebhi <asmaa@nvidia.com>
      Reviewed-by: default avatarLiming Sun <limings@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f92e1869
    • Jesse Brandeburg's avatar
      ice: add tracepoints · 3089cf6d
      Jesse Brandeburg authored
      This patch is modeled after one by Scott Peterson for i40e.
      
      Add tracepoints to the driver, via a new file ice_trace.h and some new
      trace calls added in interesting places in the driver. Add some tracing
      for DIMLIB to help debug interrupt moderation problems.
      
      Performance should not be affected, and this can be very useful
      for debugging and adding new trace events to paths in the future.
      
      Note eBPF programs can attach to these events, as well as perf
      can count them since we're attaching to the events subsystem
      in the kernel.
      Co-developed-by: default avatarBen Shelton <benjamin.h.shelton@intel.com>
      Signed-off-by: default avatarBen Shelton <benjamin.h.shelton@intel.com>
      Signed-off-by: default avatarJesse Brandeburg <jesse.brandeburg@intel.com>
      Tested-by: default avatarTony Brelinski <tonyx.brelinski@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      3089cf6d
  3. 24 Jun, 2021 11 commits