Loic Poulain [Mon, 29 Mar 2021 15:39:32 +0000 (17:39 +0200)]
net: mhi: Allow decoupled MTU/MRU
MBIM protocol makes the mhi network interface asymmetric, ingress data
received from MHI is MBIM protocol, possibly containing multiple
aggregated IP packets, while egress data received from network stack is
IP protocol.
This changes allows a 'protocol' to specify its own MRU, that when
specified is used to allocate MHI RX buffers (skb).
For MBIM, Set the default MTU to 1500, which is the usual network MTU
for WWAN IP packets, and MRU to 3.5K (for allocation efficiency),
allowing skb to fit in an usual 4K page (including padding,
skb_shared_info, ...).
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Loic Poulain [Mon, 29 Mar 2021 15:39:31 +0000 (17:39 +0200)]
net: mhi: Add support for non-linear MBIM skb processing
Currently, if skb is non-linear, due to MHI skb chaining, it is
linearized in MBIM RX handler prior MBIM decoding, causing extra
allocation and copy that can be as large as the maximum MBIM frame
size (32K).
This change introduces MBIM decoding for non-linear skb, allowing to
process 'large' non-linear MBIM packets without skb linearization.
The IP packets are simply extracted from the MBIM frame using the
skb_copy_bits helper.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Colin Ian King [Mon, 29 Mar 2021 11:23:54 +0000 (12:23 +0100)]
ieee802154: hwsim: remove redundant initialization of variable res
The variable res is being initialized with a value that is
never read and it is being updated later with a new value.
The initialization is redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Petr Machata [Mon, 29 Mar 2021 15:57:31 +0000 (17:57 +0200)]
Documentation: net: Document resilient next-hop groups
Add a document describing the principles behind resilient next-hop groups,
and some notes about how to configure and offload them.
Suggested-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: David Ahern <dsahern@gmail.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yang Yingliang [Mon, 29 Mar 2021 12:44:27 +0000 (20:44 +0800)]
net: mdio: Correct function name mdio45_links_ok() in comment
Fix the following make W=1 kernel build warning:
drivers/net/mdio.c:95: warning: expecting prototype for mdio_link_ok(). Prototype was for mdio45_links_ok() instead
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yang Yingliang [Mon, 29 Mar 2021 12:42:57 +0000 (20:42 +0800)]
net: bonding: Correct function name bond_change_active_slave() in comment
Fix the following make W=1 kernel build warning:
drivers/net/bonding/bond_main.c:982: warning: expecting prototype for change_active_interface(). Prototype was for bond_change_active_slave() instead
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yang Yingliang [Mon, 29 Mar 2021 12:40:46 +0000 (20:40 +0800)]
net: phy: Correct function name mdiobus_register_board_info() in comment
Fix the following make W=1 kernel build warning:
drivers/net/phy/mdio-boardinfo.c:63: warning: expecting prototype for mdio_register_board_info(). Prototype was for mdiobus_register_board_info() instead
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Mon, 29 Mar 2021 20:37:26 +0000 (13:37 -0700)]
Merge branch 'mlxsw-sampling-fixes'
Ido Schimmel says:
====================
mlxsw: Two sampling fixes
This patchset fixes two bugs in recent sampling submissions.
The first fix, in patch #3, prevents matchall rules with sample action
to be added in front of flower rules on egress. Patches #1-#2 are
preparations meant at avoiding similar bugs in the future. Patch #4 is a
selftest.
The second fix, in patch #5, prevents sampling from being enabled on a
port if already enabled. Patch #6 is a selftest.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Ido Schimmel [Mon, 29 Mar 2021 10:09:48 +0000 (13:09 +0300)]
selftests: mlxsw: Test vetoing of double sampling
Test that two sampling rules cannot be configured on the same port with
the same trigger.
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ido Schimmel [Mon, 29 Mar 2021 10:09:47 +0000 (13:09 +0300)]
mlxsw: spectrum: Veto sampling if already enabled on port
The per-port sampling triggers (i.e., ingress / egress) cannot be
enabled twice. Meaning, the below configuration will not result in
packets being sampled twice:
# tc filter add dev swp1 ingress matchall skip_sw action sample rate 100 group 1
# tc filter add dev swp1 ingress matchall skip_sw action sample rate 100 group 1
Therefore, reject such configurations.
Fixes: 90f53c53ec4a ("mlxsw: spectrum: Start using sampling triggers hash table")
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ido Schimmel [Mon, 29 Mar 2021 10:09:46 +0000 (13:09 +0300)]
selftests: mlxsw: Test matchall failure with protocol match
The driver can only offload matchall rules that do not match on a
protocol. Test that matchall rules that match on a protocol are vetoed.
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ido Schimmel [Mon, 29 Mar 2021 10:09:45 +0000 (13:09 +0300)]
mlxsw: spectrum_matchall: Perform priority checks earlier
Perform the priority check earlier in the function instead of repeating
it for every action. This fixes a bug that allowed matchall rules with
sample action to be added in front of flower rules on egress.
Fixes: 54d0e963f683 ("mlxsw: spectrum_matchall: Add support for egress sampling")
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ido Schimmel [Mon, 29 Mar 2021 10:09:44 +0000 (13:09 +0300)]
mlxsw: spectrum_matchall: Convert if statements to a switch statement
Previous patch moved the protocol check out of the action check, so
these if statements can now be converted to a switch statement. Perform
the conversion.
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ido Schimmel [Mon, 29 Mar 2021 10:09:43 +0000 (13:09 +0300)]
mlxsw: spectrum_matchall: Perform protocol check earlier
Perform the protocol check earlier in the function instead of repeating
it for every action. Example:
# tc filter add dev swp1 ingress proto ip matchall skip_sw action sample group 1 rate 100
Error: matchall rules only supported with 'all' protocol.
We have an error talking to the kernel
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Mon, 29 Mar 2021 20:23:59 +0000 (13:23 -0700)]
Merge branch 'marvell-cleanups'
Weihang Li says:
====================
net: marvell: fix some coding style
Do some cleanups according to the coding style of kernel.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Yangyang Li [Mon, 29 Mar 2021 08:01:12 +0000 (16:01 +0800)]
net: marvell: Fix an alignment problem
Use tab instead of space to align the code.
Signed-off-by: Yangyang Li <liyangyang20@huawei.com>
Signed-off-by: Weihang Li <liweihang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yangyang Li [Mon, 29 Mar 2021 08:01:11 +0000 (16:01 +0800)]
net: marvell: Delete extra spaces
Just delete three extra spaces.
Signed-off-by: Yangyang Li <liyangyang20@huawei.com>
Signed-off-by: Weihang Li <liweihang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yangyang Li [Mon, 29 Mar 2021 08:01:10 +0000 (16:01 +0800)]
net: marvell: Fix the trailing format of some block comments
Use a trailing */ on a separate line for block comments.
Signed-off-by: Yangyang Li <liyangyang20@huawei.com>
Signed-off-by: Weihang Li <liweihang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yangyang Li [Mon, 29 Mar 2021 08:01:09 +0000 (16:01 +0800)]
net: marvell: Delete duplicate word in comments
Delete duplicate word in two comments.
Signed-off-by: Yangyang Li <liyangyang20@huawei.com>
Signed-off-by: Weihang Li <liweihang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Mon, 29 Mar 2021 20:21:01 +0000 (13:21 -0700)]
Merge branch 'hns3-misc'
Huazhong Tan says:
====================
net: hns3: misc updates for -next
This series include some updates for the HNS3 ethernet driver.
flow director configuration").
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Yunsheng Lin [Mon, 29 Mar 2021 03:57:53 +0000 (11:57 +0800)]
net: hns3: add stats logging when skb padding fails
skb_put_padto() may fails because of memory failure, sw_err_cnt
is already used to log memory failure in hns3_skb_linearize(),
so use it to log the memory failure for skb_put_padto() too.
Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Guojia Liao [Mon, 29 Mar 2021 03:57:52 +0000 (11:57 +0800)]
net: hns3: expand the tc config command
The device HNAE3_DEVICE_VERSION_V3 supports up to 1280 queues
and qsets for one function, so the bitwidth of tc_offset, meaning
the tqps index, needs to expand from 10 bits to 11 bits.
The device HNAE3_DEVICE_VERSION_V3 supports up to 512 queues on
one TC. The tc_size, meaning the exponent with base 2 of queues
supported on TC, which needs to expand from 3 bits to 4 bits.
Signed-off-by: Guojia Liao <liaoguojia@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yunsheng Lin [Mon, 29 Mar 2021 03:57:51 +0000 (11:57 +0800)]
net: hns3: add tx send size handling for tso skb
The actual size on wire for tso skb should be (gso_segs - 1) *
hdr + skb->len instead of skb->len, which can be seen by user using
'ethtool -S ethX' cmd, and 'Byte Queue Limit' also use the send size
stat to do the queue limiting, so add send_bytes in the desc_cb to
record the actual send size for a skb. And send_bytes is only for tx
desc_cb and page_offset is only for rx desc, so reuse the same space
for both of them.
Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yunsheng Lin [Mon, 29 Mar 2021 03:57:50 +0000 (11:57 +0800)]
net: hns3: add handling for xmit skb with recursive fraglist
Currently hns3 driver only handle the xmit skb with one level of
fraglist skb, add handling for multi level by calling hns3_tx_bd_num()
recursively when calculating bd num and calling hns3_fill_skb_to_desc()
recursively when filling tx desc.
When the skb has a fraglist level of 24, the skb is simply dropped and
stats.max_recursion_level is added to record the error. Move the stat
handling from hns3_nic_net_xmit() to hns3_nic_maybe_stop_tx() in order
to handle different error stat and add the 'max_recursion_level' and
'hw_limitation' stat.
Note that the max recursive level as 24 is chose according to below:
commit
48a1df65334b ("skbuff: return -EMSGSIZE in skb_to_sgvec to
prevent overflow").
And that we are not able to find a testcase to verify the recursive
fraglist case, so Fixes tag is not provided.
Reported-by: Barry Song <song.bao.hua@hisilicon.com>
Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yufeng Mo [Mon, 29 Mar 2021 03:57:49 +0000 (11:57 +0800)]
net: hns3: optimize the process of queue reset
Currently, the queue reset process needs to be performed one by
one, which is inefficient. However, the queue reset of the same
function is always performed at the same time. Therefore, according
to the UM, command HCLGE_OPC_CFG_RST_TRIGGER can be used to reset
all queues of the same function at a time, in order to optimize
the queue reset process.
Signed-off-by: Yufeng Mo <moyufeng@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jian Shen [Mon, 29 Mar 2021 03:57:48 +0000 (11:57 +0800)]
net: hns3: remove the rss_size limitation by vector num
Currently, if user hasn't change channel number, the rss_size
is limited to be no more than the vector number, in order to
keep one vector only being mapped to one queue. But the queue
number of each tc can be different, and one vector also can
be mapped by multiple queues. So remove this limitation.
Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Guangbin Huang [Mon, 29 Mar 2021 03:57:47 +0000 (11:57 +0800)]
net: hns3: remediate a potential overflow risk of bd_num_list
The array size of bd_num_list is a fixed value, it may have potential
overflow risk when array size of hclge_dfx_bd_offset_list is greater
than that fixed value. So modify bd_num_list as a pointer and allocate
memory for it according to array size of hclge_dfx_bd_offset_list.
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jian Shen [Mon, 29 Mar 2021 03:57:46 +0000 (11:57 +0800)]
net: hns3: fix use-after-free issue for hclge_add_fd_entry_common()
When new rule state is TO_ADD or ACTIVE, and there is already a
rule with same location in the fd_rule_list, the new rule will
be freed after modifying the old rule. It may cause user-after-free
issue when access rule again in hclge_add_fd_entry_common().
Fixes: fc4243b8de8b ("net: hns3: refactor flow director configuration")
Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jian Shen [Mon, 29 Mar 2021 03:57:45 +0000 (11:57 +0800)]
net: hns3: fix missing rule state assignment
Currently, when adding flow director rule, it missed to set
rule state. Which may cause the rule state in software is
unconsistent with hardware.
Fixes: fc4243b8de8b ("net: hns3: refactor flow director configuration")
Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Guobin Huang [Mon, 29 Mar 2021 01:54:05 +0000 (09:54 +0800)]
net: mscc: ocelot: remove redundant dev_err call in vsc9959_mdio_bus_alloc()
There is a error message within devm_ioremap_resource
already, so remove the dev_err call to avoid redundant
error message.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Guobin Huang <huangguobin4@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Guobin Huang [Mon, 29 Mar 2021 01:49:32 +0000 (09:49 +0800)]
net: stmmac: remove redundant dev_err call in qcom_ethqos_probe()
There is a error message within devm_ioremap_resource
already, so remove the dev_err call to avoid redundant
error message.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Guobin Huang <huangguobin4@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Guobin Huang [Mon, 29 Mar 2021 01:45:13 +0000 (09:45 +0800)]
net: axienet: Remove redundant dev_err call in axienet_probe()
There is a error message within devm_ioremap_resource
already, so remove the dev_err call to avoid redundant
error message.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Guobin Huang <huangguobin4@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Guobin Huang [Mon, 29 Mar 2021 01:38:32 +0000 (09:38 +0800)]
net: mdio: Remove redundant dev_err call in mdio_mux_iproc_probe()
There is a error message within devm_ioremap_resource
already, so remove the dev_err call to avoid redundant
error message.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Guobin Huang <huangguobin4@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Colin Ian King [Sun, 28 Mar 2021 21:46:47 +0000 (22:46 +0100)]
lan743x: remove redundant intializations of pointers adapter and phydev
The pointers adapter and phydev are being initialized with values that
are never read and are being updated later with a new value. The
initialization is redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Mon, 29 Mar 2021 01:12:03 +0000 (18:12 -0700)]
Merge branch 'ipa-next'
Alex Elder says:
====================
net: ipa: a few last bits
This series incorporates a few last things that didn't fit neatly
with patches I've posted recently.
The first patch eliminates all remaining kernel-doc warnings.
There's still room for kernel-doc improvement, but at least what's
there will no longer produce warnings.
The next moves the definition of the value to store in the backward
compatibility register (when present) into platform data files.
The third removes two endpoint definitions that do not need to be
defined.
The next two switch the naming convention used for configuration
data files to be based on the IPA version rather than the specific
platform. I was skeptical about this at first (i.e., I thought a
platform might have quirks separate from the IPA version). But
I'm now convinced the IPA version is enough to define the details
of the hardware block. If any exceptions to this are found, we can
treat those differently. Note: these two patches produce warnings
from checkpatch.pl about updating MAINTAINERS: these can be ignored.
The sixth removes unnecessary checks for alignment of DMA memory
allocations, based comments from David Laight.
And the last removes a symbol representing the size of a table
entry, using sizeof(__le64) in its place.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Alex Elder [Sun, 28 Mar 2021 17:31:11 +0000 (12:31 -0500)]
net: ipa: kill IPA_TABLE_ENTRY_SIZE
Entries in an IPA route or filter table are 64-bit little-endian
addresses, each of which refers to a routing or filtering rule.
The format of these table slots are fixed, but IPA_TABLE_ENTRY_SIZE
is used to define their size. This symbol doesn't really add value,
and I think it unnecessarily obscures what a table entry *is*.
So get rid of IPA_TABLE_ENTRY_SIZE, and just use sizeof(__le64) in
its place throughout the code.
Update the comments in "ipa_table.c" to provide a little better
explanation of these table slots.
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Alex Elder [Sun, 28 Mar 2021 17:31:10 +0000 (12:31 -0500)]
net: ipa: DMA addresses are nicely aligned
A recent patch avoided doing 64-bit modulo operations by checking
the alignment of some DMA allocations using only the lower 32 bits
of the address.
David Laight pointed out (after the fix was committed) that DMA
allocations might already satisfy the alignment requirements. And
he was right.
Remove the alignment checks that occur after DMA allocation requests,
and update comments to explain why the constraint is satisfied. The
only place IPA_TABLE_ALIGN was used was to check the alignment; it is
therefore no longer needed, so get rid of it.
Add comments where GSI_RING_ELEMENT_SIZE and the tre_count and
event_count channel data fields are defined to make explicit they
are required to be powers of 2.
Revise a comment in gsi_trans_pool_init_dma(), taking into account
that dma_alloc_coherent() guarantees its result is aligned to a page
size (or order thereof).
Don't bother printing an error if a DMA allocation fails.
Suggested-by: David Laight <David.Laight@ACULAB.COM>
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Alex Elder [Sun, 28 Mar 2021 17:31:09 +0000 (12:31 -0500)]
net: ipa: use version based configuration for SC7180
Rename the SC7180 configuration data file so that its name is
derived from its IPA version.
Update a few other references to the code that talk about the SC7180
rather than just IPA v4.2.
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Alex Elder [Sun, 28 Mar 2021 17:31:08 +0000 (12:31 -0500)]
net: ipa: switch to version based configuration
Rename the SDM845 configuration data file so that its name is
derived from its IPA version. I am not aware of any special IPA
behavior or handling that would be based on a specific SoC (as
opposed to a specific version of the IPA it contains).
Update a few other references to the code that talk about the SDM845
rather than just IPA v3.5.1.
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Alex Elder [Sun, 28 Mar 2021 17:31:07 +0000 (12:31 -0500)]
net: ipa: don't define endpoints unnecessarily
We don't typically need much information about modem endpoints.
Normally we need to specify information about modem endpoints in
configuration data in only two cases:
- When a modem TX endpoint supports filtering
- When another endpoint's configuration refers to it
For the first case, the AP initializes the filter table, and must
know how many endpoints (AP and modem) support filtering. An
example of the second case is the AP->modem TX endpoint, which
defines the modem<-AP RX endpoint as its status endpoint.
There is one exception to this, and it's due to a hardware quirk.
For IPA v4.2 (only) there is a problem related to allocating GSI
channels. And to work around this, the AP allocates *all* GSI
channels at startup time--including those used by the modem.
Get rid of the configuration information for two endpoints not
required for the SDM845. SC7180 runs IPA v4.2, so we can't
eliminate any modem endpoint definitions there.
Two more minor changes:
- Reorder the members defined for the ipa_endpoint_name enumerated
type to match the order used in configuration data files when
defining endpoints.
- Add a new name, IPA_ENDPOINT_MODEM_DL_NLO_TX, which can be used
for IPA v4.5+.
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Alex Elder [Sun, 28 Mar 2021 17:31:06 +0000 (12:31 -0500)]
net: ipa: store BCR register values in config data
The backward compatibility register value is a platform-specific
property that is not stored in the platform data. Create a data
field where this can be represented, and get rid ipa_reg_bcr_val().
This register is not present starting with IPA v4.5.
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Alex Elder [Sun, 28 Mar 2021 17:31:05 +0000 (12:31 -0500)]
net: ipa: fix all kernel-doc warnings
Fix all warnings produced when running:
scripts/kernel-doc -none drivers/net/ipa/*.[ch]
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Guobin Huang [Sat, 27 Mar 2021 10:37:54 +0000 (18:37 +0800)]
net: moxa: remove redundant dev_err call in moxart_mac_probe()
There is a error message within devm_ioremap_resource
already, so remove the dev_err call to avoid redundant
error message.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Guobin Huang <huangguobin4@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Guobin Huang [Sat, 27 Mar 2021 10:31:51 +0000 (18:31 +0800)]
net: lantiq: Remove redundant dev_err call in xrx200_probe()
There is a error message within devm_ioremap_resource
already, so remove the dev_err call to avoid redundant
error message.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Guobin Huang <huangguobin4@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Guobin Huang [Sat, 27 Mar 2021 10:07:18 +0000 (18:07 +0800)]
net: dsa: hellcreek: Remove redundant dev_err call in hellcreek_probe()
There is a error message within devm_ioremap_resource
already, so remove the dev_err call to avoid redundant
error message.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Guobin Huang <huangguobin4@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Guobin Huang [Sat, 27 Mar 2021 09:56:18 +0000 (17:56 +0800)]
mt76: mt7615: remove redundant dev_err call in mt7622_wmac_probe()
There is a error message within devm_ioremap_resource
already, so remove the dev_err call to avoid redundant
error message.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Guobin Huang <huangguobin4@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Junlin Yang [Sat, 27 Mar 2021 09:56:17 +0000 (17:56 +0800)]
mt76: Convert to DEFINE_SHOW_ATTRIBUTE
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
Signed-off-by: Junlin Yang <yangjunlin@yulong.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yang Yingliang [Sat, 27 Mar 2021 09:33:22 +0000 (17:33 +0800)]
net: stmmac: fix missing unlock on error in stmmac_suspend()
Add the missing unlock before return from stmmac_suspend()
in the error handling case.
Fixes: 5ec55823438e ("net: stmmac: add clocks management for gmac driver")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
kernel test robot [Sat, 27 Mar 2021 09:29:32 +0000 (10:29 +0100)]
sit: use min
Opportunity for min()
Generated by: scripts/coccinelle/misc/minmax.cocci
CC: Denis Efremov <efremov@linux.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Xiongfeng Wang [Sat, 27 Mar 2021 08:15:56 +0000 (16:15 +0800)]
NFC: digital: Correct function name in the kerneldoc comments
Fix the following W=1 kernel build warning(s):
net/nfc/digital_core.c:473: warning: expecting prototype for start_poll operation(). Prototype was for digital_start_poll() instead
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Xiongfeng Wang [Sat, 27 Mar 2021 08:15:55 +0000 (16:15 +0800)]
ip6_tunnel:: Correct function name parse_tvl_tnl_enc_lim() in the kerneldoc comments
Fix the following W=1 kernel build warning(s):
net/ipv6/ip6_tunnel.c:401: warning: expecting prototype for parse_tvl_tnl_enc_lim(). Prototype was for ip6_tnl_parse_tlv_enc_lim() instead
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Xiongfeng Wang [Sat, 27 Mar 2021 08:15:54 +0000 (16:15 +0800)]
net: 9p: Correct function names in the kerneldoc comments
Fix the following W=1 kernel build warning(s):
net/9p/client.c:133: warning: expecting prototype for parse_options(). Prototype was for parse_opts() instead
net/9p/client.c:269: warning: expecting prototype for p9_req_alloc(). Prototype was for p9_tag_alloc() instead
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Xiongfeng Wang [Sat, 27 Mar 2021 08:15:53 +0000 (16:15 +0800)]
9p/trans_fd: Correct function name p9_mux_destroy() in the kerneldoc
Fix the following W=1 kernel build warning(s):
net/9p/trans_fd.c:881: warning: expecting prototype for p9_mux_destroy(). Prototype was for p9_conn_destroy() instead
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Xiongfeng Wang [Sat, 27 Mar 2021 08:15:52 +0000 (16:15 +0800)]
net: 9p: Correct function name errstr2errno() in the kerneldoc comments
Fix the following W=1 kernel build warning(s):
net/9p/error.c:207: warning: expecting prototype for errstr2errno(). Prototype was for p9_errstr2errno() instead
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Xiongfeng Wang [Sat, 27 Mar 2021 08:15:51 +0000 (16:15 +0800)]
net: core: Correct function name netevent_unregister_notifier() in the kerneldoc
Fix the following W=1 kernel build warning(s):
net/core/netevent.c:45: warning: expecting prototype for netevent_unregister_notifier(). Prototype was for unregister_netevent_notifier() instead
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Xiongfeng Wang [Sat, 27 Mar 2021 08:15:50 +0000 (16:15 +0800)]
net: core: Correct function name dev_uc_flush() in the kerneldoc
Fix the following W=1 kernel build warning(s):
net/core/dev_addr_lists.c:732: warning: expecting prototype for dev_uc_flush(). Prototype was for dev_uc_init() instead
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Xiongfeng Wang [Sat, 27 Mar 2021 08:15:49 +0000 (16:15 +0800)]
netlabel: Correct function name netlbl_mgmt_add() in the kerneldoc comments
Fix the following W=1 kernel build warning(s):
net/netlabel/netlabel_mgmt.c:78: warning: expecting prototype for netlbl_mgmt_add(). Prototype was for netlbl_mgmt_add_common() instead
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Xiongfeng Wang [Sat, 27 Mar 2021 08:15:48 +0000 (16:15 +0800)]
l3mdev: Correct function names in the kerneldoc comments
Fix the following W=1 kernel build warning(s):
net/l3mdev/l3mdev.c:111: warning: expecting prototype for l3mdev_master_ifindex(). Prototype was for l3mdev_master_ifindex_rcu() instead
net/l3mdev/l3mdev.c:145: warning: expecting prototype for l3mdev_master_upper_ifindex_by_index(). Prototype was for l3mdev_master_upper_ifindex_by_index_rcu() instead
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ilya Lipnitskiy [Sat, 27 Mar 2021 06:07:52 +0000 (23:07 -0700)]
net: dsa: mt7530: clean up core and TRGMII clock setup
Three minor changes:
- When disabling PLL, there is no need to call core_write_mmd_indirect
directly, use the core_write wrapper instead like the rest of the code
in the function does. This change helps with consistency and
readability. Move the comment to the definition of
core_read_mmd_indirect where it belongs.
- Disable both core and TRGMII Tx clocks prior to reconfiguring.
Previously, only the core clock was disabled, but not TRGMII Tx clock.
So disable both, then configure them, then re-enable both, for
consistency.
- The core clock enable bit (REG_GSWCK_EN) is written redundantly three
times. Simplify the code and only write the register only once at the
end of clock reconfiguration to enable both core and TRGMII Tx clocks.
Tested on Ubiquiti ER-X running the GMAC0 and MT7530 in TRGMII mode.
Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Liu Jian [Sat, 27 Mar 2021 04:33:39 +0000 (12:33 +0800)]
net: hns3: no return statement in hclge_clear_arfs_rules
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c: In function 'hclge_clear_arfs_rules':
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:7173:1: error: no return statement in function returning non-void [-Werror=return-type]
7173 | }
| ^
cc1: some warnings being treated as errors
make[6]: *** [scripts/Makefile.build:273: drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.o] Error 1
make[5]: *** [scripts/Makefile.build:534: drivers/net/ethernet/hisilicon/hns3/hns3pf] Error 2
make[4]: *** [scripts/Makefile.build:534: drivers/net/ethernet/hisilicon/hns3] Error 2
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [scripts/Makefile.build:534: drivers/net/ethernet/hisilicon] Error 2
make[2]: *** [scripts/Makefile.build:534: drivers/net/ethernet] Error 2
make[1]: *** [scripts/Makefile.build:534: drivers/net] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1980: drivers] Error 2
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Liu Jian <liujian56@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Petr Machata [Fri, 26 Mar 2021 13:20:22 +0000 (14:20 +0100)]
nexthop: Rename artifacts related to legacy multipath nexthop groups
After resilient next-hop groups have been added recently, there are two
types of multipath next-hop groups: the legacy "mpath", and the new
"resilient". Calling the legacy next-hop group type "mpath" is unfortunate,
because that describes the fact that a packet could be forwarded in one of
several paths, which is also true for the resilient next-hop groups.
Therefore, to make the naming clearer, rename various artifacts to reflect
the assumptions made. Therefore as of this patch:
- The flag for multipath groups is nh_grp_entry::is_multipath. This
includes the legacy and resilient groups, as well as any future group
types that behave as multipath groups.
Functions that assume this have "mpath" in the name.
- The flag for legacy multipath groups is nh_grp_entry::hash_threshold.
Functions that assume this have "hthr" in the name.
- The flag for resilient groups is nh_grp_entry::resilient.
Functions that assume this have "res" in the name.
Besides the above, struct nh_grp_entry::mpath was renamed to ::hthr as
well.
UAPI artifacts were obviously left intact.
Suggested-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Lu Wei [Sat, 27 Mar 2021 02:27:24 +0000 (10:27 +0800)]
net: vsock: Fix a typo
Modify "occured" to "occurred" in net/vmw_vsock/af_vsock.c.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Lu Wei <luwei32@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Lu Wei [Sat, 27 Mar 2021 02:27:23 +0000 (10:27 +0800)]
net: sctp: Fix some typos
Modify "unkown" to "unknown" in net/sctp/sm_make_chunk.c and
Modify "orginal" to "original" in net/sctp/socket.c.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Lu Wei <luwei32@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Lu Wei [Sat, 27 Mar 2021 02:27:22 +0000 (10:27 +0800)]
net: rds: Fix a typo
Modify "beween" to "between" in net/rds/send.c.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Lu Wei <luwei32@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Colin Ian King [Fri, 26 Mar 2021 19:28:47 +0000 (19:28 +0000)]
drivers: net: smc91x: remove redundant initialization of pointer gpio
The pointer gpio is being initialized with a value that is
never read and it is being updated later with a new value. The
initialization is redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Mon, 29 Mar 2021 00:48:28 +0000 (17:48 -0700)]
Merge branch 'selftests-packets-per-second'
Simon Horman says:
====================
selftest: add tests for packet per second
Add self tests for the recently added packet per second rate limiting
feature of the TC policer action[1].
The forwarding selftest (patch 2/2) depends on iproute2 support
for packet per second rate limiting, which has been posted separately[2]
[1] [PATCH v3 net-next 0/3] net/sched: act_police: add support for packet-per-second policing
https://lore.kernel.org/netdev/
20210312140831.23346-1-simon.horman@netronome.com/
[2] [PATCH iproute2-next] police: add support for packet-per-second rate limiting
https://lore.kernel.org/netdev/
20210326125018.32091-1-simon.horman@netronome.com/
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Baowen Zheng [Fri, 26 Mar 2021 13:09:38 +0000 (14:09 +0100)]
selftests: forwarding: Add tc-police tests for packets per second
Test tc-police action for packets per second.
The test is mainly in scenarios Rx policing and Tx policing.
The test passes with veth pairs ports.
Signed-off-by: Baowen Zheng <baowen.zheng@corigine.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Baowen Zheng [Fri, 26 Mar 2021 13:09:37 +0000 (14:09 +0100)]
selftests: tc-testing: add action police selftest for packets per second
Add selftest cases in action police for packets per second.
These tests depend on corresponding iproute2 command support.
Signed-off-by: Baowen Zheng <baowen.zheng@corigine.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Reviewed-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Bhaskar Chowdhury [Fri, 26 Mar 2021 23:12:54 +0000 (04:42 +0530)]
xfrm_user.c: Added a punctuation
s/wouldnt/wouldn\'t/
Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Bhaskar Chowdhury [Fri, 26 Mar 2021 23:12:53 +0000 (04:42 +0530)]
xfrm_policy.c : Mundane typo fix
s/sucessful/successful/
Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Bhaskar Chowdhury [Fri, 26 Mar 2021 23:12:52 +0000 (04:42 +0530)]
sm_statefuns.c: Mundane spello fixes
s/simulataneous/simultaneous/ ....in three dirrent places.
s/tempory/temporary/
s/interpeter/interpreter/
Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Bhaskar Chowdhury [Fri, 26 Mar 2021 23:12:51 +0000 (04:42 +0530)]
reg.c: Fix a spello
s/ingoring/ignoring/
Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Bhaskar Chowdhury [Fri, 26 Mar 2021 23:12:50 +0000 (04:42 +0530)]
node.c: A typo fix
s/synching/syncing/
Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Bhaskar Chowdhury [Fri, 26 Mar 2021 23:12:49 +0000 (04:42 +0530)]
netfilter: nf_conntrack_acct.c: A typo fix
s/Accouting/Accounting/
Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Bhaskar Chowdhury [Fri, 26 Mar 2021 23:12:48 +0000 (04:42 +0530)]
netfilter: ipvs: A spello fix
s/registerd/registered/
Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
Reviewed-by: Simon Horman <horms@verge.net.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Bhaskar Chowdhury [Fri, 26 Mar 2021 23:12:47 +0000 (04:42 +0530)]
ncsi: internal.h: Fix a spello
s/Firware/Firmware/
Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Bhaskar Chowdhury [Fri, 26 Mar 2021 23:12:46 +0000 (04:42 +0530)]
mptcp: subflow.c: Fix a typo
s/concerened/concerned/
Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Bhaskar Chowdhury [Fri, 26 Mar 2021 23:12:45 +0000 (04:42 +0530)]
mac80211: cfg.c: A typo fix
s/assocaited/associated/
Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Bhaskar Chowdhury [Fri, 26 Mar 2021 23:12:44 +0000 (04:42 +0530)]
llc: llc_core.c: COuple of typo fixes
s/searchs/searches/ ....two different places.
Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Bhaskar Chowdhury [Fri, 26 Mar 2021 23:12:43 +0000 (04:42 +0530)]
kcm: kcmsock.c: Couple of typo fixes
s/synchonization/synchronization/
s/aready/already/
Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Bhaskar Chowdhury [Fri, 26 Mar 2021 23:12:42 +0000 (04:42 +0530)]
iucv: af_iucv.c: Couple of typo fixes
s/unitialized/uninitialized/
s/notifcations/notifications/
Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Bhaskar Chowdhury [Fri, 26 Mar 2021 23:12:41 +0000 (04:42 +0530)]
ipv6: route.c: A spello fix
s/notfication/notification/
Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Bhaskar Chowdhury [Fri, 26 Mar 2021 23:12:40 +0000 (04:42 +0530)]
ipv6: addrconf.c: Fix a typo
s/Identifers/Identifiers/
Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Bhaskar Chowdhury [Fri, 26 Mar 2021 23:12:39 +0000 (04:42 +0530)]
ipv4: tcp_lp.c: Couple of typo fixes
s/resrved/reserved/
s/within/within/
Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Bhaskar Chowdhury [Fri, 26 Mar 2021 23:12:38 +0000 (04:42 +0530)]
ipv4: ip_output.c: Couple of typo fixes
s/readibility/readability/
s/insufficent/insufficient/
Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Bhaskar Chowdhury [Fri, 26 Mar 2021 23:12:37 +0000 (04:42 +0530)]
bearer.h: Spellos fixed
s/initalized/initialized/ ...three different places
Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Bhaskar Chowdhury [Fri, 26 Mar 2021 23:12:36 +0000 (04:42 +0530)]
af_x25.c: Fix a spello
s/facilties/facilities/
Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Liu Jian [Fri, 26 Mar 2021 12:31:38 +0000 (20:31 +0800)]
farsync: use DEFINE_SPINLOCK() for spinlock
spinlock can be initialized automatically with DEFINE_SPINLOCK()
rather than explicitly calling spin_lock_init().
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Liu Jian <liujian56@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 26 Mar 2021 22:24:14 +0000 (15:24 -0700)]
Merge branch 'llc-kdoc'
Yang Yingliang says:
====================
net: llc: Correct some function names in header
Fix some make W=1 kernel build warnings in net/llc/
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Yang Yingliang [Fri, 26 Mar 2021 10:13:50 +0000 (18:13 +0800)]
net: llc: Correct function name llc_pdu_set_pf_bit() in header
Fix the following make W=1 kernel build warning:
net/llc/llc_pdu.c:36: warning: expecting prototype for pdu_set_pf_bit(). Prototype was for llc_pdu_set_pf_bit() instead
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yang Yingliang [Fri, 26 Mar 2021 10:13:49 +0000 (18:13 +0800)]
net: llc: Correct function name llc_sap_action_unitdata_ind() in header
Fix the following make W=1 kernel build warning:
net/llc/llc_s_ac.c:38: warning: expecting prototype for llc_sap_action_unit_data_ind(). Prototype was for llc_sap_action_unitdata_ind() instead
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yang Yingliang [Fri, 26 Mar 2021 10:13:48 +0000 (18:13 +0800)]
net: llc: Correct some function names in header
Fix the following make W=1 kernel build warning:
net/llc/llc_c_ev.c:622: warning: expecting prototype for conn_ev_qlfy_last_frame_eq_1(). Prototype was for llc_conn_ev_qlfy_last_frame_eq_1() instead
net/llc/llc_c_ev.c:636: warning: expecting prototype for conn_ev_qlfy_last_frame_eq_0(). Prototype was for llc_conn_ev_qlfy_last_frame_eq_0() instead
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Hoang Le [Fri, 26 Mar 2021 09:14:14 +0000 (16:14 +0700)]
tipc: fix kernel-doc warnings
Fix kernel-doc warning introduced in
commit
b83e214b2e04 ("tipc: add extack messages for bearer/media failure"):
net/tipc/bearer.c:248: warning: Function parameter or member 'extack' not described in 'tipc_enable_bearer'
Fixes: b83e214b2e04 ("tipc: add extack messages for bearer/media failure")
Signed-off-by: Hoang Le <hoang.h.le@dektech.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Mohammad Athari Bin Ismail [Fri, 26 Mar 2021 09:10:46 +0000 (17:10 +0800)]
net: stmmac: Fix kernel panic due to NULL pointer dereference of fpe_cfg
In this patch, "net: stmmac: support FPE link partner hand-shaking
procedure", priv->plat->fpe_cfg wouldn`t be "devm_kzalloc"ed if
dma_cap->frpsel is 0 (Flexible Rx Parser is not supported in SoC) in
tc_init(). So, fpe_cfg will be remain as NULL and accessing it will cause
kernel panic.
To fix this, move the "devm_kzalloc"ing of priv->plat->fpe_cfg before
dma_cap->frpsel checking in tc_init(). Additionally, checking of
priv->dma_cap.fpesel is added before calling stmmac_fpe_link_state_handle()
as only FPE supported SoC is allowed to call the function.
Below is the kernel panic dump reported by Marek Szyprowski
<m.szyprowski@samsung.com>:
meson8b-dwmac
ff3f0000.ethernet eth0: PHY [0.0:00] driver [RTL8211F Gigabit Ethernet] (irq=35)
meson8b-dwmac
ff3f0000.ethernet eth0: No Safety Features support found
meson8b-dwmac
ff3f0000.ethernet eth0: PTP not supported by HW
meson8b-dwmac
ff3f0000.ethernet eth0: configuring for phy/rgmii link mode
Unable to handle kernel NULL pointer dereference at virtual address
0000000000000001
Mem abort info:
...
user pgtable: 4k pages, 48-bit VAs, pgdp=
00000000044eb000
[
0000000000000001] pgd=
0000000000000000, p4d=
0000000000000000
Internal error: Oops:
96000004 [#1] PREEMPT SMP
Modules linked in: dw_hdmi_i2s_audio dw_hdmi_cec meson_gxl realtek meson_gxbb_wdt snd_soc_meson_axg_sound_card dwmac_generic axg_audio meson_dw_hdmi crct10dif_ce snd_soc_meson_card_utils snd_soc_meson_axg_tdmout panfrost rc_odroid gpu_sched reset_meson_audio_arb meson_ir snd_soc_meson_g12a_tohdmitx snd_soc_meson_axg_frddr sclk_div clk_phase snd_soc_meson_codec_glue dwmac_meson8b snd_soc_meson_axg_fifo stmmac_platform meson_rng meson_drm stmmac rtc_meson_vrtc rng_core meson_canvas pwm_meson dw_hdmi mdio_mux_meson_g12a pcs_xpcs snd_soc_meson_axg_tdm_interface snd_soc_meson_axg_tdm_formatter nvmem_meson_efuse display_connector
CPU: 1 PID: 7 Comm: kworker/u8:0 Not tainted 5.12.0-rc4-next-
20210325+
Hardware name: Hardkernel ODROID-C4 (DT)
Workqueue: events_power_efficient phylink_resolve
pstate:
20400009 (nzCv daif +PAN -UAO -TCO BTYPE=--)
pc : stmmac_mac_link_up+0x14c/0x348 [stmmac]
lr : stmmac_mac_link_up+0x284/0x348 [stmmac] ...
Call trace:
stmmac_mac_link_up+0x14c/0x348 [stmmac]
phylink_resolve+0x104/0x420
process_one_work+0x2a8/0x718
worker_thread+0x48/0x460
kthread+0x134/0x160
ret_from_fork+0x10/0x18
Code:
b971ba60 350007c0 f958c260 f9402000 (
39400401)
---[ end trace
0c9deb6c510228aa ]---
Fixes: 5a5586112b92 ("net: stmmac: support FPE link partner hand-shaking
procedure")
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mohammad Athari Bin Ismail <mohammad.athari.ismail@intel.com>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Xu Jia [Fri, 26 Mar 2021 02:40:46 +0000 (10:40 +0800)]
net: ethernet: remove duplicated include
Remove duplicated include from mtk_ppe_offload.c.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Xu Jia <xujia39@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 26 Mar 2021 22:17:17 +0000 (15:17 -0700)]
Merge branch 'axienet-clock-additions'
Robert Hancock says:
====================
axienet clock additions
Add support to the axienet driver for controlling all of the clocks that
the logic core may utilize.
Changed since v3:
-Added Acked-by to patch 1
-Now applies to net-next tree after earlier patches merged in - code
unchanged from v3
Changed since v2:
-Additional clock description clarification
Changed since v1:
-Clarified clock usages in documentation and code comments
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Robert Hancock [Fri, 26 Mar 2021 00:04:38 +0000 (18:04 -0600)]
net: axienet: Enable more clocks
This driver was only enabling the first clock on the device, regardless
of its name. However, this controller logic can have multiple clocks
which should all be enabled. Add support for enabling additional clocks.
The clock names used are matching those used in the Xilinx version of this
driver as well as the Xilinx device tree generator, except for mgt_clk
which is not present there.
For backward compatibility, if no named clocks are present, the first
clock present is used for determining the MDIO bus clock divider.
Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Robert Hancock [Fri, 26 Mar 2021 00:04:37 +0000 (18:04 -0600)]
dt-bindings: net: xilinx_axienet: Document additional clocks
Update DT bindings to describe all of the clocks that the axienet
driver will now be able to make use of.
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 26 Mar 2021 22:14:57 +0000 (15:14 -0700)]
Merge branch 'mld-sleepable'
Taehee Yoo says:
====================
mld: change context from atomic to sleepable
This patchset changes the context of MLD module.
Before this patchset, MLD functions are atomic context so it couldn't use
sleepable functions and flags.
There are several reasons why MLD functions are under atomic context.
1. It uses timer API.
Timer expiration functions are executed in the atomic context.
2. atomic locks
MLD functions use rwlock and spinlock to protect their own resources.
So, in order to switch context, this patchset converts resources to use
RCU and removes atomic locks and timer API.
1. The first patch convert from the timer API to delayed work.
Timer API is used for delaying some works.
MLD protocol has a delay mechanism, which is used for replying to a query.
If a listener receives a query from a router, it should send a response
after some delay. But because of timer expire function is executed in
the atomic context, this patch convert from timer API to the delayed work.
2. The fourth patch deletes inet6_dev->mc_lock.
The mc_lock has protected inet6_dev->mc_tomb pointer.
But this pointer is already protected by RTNL and it isn't be used by
datapath. So, it isn't be needed and because of this, many atomic context
critical sections are deleted.
3. The fifth patch convert ip6_sf_socklist to RCU.
ip6_sf_socklist has been protected by ipv6_mc_socklist->sflock(rwlock).
But this is already protected by RTNL So if it is converted to use RCU
in order to be used in the datapath, the sflock is no more needed.
So, its control path context can be switched to sleepable.
4. The sixth patch convert ip6_sf_list to RCU.
The reason for this patch is the same as the previous patch.
5. The seventh patch convert ifmcaddr6 to RCU.
The reason for this patch is the same as the previous patch.
6. Add new workqueues for processing query/report event.
By this patch, query and report events are processed by workqueue
So context is sleepable, not atomic.
While this logic, it acquires RTNL.
7. Add new mc_lock.
The purpose of this lock is to protect per-interface mld data.
Per-interface mld data is usually used by query/report event handler.
So, query/report event workers need only this lock instead of RTNL.
Therefore, it could reduce bottleneck.
Changelog:
v2 -> v3:
1. Do not use msecs_to_jiffies().
(by Cong Wang)
2. Do not add unnecessary rtnl_lock() and rtnl_unlock().
(by Cong Wang)
3. Fix sparse warnings because of rcu annotation.
(by kernel test robot)
- Remove some rcu_assign_pointer(), which was used for non-rcu pointer.
- Add union for rcu pointer.
- Use rcu API in mld_clear_zeros().
- Remove remained rcu_read_unlock().
- Use rcu API for tomb resources.
4. withdraw prevopus 2nd and 3rd patch.
- "separate two flags from ifmcaddr6->mca_flags"
- "add a new delayed_work, mc_delrec_work"
5. Add 6th and 7th patch.
v1 -> v2:
1. Withdraw unnecessary refactoring patches.
(by Cong Wang, Eric Dumazet, David Ahern)
a) convert from array to list.
b) function rename.
2. Separate big one patch into small several patches.
3. Do not rename 'ifmcaddr6->mca_lock'.
In the v1 patch, this variable was changed to 'ifmcaddr6->mca_work_lock'.
But this is actually not needed.
4. Do not use atomic_t for 'ifmcaddr6->mca_sfcount' and
'ipv6_mc_socklist'->sf_count'.
5. Do not add mld_check_leave_group() function.
6. Do not add ip6_mc_del_src_bulk() function.
7. Do not add ip6_mc_add_src_bulk() function.
8. Do not use rcu_read_lock() in the qeth_l3_add_mcast_rtnl().
(by Julian Wiedmann)
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Taehee Yoo [Thu, 25 Mar 2021 16:16:57 +0000 (16:16 +0000)]
mld: add mc_lock for protecting per-interface mld data
The purpose of this lock is to avoid a bottleneck in the query/report
event handler logic.
By previous patches, almost all mld data is protected by RTNL.
So, the query and report event handler, which is data path logic
acquires RTNL too. Therefore if a lot of query and report events
are received, it uses RTNL for a long time.
So it makes the control-plane bottleneck because of using RTNL.
In order to avoid this bottleneck, mc_lock is added.
mc_lock protect only per-interface mld data and per-interface mld
data is used in the query/report event handler logic.
So, no longer rtnl_lock is needed in the query/report event handler logic.
Therefore bottleneck will be disappeared by mc_lock.
Suggested-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>