1. 28 Mar, 2023 1 commit
    • Eric Dumazet's avatar
      net: introduce a config option to tweak MAX_SKB_FRAGS · 3948b059
      Eric Dumazet authored
      Currently, MAX_SKB_FRAGS value is 17.
      
      For standard tcp sendmsg() traffic, no big deal because tcp_sendmsg()
      attempts order-3 allocations, stuffing 32768 bytes per frag.
      
      But with zero copy, we use order-0 pages.
      
      For BIG TCP to show its full potential, we add a config option
      to be able to fit up to 45 segments per skb.
      
      This is also needed for BIG TCP rx zerocopy, as zerocopy currently
      does not support skbs with frag list.
      
      We have used MAX_SKB_FRAGS=45 value for years at Google before
      we deployed 4K MTU, with no adverse effect, other than
      a recent issue in mlx4, fixed in commit 26782aad
      ("net/mlx4: MLX4_TX_BOUNCE_BUFFER_SIZE depends on MAX_SKB_FRAGS")
      
      Back then, goal was to be able to receive full size (64KB) GRO
      packets without the frag_list overhead.
      
      Note that /proc/sys/net/core/max_skb_frags can also be used to limit
      the number of fragments TCP can use in tx packets.
      
      By default we keep the old/legacy value of 17 until we get
      more coverage for the updated values.
      
      Sizes of struct skb_shared_info on 64bit arches
      
      MAX_SKB_FRAGS | sizeof(struct skb_shared_info):
      ==============================================
               17     320
               21     320+64  = 384
               25     320+128 = 448
               29     320+192 = 512
               33     320+256 = 576
               37     320+320 = 640
               41     320+384 = 704
               45     320+448 = 768
      
      This inflation might cause problems for drivers assuming they could pack
      both the incoming packet (for MTU=1500) and skb_shared_info in half a page,
      using build_skb().
      
      v3: fix build error when CONFIG_NET=n
      v2: fix two build errors assuming MAX_SKB_FRAGS was "unsigned long"
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Reviewed-by: default avatarNikolay Aleksandrov <razor@blackwall.org>
      Reviewed-by: default avatarJason Xing <kerneljasonxing@gmail.com>
      Link: https://lore.kernel.org/r/20230323162842.1935061-1-eric.dumazet@gmail.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      3948b059
  2. 27 Mar, 2023 28 commits
  3. 25 Mar, 2023 2 commits
  4. 24 Mar, 2023 9 commits
    • Jakub Kicinski's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · dc0a7b52
      Jakub Kicinski authored
      Conflicts:
      
      drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
        6e9d51b1 ("net/mlx5e: Initialize link speed to zero")
        1bffcea4 ("net/mlx5e: Add devlink hairpin queues parameters")
      https://lore.kernel.org/all/20230324120623.4ebbc66f@canb.auug.org.au/
      https://lore.kernel.org/all/20230321211135.47711-1-saeed@kernel.org/
      
      Adjacent changes:
      
      drivers/net/phy/phy.c
        323fe43c ("net: phy: Improved PHY error reporting in state machine")
        4203d840 ("net: phy: Ensure state transitions are processed from phy_stop()")
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      dc0a7b52
    • Linus Torvalds's avatar
      Merge tag 'net-6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 608f1b13
      Linus Torvalds authored
      Pull networking fixes from Jakub Kicinski:
       "Including fixes from bpf, wifi and bluetooth.
      
        Current release - regressions:
      
         - wifi: mt76: mt7915: add back 160MHz channel width support for
           MT7915
      
         - libbpf: revert poisoning of strlcpy, it broke uClibc-ng
      
        Current release - new code bugs:
      
         - bpf: improve the coverage of the "allow reads from uninit stack"
           feature to fix verification complexity problems
      
         - eth: am65-cpts: reset PPS genf adj settings on enable
      
        Previous releases - regressions:
      
         - wifi: mac80211: serialize ieee80211_handle_wake_tx_queue()
      
         - wifi: mt76: do not run mt76_unregister_device() on unregistered hw,
           fix null-deref
      
         - Bluetooth: btqcomsmd: fix command timeout after setting BD address
      
         - eth: igb: revert rtnl_lock() that causes a deadlock
      
         - dsa: mscc: ocelot: fix device specific statistics
      
        Previous releases - always broken:
      
         - xsk: add missing overflow check in xdp_umem_reg()
      
         - wifi: mac80211:
            - fix QoS on mesh interfaces
            - fix mesh path discovery based on unicast packets
      
         - Bluetooth:
            - ISO: fix timestamped HCI ISO data packet parsing
            - remove "Power-on" check from Mesh feature
      
         - usbnet: more fixes to drivers trusting packet length
      
         - wifi: iwlwifi: mvm: fix mvmtxq->stopped handling
      
         - Bluetooth: btintel: iterate only bluetooth device ACPI entries
      
         - eth: iavf: fix inverted Rx hash condition leading to disabled hash
      
         - eth: igc: fix the validation logic for taprio's gate list
      
         - dsa: tag_brcm: legacy: fix daisy-chained switches
      
        Misc:
      
         - bpf: adjust insufficient default bpf_jit_limit to account for
           growth of BPF use over the last 5 years
      
         - xdp: bpf_xdp_metadata() use EOPNOTSUPP as unique errno indicating
           no driver support"
      
      * tag 'net-6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (84 commits)
        Bluetooth: HCI: Fix global-out-of-bounds
        Bluetooth: mgmt: Fix MGMT add advmon with RSSI command
        Bluetooth: btsdio: fix use after free bug in btsdio_remove due to unfinished work
        Bluetooth: L2CAP: Fix responding with wrong PDU type
        Bluetooth: btqcomsmd: Fix command timeout after setting BD address
        Bluetooth: btinel: Check ACPI handle for NULL before accessing
        net: mdio: thunder: Add missing fwnode_handle_put()
        net: dsa: mt7530: move setting ssc_delta to PHY_INTERFACE_MODE_TRGMII case
        net: dsa: mt7530: move lowering TRGMII driving to mt7530_setup()
        net: dsa: mt7530: move enabling disabling core clock to mt7530_pll_setup()
        net: asix: fix modprobe "sysfs: cannot create duplicate filename"
        gve: Cache link_speed value from device
        tools: ynl: Fix genlmsg header encoding formats
        net: enetc: fix aggregate RMON counters not showing the ranges
        Bluetooth: Remove "Power-on" check from Mesh feature
        Bluetooth: Fix race condition in hci_cmd_sync_clear
        Bluetooth: btintel: Iterate only bluetooth device ACPI entries
        Bluetooth: ISO: fix timestamped HCI ISO data packet parsing
        Bluetooth: btusb: Remove detection of ISO packets over bulk
        Bluetooth: hci_core: Detect if an ACL packet is in fact an ISO packet
        ...
      608f1b13
    • Linus Torvalds's avatar
      Merge tag 'for-6.3-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · 28506304
      Linus Torvalds authored
      Pull btrfs fixes from David Sterba:
       "A few more fixes, the zoned accounting fix is spread across a few
        patches, preparatory and the actual fixes:
      
         - zoned mode:
            - fix accounting of unusable zone space
            - fix zone activation condition for DUP profile
            - preparatory patches
      
         - improved error handling of missing chunks
      
         - fix compiler warning"
      
      * tag 'for-6.3-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        btrfs: zoned: drop space_info->active_total_bytes
        btrfs: zoned: count fresh BG region as zone unusable
        btrfs: use temporary variable for space_info in btrfs_update_block_group
        btrfs: rename BTRFS_FS_NO_OVERCOMMIT to BTRFS_FS_ACTIVE_ZONE_TRACKING
        btrfs: zoned: fix btrfs_can_activate_zone() to support DUP profile
        btrfs: fix compiler warning on SPARC/PA-RISC handling fscrypt_setup_filename
        btrfs: handle missing chunk mapping more gracefully
      28506304
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 6dd74c51
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "Four small fixes, three in drivers.
      
        The core fix adds a UFS device to an existing quirk to avoid a huge
        delay on boot"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: scsi_dh_alua: Fix memleak for 'qdata' in alua_activate()
        scsi: qla2xxx: Synchronize the IOCB count to be in order
        scsi: qla2xxx: Perform lockless command completion in abort path
        scsi: core: Add BLIST_SKIP_VPD_PAGES for SKhynix H28U74301AMR
      6dd74c51
    • Florian Fainelli's avatar
      net: phy: Improved PHY error reporting in state machine · 323fe43c
      Florian Fainelli authored
      When the PHY library calls phy_error() something bad has happened, and
      we halt the PHY state machine. Calling phy_error() from the main state
      machine however is not precise enough to know whether the issue is
      reading the link status or starting auto-negotiation.
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      323fe43c
    • Cai Huoqing's avatar
      net/ism: Remove redundant pci_clear_master · c85bd3da
      Cai Huoqing authored
      Remove pci_clear_master to simplify the code,
      the bus-mastering is also cleared in do_pci_disable_device,
      like this:
      ./drivers/pci/pci.c:2197
      static void do_pci_disable_device(struct pci_dev *dev)
      {
      	u16 pci_command;
      
      	pci_read_config_word(dev, PCI_COMMAND, &pci_command);
      	if (pci_command & PCI_COMMAND_MASTER) {
      		pci_command &= ~PCI_COMMAND_MASTER;
      		pci_write_config_word(dev, PCI_COMMAND, pci_command);
      	}
      
      	pcibios_disable_device(dev);
      }.
      And dev->is_busmaster is set to 0 in pci_disable_device.
      Signed-off-by: default avatarCai Huoqing <cai.huoqing@linux.dev>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c85bd3da
    • Cai Huoqing's avatar
      isdn: mISDN: netjet: Remove redundant pci_clear_master · 950bfdcf
      Cai Huoqing authored
      Remove pci_clear_master to simplify the code,
      the bus-mastering is also cleared in do_pci_disable_device,
      like this:
      ./drivers/pci/pci.c:2197
      static void do_pci_disable_device(struct pci_dev *dev)
      {
      	u16 pci_command;
      
      	pci_read_config_word(dev, PCI_COMMAND, &pci_command);
      	if (pci_command & PCI_COMMAND_MASTER) {
      		pci_command &= ~PCI_COMMAND_MASTER;
      		pci_write_config_word(dev, PCI_COMMAND, pci_command);
      	}
      
      	pcibios_disable_device(dev);
      }.
      And dev->is_busmaster is set to 0 in pci_disable_device.
      Signed-off-by: default avatarCai Huoqing <cai.huoqing@linux.dev>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      950bfdcf
    • Horatiu Vultur's avatar
      net: phy: micrel: Add support for PTP_PF_EXTTS for lan8841 · fac63186
      Horatiu Vultur authored
      Extend the PTP programmable gpios to implement also PTP_PF_EXTTS
      function. The pins can be configured to capture both of rising
      and falling edge. Once the event is seen, then an interrupt is
      generated and the LTC is saved in the registers.
      
      This was tested using:
      ts2phc -m -l 7 -s generic -f ts2phc.cfg
      
      Where the configuration was the following:
      [global]
      ts2phc.pin_index  6
      
      [eth2]
      Signed-off-by: default avatarHoratiu Vultur <horatiu.vultur@microchip.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fac63186
    • Cai Huoqing's avatar
      ethernet: ec_bhf: Remove redundant pci_clear_master · 3228150b
      Cai Huoqing authored
      Remove pci_clear_master to simplify the code,
      the bus-mastering is also cleared in do_pci_disable_device,
      like this:
      ./drivers/pci/pci.c:2197
      static void do_pci_disable_device(struct pci_dev *dev)
      {
      	u16 pci_command;
      
      	pci_read_config_word(dev, PCI_COMMAND, &pci_command);
      	if (pci_command & PCI_COMMAND_MASTER) {
      		pci_command &= ~PCI_COMMAND_MASTER;
      		pci_write_config_word(dev, PCI_COMMAND, pci_command);
      	}
      
      	pcibios_disable_device(dev);
      }.
      And dev->is_busmaster is set to 0 in pci_disable_device.
      Signed-off-by: default avatarCai Huoqing <cai.huoqing@linux.dev>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3228150b