1. 22 10月, 2021 5 次提交
    • M
      memblock: exclude MEMBLOCK_NOMAP regions from kmemleak · 658aafc8
      Mike Rapoport 提交于
      Vladimir Zapolskiy reports:
      
      Commit a7259df7 ("memblock: make memblock_find_in_range method
      private") invokes a kernel panic while running kmemleak on OF platforms
      with nomaped regions:
      
        Unable to handle kernel paging request at virtual address fff000021e00000
        [...]
          scan_block+0x64/0x170
          scan_gray_list+0xe8/0x17c
          kmemleak_scan+0x270/0x514
          kmemleak_write+0x34c/0x4ac
      
      The memory allocated from memblock is registered with kmemleak, but if
      it is marked MEMBLOCK_NOMAP it won't have linear map entries so an
      attempt to scan such areas will fault.
      
      Ideally, memblock_mark_nomap() would inform kmemleak to ignore
      MEMBLOCK_NOMAP memory, but it can be called before kmemleak interfaces
      operating on physical addresses can use __va() conversion.
      
      Make sure that functions that mark allocated memory as MEMBLOCK_NOMAP
      take care of informing kmemleak to ignore such memory.
      
      Link: https://lore.kernel.org/all/8ade5174-b143-d621-8c8e-dc6a1898c6fb@linaro.org
      Link: https://lore.kernel.org/all/c30ff0a2-d196-c50d-22f0-bd50696b1205@quicinc.com
      Fixes: a7259df7 ("memblock: make memblock_find_in_range method private")
      Reported-by: NVladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
      Signed-off-by: NMike Rapoport <rppt@linux.ibm.com>
      Reviewed-by: NCatalin Marinas <catalin.marinas@arm.com>
      Tested-by: NVladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
      Tested-by: NQian Cai <quic_qiancai@quicinc.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      658aafc8
    • M
      Revert "memblock: exclude NOMAP regions from kmemleak" · 6c9a5455
      Mike Rapoport 提交于
      Commit 6e44bd6d ("memblock: exclude NOMAP regions from kmemleak")
      breaks boot on EFI systems with kmemleak and VM_DEBUG enabled:
      
        efi: Processing EFI memory map:
        efi:   0x000090000000-0x000091ffffff [Conventional|   |  |  |  |  |  |  |  |  |   |WB|WT|WC|UC]
        efi:   0x000092000000-0x0000928fffff [Runtime Data|RUN|  |  |  |  |  |  |  |  |   |WB|WT|WC|UC]
        ------------[ cut here ]------------
        kernel BUG at mm/kmemleak.c:1140!
        Internal error: Oops - BUG: 0 [#1] SMP
        Modules linked in:
        CPU: 0 PID: 0 Comm: swapper Not tainted 5.15.0-rc6-next-20211019+ #104
        pstate: 600000c5 (nZCv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
        pc : kmemleak_free_part_phys+0x64/0x8c
        lr : kmemleak_free_part_phys+0x38/0x8c
        sp : ffff800011eafbc0
        x29: ffff800011eafbc0 x28: 1fffff7fffb41c0d x27: fffffbfffda0e068
        x26: 0000000092000000 x25: 1ffff000023d5f94 x24: ffff800011ed84d0
        x23: ffff800011ed84c0 x22: ffff800011ed83d8 x21: 0000000000900000
        x20: ffff800011782000 x19: 0000000092000000 x18: ffff800011ee0730
        x17: 0000000000000000 x16: 0000000000000000 x15: 1ffff0000233252c
        x14: ffff800019a905a0 x13: 0000000000000001 x12: ffff7000023d5ed7
        x11: 1ffff000023d5ed6 x10: ffff7000023d5ed6 x9 : dfff800000000000
        x8 : ffff800011eaf6b7 x7 : 0000000000000001 x6 : ffff800011eaf6b0
        x5 : 00008ffffdc2a12a x4 : ffff7000023d5ed7 x3 : 1ffff000023dbf99
        x2 : 1ffff000022f0463 x1 : 0000000000000000 x0 : ffffffffffffffff
        Call trace:
         kmemleak_free_part_phys+0x64/0x8c
         memblock_mark_nomap+0x5c/0x78
         reserve_regions+0x294/0x33c
         efi_init+0x2d0/0x490
         setup_arch+0x80/0x138
         start_kernel+0xa0/0x3ec
         __primary_switched+0xc0/0xc8
        Code: 34000041 97d526e7 f9418e80 36000040 (d4210000)
        random: get_random_bytes called from print_oops_end_marker+0x34/0x80 with crng_init=0
        ---[ end trace 0000000000000000 ]---
      
      The crash happens because kmemleak_free_part_phys() tries to use __va()
      before memstart_addr is initialized and this triggers a VM_BUG_ON() in
      arch/arm64/include/asm/memory.h:
      
      Revert 6e44bd6d ("memblock: exclude NOMAP regions from kmemleak"),
      the issue it is fixing will be fixed differently.
      Reported-by: NQian Cai <quic_qiancai@quicinc.com>
      Signed-off-by: NMike Rapoport <rppt@linux.ibm.com>
      Acked-by: NCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6c9a5455
    • L
      Merge branch 'ucount-fixes-for-v5.15' of... · 9d235ac0
      Linus Torvalds 提交于
      Merge branch 'ucount-fixes-for-v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace
      
      Pull ucounts fixes from Eric Biederman:
       "There has been one very hard to track down bug in the ucount code that
        we have been tracking since roughly v5.14 was released. Alex managed
        to find a reliable reproducer a few days ago and then I was able to
        instrument the code and figure out what the issue was.
      
        It turns out the sigqueue_alloc single atomic operation optimization
        did not play nicely with ucounts multiple level rlimits. It turned out
        that either sigqueue_alloc or sigqueue_free could be operating on
        multiple levels and trigger the conditions for the optimization on
        more than one level at the same time.
      
        To deal with that situation I have introduced inc_rlimit_get_ucounts
        and dec_rlimit_put_ucounts that just focuses on the optimization and
        the rlimit and ucount changes.
      
        While looking into the big bug I found I couple of other little issues
        so I am including those fixes here as well.
      
        When I have time I would very much like to dig into process ownership
        of the shared signal queue and see if we could pick a single owner for
        the entire queue so that all of the rlimits can count to that owner.
        That should entirely remove the need to call get_ucounts and
        put_ucounts in sigqueue_alloc and sigqueue_free. It is difficult
        because Linux unlike POSIX supports setuid that works on a single
        thread"
      
      * 'ucount-fixes-for-v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace:
        ucounts: Move get_ucounts from cred_alloc_blank to key_change_session_keyring
        ucounts: Proper error handling in set_cred_ucounts
        ucounts: Pair inc_rlimit_ucounts with dec_rlimit_ucoutns in commit_creds
        ucounts: Fix signal ucount refcounting
      9d235ac0
    • L
      Merge tag 'net-5.15-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 6c2c7127
      Linus Torvalds 提交于
      Pull networking fixes from Jakub Kicinski:
       "Including fixes from netfilter, and can.
      
        We'll have one more fix for a socket accounting regression, it's still
        getting polished. Otherwise things look fine.
      
        Current release - regressions:
      
         - revert "vrf: reset skb conntrack connection on VRF rcv", there are
           valid uses for previous behavior
      
         - can: m_can: fix iomap_read_fifo() and iomap_write_fifo()
      
        Current release - new code bugs:
      
         - mlx5: e-switch, return correct error code on group creation failure
      
        Previous releases - regressions:
      
         - sctp: fix transport encap_port update in sctp_vtag_verify
      
         - stmmac: fix E2E delay mechanism (in PTP timestamping)
      
        Previous releases - always broken:
      
         - netfilter: ip6t_rt: fix out-of-bounds read of ipv6_rt_hdr
      
         - netfilter: xt_IDLETIMER: fix out-of-bound read caused by lack of
           init
      
         - netfilter: ipvs: make global sysctl read-only in non-init netns
      
         - tcp: md5: fix selection between vrf and non-vrf keys
      
         - ipv6: count rx stats on the orig netdev when forwarding
      
         - bridge: mcast: use multicast_membership_interval for IGMPv3
      
         - can:
            - j1939: fix UAF for rx_kref of j1939_priv abort sessions on
              receiving bad messages
      
            - isotp: fix TX buffer concurrent access in isotp_sendmsg() fix
              return error on FC timeout on TX path
      
         - ice: fix re-init of RDMA Tx queues and crash if RDMA was not inited
      
         - hns3: schedule the polling again when allocation fails, prevent
           stalls
      
         - drivers: add missing of_node_put() when aborting
           for_each_available_child_of_node()
      
         - ptp: fix possible memory leak and UAF in ptp_clock_register()
      
         - e1000e: fix packet loss in burst mode on Tiger Lake and later
      
         - mlx5e: ipsec: fix more checksum offload issues"
      
      * tag 'net-5.15-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (75 commits)
        usbnet: sanity check for maxpacket
        net: enetc: make sure all traffic classes can send large frames
        net: enetc: fix ethtool counter name for PM0_TERR
        ptp: free 'vclock_index' in ptp_clock_release()
        sfc: Don't use netif_info before net_device setup
        sfc: Export fibre-specific supported link modes
        net/mlx5e: IPsec: Fix work queue entry ethernet segment checksum flags
        net/mlx5e: IPsec: Fix a misuse of the software parser's fields
        net/mlx5e: Fix vlan data lost during suspend flow
        net/mlx5: E-switch, Return correct error code on group creation failure
        net/mlx5: Lag, change multipath and bonding to be mutually exclusive
        ice: Add missing E810 device ids
        igc: Update I226_K device ID
        e1000e: Fix packet loss on Tiger Lake and later
        e1000e: Separate TGP board type from SPT
        ptp: Fix possible memory leak in ptp_clock_register()
        net: stmmac: Fix E2E delay mechanism
        nfc: st95hf: Make spi remove() callback return zero
        net: hns3: disable sriov before unload hclge layer
        net: hns3: fix vf reset workqueue cannot exit
        ...
      6c2c7127
    • L
      Merge tag 'powerpc-5.15-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 0a3221b6
      Linus Torvalds 提交于
      Pull powerpc fixes from Michael Ellerman:
      
       - Fix a bug exposed by a previous fix, where running guests with
         certain SMT topologies could crash the host on Power8.
      
       - Fix atomic sleep warnings when re-onlining CPUs, when PREEMPT is
         enabled.
      
      Thanks to Nathan Lynch, Srikar Dronamraju, and Valentin Schneider.
      
      * tag 'powerpc-5.15-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/smp: do not decrement idle task preempt count in CPU offline
        powerpc/idle: Don't corrupt back chain when going idle
      0a3221b6
  2. 21 10月, 2021 22 次提交
  3. 20 10月, 2021 13 次提交
    • L
      Merge tag 'nios2_fixes_for_v5.15_part2' of... · 1e599774
      Linus Torvalds 提交于
      Merge tag 'nios2_fixes_for_v5.15_part2' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux
      
      Pull nios2 fix from Dinh Nguyen:
      
       - Renamed CTL_STATUS to CTL_FSTATUS to fix a redefined warning
      
      * tag 'nios2_fixes_for_v5.15_part2' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux:
        NIOS2: irqflags: rename a redefined register name
      1e599774
    • L
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 0afe64be
      Linus Torvalds 提交于
      Pull kvm fixes from Paolo Bonzini:
       "Tools:
         - kvm_stat: do not show halt_wait_ns since it is not a cumulative statistic
      
        x86:
         - clean ups and fixes for bus lock vmexit and lazy allocation of rmaps
         - two fixes for SEV-ES (one more coming as soon as I get reviews)
         - fix for static_key underflow
      
        ARM:
         - Properly refcount pages used as a concatenated stage-2 PGD
         - Fix missing unlock when detecting the use of MTE+VM_SHARED"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: SEV-ES: reduce ghcb_sa_len to 32 bits
        KVM: VMX: Remove redundant handling of bus lock vmexit
        KVM: kvm_stat: do not show halt_wait_ns
        KVM: x86: WARN if APIC HW/SW disable static keys are non-zero on unload
        Revert "KVM: x86: Open code necessary bits of kvm_lapic_set_base() at vCPU RESET"
        KVM: SEV-ES: Set guest_state_protected after VMSA update
        KVM: X86: fix lazy allocation of rmaps
        KVM: SEV-ES: fix length of string I/O
        KVM: arm64: Release mmap_lock when using VM_SHARED with MTE
        KVM: arm64: Report corrupted refcount at EL2
        KVM: arm64: Fix host stage-2 PGD refcount
        KVM: s390: Function documentation fixes
      0afe64be
    • S
      e1000e: Separate TGP board type from SPT · 280db5d4
      Sasha Neftin 提交于
      We have the same LAN controller on different PCHs. Separate TGP board
      type from SPT which will allow for specific fixes to be applied for
      TGP platforms.
      Suggested-by: NKai-Heng Feng <kai.heng.feng@canonical.com>
      Signed-off-by: NSasha Neftin <sasha.neftin@intel.com>
      Reviewed-by: NPaul Menzel <pmenzel@molgen.mpg.de>
      Tested-by: NMark Pearson <markpearson@lenovo.com>
      Tested-by: NNechama Kraus <nechamax.kraus@linux.intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      280db5d4
    • E
      ucounts: Move get_ucounts from cred_alloc_blank to key_change_session_keyring · 5ebcbe34
      Eric W. Biederman 提交于
      Setting cred->ucounts in cred_alloc_blank does not make sense.  The
      uid and user_ns are deliberately not set in cred_alloc_blank but
      instead the setting is delayed until key_change_session_keyring.
      
      So move dealing with ucounts into key_change_session_keyring as well.
      
      Unfortunately that movement of get_ucounts adds a new failure mode to
      key_change_session_keyring.  I do not see anything stopping the parent
      process from calling setuid and changing the relevant part of it's
      cred while keyctl_session_to_parent is running making it fundamentally
      necessary to call get_ucounts in key_change_session_keyring.  Which
      means that the new failure mode cannot be avoided.
      
      A failure of key_change_session_keyring results in a single threaded
      parent keeping it's existing credentials.  Which results in the parent
      process not being able to access the session keyring and whichever
      keys are in the new keyring.
      
      Further get_ucounts is only expected to fail if the number of bits in
      the refernece count for the structure is too few.
      
      Since the code has no other way to report the failure of get_ucounts
      and because such failures are not expected to be common add a WARN_ONCE
      to report this problem to userspace.
      
      Between the WARN_ONCE and the parent process not having access to
      the keys in the new session keyring I expect any failure of get_ucounts
      will be noticed and reported and we can find another way to handle this
      condition.  (Possibly by just making ucounts->count an atomic_long_t).
      
      Cc: stable@vger.kernel.org
      Fixes: 905ae01c ("Add a reference to ucounts for each cred")
      Link: https://lkml.kernel.org/r/7k0ias0uf.fsf_-_@disp2133Tested-by: NYu Zhao <yuzhao@google.com>
      Reviewed-by: NAlexey Gladkov <legion@kernel.org>
      Signed-off-by: N"Eric W. Biederman" <ebiederm@xmission.com>
      5ebcbe34
    • Y
      ptp: Fix possible memory leak in ptp_clock_register() · 4225fea1
      Yang Yingliang 提交于
      I got memory leak as follows when doing fault injection test:
      
      unreferenced object 0xffff88800906c618 (size 8):
        comm "i2c-idt82p33931", pid 4421, jiffies 4294948083 (age 13.188s)
        hex dump (first 8 bytes):
          70 74 70 30 00 00 00 00                          ptp0....
        backtrace:
          [<00000000312ed458>] __kmalloc_track_caller+0x19f/0x3a0
          [<0000000079f6e2ff>] kvasprintf+0xb5/0x150
          [<0000000026aae54f>] kvasprintf_const+0x60/0x190
          [<00000000f323a5f7>] kobject_set_name_vargs+0x56/0x150
          [<000000004e35abdd>] dev_set_name+0xc0/0x100
          [<00000000f20cfe25>] ptp_clock_register+0x9f4/0xd30 [ptp]
          [<000000008bb9f0de>] idt82p33_probe.cold+0x8b6/0x1561 [ptp_idt82p33]
      
      When posix_clock_register() returns an error, the name allocated
      in dev_set_name() will be leaked, the put_device() should be used
      to give up the device reference, then the name will be freed in
      kobject_cleanup() and other memory will be freed in ptp_clock_release().
      Reported-by: NHulk Robot <hulkci@huawei.com>
      Fixes: a33121e5 ("ptp: fix the race between the release of ptp_clock and cdev")
      Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4225fea1
    • K
      net: stmmac: Fix E2E delay mechanism · 3cb95802
      Kurt Kanzenbach 提交于
      When utilizing End to End delay mechanism, the following error messages show up:
      
      |root@ehl1:~# ptp4l --tx_timestamp_timeout=50 -H -i eno2 -E -m
      |ptp4l[950.573]: selected /dev/ptp3 as PTP clock
      |ptp4l[950.586]: port 1: INITIALIZING to LISTENING on INIT_COMPLETE
      |ptp4l[950.586]: port 0: INITIALIZING to LISTENING on INIT_COMPLETE
      |ptp4l[952.879]: port 1: new foreign master 001395.fffe.4897b4-1
      |ptp4l[956.879]: selected best master clock 001395.fffe.4897b4
      |ptp4l[956.879]: port 1: assuming the grand master role
      |ptp4l[956.879]: port 1: LISTENING to GRAND_MASTER on RS_GRAND_MASTER
      |ptp4l[962.017]: port 1: received DELAY_REQ without timestamp
      |ptp4l[962.273]: port 1: received DELAY_REQ without timestamp
      |ptp4l[963.090]: port 1: received DELAY_REQ without timestamp
      
      Commit f2fb6b62 ("net: stmmac: enable timestamp snapshot for required PTP
      packets in dwmac v5.10a") already addresses this problem for the dwmac
      v5.10. However, same holds true for all dwmacs above version v4.10. Correct the
      check accordingly. Afterwards everything works as expected.
      
      Tested on Intel Atom(R) x6414RE Processor.
      
      Fixes: 14f34733 ("net: stmmac: Correctly take timestamp for PTPv2")
      Fixes: f2fb6b62 ("net: stmmac: enable timestamp snapshot for required PTP packets in dwmac v5.10a")
      Suggested-by: NOng Boon Leong <boon.leong.ong@intel.com>
      Signed-off-by: NKurt Kanzenbach <kurt@linutronix.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3cb95802
    • U
      nfc: st95hf: Make spi remove() callback return zero · 641e3fd1
      Uwe Kleine-König 提交于
      If something goes wrong in the remove callback, returning an error code
      just results in an error message. The device still disappears.
      
      So don't skip disabling the regulator in st95hf_remove() if resetting
      the controller via spi fails. Also don't return an error code which just
      results in two error messages.
      Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Reviewed-by: NKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      641e3fd1
    • D
      Merge branch 'hns3-fixes' · 323e9a95
      David S. Miller 提交于
      Guangbin Huang says:
      
      ====================
      net: hns3: add some fixes for -net
      
      This series adds some fixes for the HNS3 ethernet driver.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      323e9a95
    • P
      net: hns3: disable sriov before unload hclge layer · 0dd8a25f
      Peng Li 提交于
      HNS3 driver includes hns3.ko, hnae3.ko and hclge.ko.
      hns3.ko includes network stack and pci_driver, hclge.ko includes
      HW device action, algo_ops and timer task, hnae3.ko includes some
      register function.
      
      When SRIOV is enable and hclge.ko is removed, HW device is unloaded
      but VF still exists, PF will not reply VF mbx messages, and cause
      errors.
      
      This patch fix it by disable SRIOV before remove hclge.ko.
      
      Fixes: e2cb1dec ("net: hns3: Add HNS3 VF HCL(Hardware Compatibility Layer) Support")
      Signed-off-by: NPeng Li <lipeng321@huawei.com>
      Signed-off-by: NGuangbin Huang <huangguangbin2@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0dd8a25f
    • Y
      net: hns3: fix vf reset workqueue cannot exit · 1385cc81
      Yufeng Mo 提交于
      The task of VF reset is performed through the workqueue. It checks the
      value of hdev->reset_pending to determine whether to exit the loop.
      However, the value of hdev->reset_pending may also be assigned by
      the interrupt function hclgevf_misc_irq_handle(), which may cause the
      loop fail to exit and keep occupying the workqueue. This loop is not
      necessary, so remove it and the workqueue will be rescheduled if the
      reset needs to be retried or a new reset occurs.
      
      Fixes: 1cc9bc6e ("net: hns3: split hclgevf_reset() into preparing and rebuilding part")
      Signed-off-by: NYufeng Mo <moyufeng@huawei.com>
      Signed-off-by: NGuangbin Huang <huangguangbin2@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1385cc81
    • Y
      net: hns3: schedule the polling again when allocation fails · 68752b24
      Yunsheng Lin 提交于
      Currently when there is a rx page allocation failure, it is
      possible that polling may be stopped if there is no more packet
      to be reveiced, which may cause queue stall problem under memory
      pressure.
      
      This patch makes sure polling is scheduled again when there is
      any rx page allocation failure, and polling will try to allocate
      receive buffers until it succeeds.
      
      Now the allocation retry is added, it is unnecessary to do the rx
      page allocation at the end of rx cleaning, so remove it. And reset
      the unused_count to zero after calling hns3_nic_alloc_rx_buffers()
      to avoid calling hns3_nic_alloc_rx_buffers() repeatedly under
      memory pressure.
      
      Fixes: 76ad4f0e ("net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC")
      Signed-off-by: NYunsheng Lin <linyunsheng@huawei.com>
      Signed-off-by: NGuangbin Huang <huangguangbin2@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      68752b24
    • Y
      net: hns3: fix for miscalculation of rx unused desc · 9f9f0f19
      Yunsheng Lin 提交于
      rx unused desc is the desc that need attatching new buffer
      before refilling to hw to receive new packet, the number of
      desc need attatching new buffer is calculated using next_to_use
      and next_to_clean. when next_to_use == next_to_clean, currently
      hns3 driver assumes that all the desc has the buffer attatched,
      but 'next_to_use == next_to_clean' also means all the desc need
      attatching new buffer if hw has comsumed all the desc and the
      driver has not attatched any buffer to the desc yet.
      
      This patch adds 'refill' in desc_cb to indicate whether a new
      buffer has been refilled to a desc.
      
      Fixes: 76ad4f0e ("net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC")
      Signed-off-by: NYunsheng Lin <linyunsheng@huawei.com>
      Signed-off-by: NGuangbin Huang <huangguangbin2@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9f9f0f19
    • Y
      net: hns3: fix the max tx size according to user manual · adfb7b49
      Yunsheng Lin 提交于
      Currently the max tx size supported by the hw is calculated by
      using the max BD num supported by the hw. According to the hw
      user manual, the max tx size is fixed value for both non-TSO and
      TSO skb.
      
      This patch updates the max tx size according to the manual.
      
      Fixes: 8ae10cfb("net: hns3: support tx-scatter-gather-fraglist feature")
      Signed-off-by: NYunsheng Lin <linyunsheng@huawei.com>
      Signed-off-by: NGuangbin Huang <huangguangbin2@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      adfb7b49