[PATCH net-next] nfp: abm: fix error return code in nfp_abm_vnic_alloc()

2020-05-08 Thread Wei Yongjun
Fix to return negative error code -ENOMEM from the kzalloc() error handling case instead of 0, as done elsewhere in this function. Fixes: 174ab544e3bc ("nfp: abm: add cls_u32 offload for simple band classification") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun --- drivers/ne

[PATCH net-next v2] net: ethernet: ti: fix some return value check of cpsw_ale_create()

2020-05-08 Thread Wei Yongjun
() error handling case instead of 0 in am65_cpsw_nuss_probe(). Fixes: 93a76530316a ("net: ethernet: ti: introduce am65x/j721e gigabit eth subsystem driver") Fixes: 4b41d3436796 ("net: ethernet: ti: cpsw: allow untagged traffic on host port") Reported-by: Hulk Robot Signed-off-by:

[PATCH net-next] net: dsa: vsc73xx: convert to devm_platform_ioremap_resource

2020-05-08 Thread Wei Yongjun
Use the helper function that wraps the calls to platform_get_resource() and devm_ioremap_resource() together. Signed-off-by: Wei Yongjun --- drivers/net/dsa/vitesse-vsc73xx-platform.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/net/dsa/vitesse-vsc73xx

[PATCH 0/2 v3] net: ethernet: ti: fix some return value check

2020-05-19 Thread Wei Yongjun
This patchset convert cpsw_ale_create() to return PTR_ERR() only, and changed all the caller to check IS_ERR() instead of NULL. Since v2: 1) rebased on net.git, as Jakub's suggest 2) split am65-cpsw-nuss.c changes, as Grygorii's suggest Wei Yongjun (2): net: ethernet: ti: fix s

[PATCH 2/2 v3] net: ethernet: ti: am65-cpsw-nuss: fix error handling of am65_cpsw_nuss_probe

2020-05-19 Thread Wei Yongjun
ot Signed-off-by: Wei Yongjun --- drivers/net/ethernet/ti/am65-cpsw-nuss.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c index 2517ffba8178..88f52a2f85b3 100644 --- a/drivers/net/ethern

[PATCH 1/2 v3] net: ethernet: ti: fix some return value check of cpsw_ale_create()

2020-05-19 Thread Wei Yongjun
agged traffic on host port") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun --- drivers/net/ethernet/ti/cpsw_ale.c| 2 +- drivers/net/ethernet/ti/cpsw_priv.c | 4 ++-- drivers/net/ethernet/ti/netcp_ethss.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/d

[PATCH -next] bpf: fix error return code in map_lookup_and_delete_elem()

2020-04-30 Thread Wei Yongjun
Fix to return negative error code -EFAULT from the copy_to_user() error handling case instead of 0, as done elsewhere in this function. Fixes: bd513cd08f10 ("bpf: add MAP_LOOKUP_AND_DELETE_ELEM syscall") Signed-off-by: Wei Yongjun --- kernel/bpf/syscall.c | 4 +++- 1 file changed, 3

[PATCH net-next] qed: Make symbol 'qed_hw_err_type_descr' static

2020-07-01 Thread Wei Yongjun
From: Hulk Robot Fix sparse build warning: drivers/net/ethernet/qlogic/qed/qed_main.c:2480:6: warning: symbol 'qed_hw_err_type_descr' was not declared. Should it be static? Signed-off-by: Hulk Robot --- drivers/net/ethernet/qlogic/qed/qed_main.c | 2 +- 1 file changed, 1 insertion(+), 1 dele

[PATCH net-next] ksz884x: mark pcidev_suspend() as __maybe_unused

2020-07-02 Thread Wei Yongjun
ice *dev_d) |^~ Mark pcidev_suspend() as __maybe_unused to make it clear. Fixes: 64120615d140 ("ksz884x: use generic power management") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun --- drivers/net/ethernet/micrel/ksz884x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH net-next] mlx4: Mark PM functions as __maybe_unused

2020-07-02 Thread Wei Yongjun
hat this is going to happen based on the configuration, which is the standard for these types of functions. Fixes: 0e3e206a3e12 ("mlx4: use generic power management") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun --- drivers/net/ethernet/mellanox/mlx4/main.c | 4 ++-- 1 file changed

Re: [PATCH net-next] mlx4: Mark PM functions as __maybe_unused

2020-07-02 Thread Wei Yongjun
On 2020/7/2 17:36, Leon Romanovsky wrote: > On Thu, Jul 02, 2020 at 05:19:46PM +0800, Wei Yongjun wrote: >> In certain configurations without power management support, the >> following warnings happen: >> >> drivers/net/ethernet/mellanox/mlx4/main.c:4388:12: >>

[PATCH -next] perf/core: Make some symbols static

2020-07-06 Thread Wei Yongjun
erf_pmu_snapshot_aux' and 'dev_attr_nr_addr_filters' are not used outside of this file, so mark them static. Reported-by: Hulk Robot Signed-off-by: Wei Yongjun --- kernel/events/core.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/kernel/events/core.c b

[PATCH net-next] sun/cassini: mark cas_resume() as __maybe_unused

2020-07-07 Thread Wei Yongjun
Mark cas_resume() as __maybe_unused to make it clear. Fixes: f193f4ebde3d ("sun/cassini: use generic power management") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun --- drivers/net/ethernet/sun/cassini.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/driv

[PATCH net-next] net/mlx5: DR, Remove useless set memory to zero use memset()

2019-09-05 Thread Wei Yongjun
The memory return by kzalloc() has already be set to zero, so remove useless memset(0). Signed-off-by: Wei Yongjun --- drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c b

[PATCH net-next] net/mlx5: DR, Fix error return code in dr_domain_init_resources()

2019-09-05 Thread Wei Yongjun
Fix to return negative error code -ENOMEM from the error handling case instead of 0, as done elsewhere in this function. Fixes: 4ec9e7b02697 ("net/mlx5: DR, Expose steering domain functionality") Signed-off-by: Wei Yongjun --- drivers/net/ethernet/mellanox/mlx5/core/steering/dr_do

[PATCH] mptcp: fix memory leak in mptcp_subflow_create_socket()

2020-06-12 Thread Wei Yongjun
LL_64_after_hwframe+0x49/0xb3 Fixes: 2303f994b3e1 ("mptcp: Associate MPTCP context with TCP socket") Signed-off-by: Wei Yongjun diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c index bf132575040d..bbdb74b8bc3c 100644 --- a/net/mptcp/subflow.c +++ b/net/mptcp/subflow.c @@ -1053,8 +

[PATCH net v2] mptcp: fix memory leak in mptcp_subflow_create_socket()

2020-06-14 Thread Wei Yongjun
LL_64_after_hwframe+0x49/0xb3 Fixes: 2303f994b3e1 ("mptcp: Associate MPTCP context with TCP socket") Signed-off-by: Wei Yongjun --- v1 -> v2: add net prefix to subject line --- net/mptcp/subflow.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/mptcp/subflo

[PATCH] iavf: fix error return code in iavf_init_get_resources()

2020-06-18 Thread Wei Yongjun
Fix to return negative error code -ENOMEM from the error handling case instead of 0, as done elsewhere in this function. Fixes: b66c7bc1cd4d ("iavf: Refactor init state machine") Signed-off-by: Wei Yongjun --- drivers/net/ethernet/intel/iavf/iavf_main.c | 4 +++- 1 file changed, 3

[PATCH net-next] net: igmp: make function __ip_mc_inc_group() static

2018-07-24 Thread Wei Yongjun
Fixes the following sparse warnings: net/ipv4/igmp.c:1391:6: warning: symbol '__ip_mc_inc_group' was not declared. Should it be static? Signed-off-by: Wei Yongjun --- net/ipv4/igmp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/ipv4/igmp.c b/net/ipv4/ig

[PATCH net-next] tcp: make function tcp_retransmit_stamp() static

2018-07-24 Thread Wei Yongjun
Fixes the following sparse warnings: net/ipv4/tcp_timer.c:25:5: warning: symbol 'tcp_retransmit_stamp' was not declared. Should it be static? Signed-off-by: Wei Yongjun --- net/ipv4/tcp_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv4/tcp_timer.c

[PATCH net-next] lan743x: Make symbol lan743x_pm_ops static

2018-07-24 Thread Wei Yongjun
Fixes the following sparse warning: drivers/net/ethernet/microchip/lan743x_main.c:2944:25: warning: symbol 'lan743x_pm_ops' was not declared. Should it be static? Signed-off-by: Wei Yongjun --- drivers/net/ethernet/microchip/lan743x_main.c | 2 +- 1 file changed, 1 insertion(+),

[PATCH net-next] xfrm: Make function xfrmi_get_link_net() static

2018-07-27 Thread Wei Yongjun
Fixes the following sparse warning: net/xfrm/xfrm_interface.c:745:12: warning: symbol 'xfrmi_get_link_net' was not declared. Should it be static? Fixes: f203b76d7809 ("xfrm: Add virtual xfrm interfaces") Signed-off-by: Wei Yongjun --- net/xfrm/xfrm_interface.c | 2 +

[PATCH net-next] tcp: remove set but not used variable 'skb_size'

2018-07-31 Thread Wei Yongjun
Fixes gcc '-Wunused-but-set-variable' warning: net/ipv4/tcp_output.c: In function 'tcp_collapse_retrans': net/ipv4/tcp_output.c:2700:6: warning: variable 'skb_size' set but not used [-Wunused-but-set-variable] int skb_size, next_skb_size; ^ Signed-off-

[PATCH net-next] rxrpc: Remove set but not used variable 'nowj'

2018-08-01 Thread Wei Yongjun
Fixes gcc '-Wunused-but-set-variable' warning: net/rxrpc/proc.c: In function 'rxrpc_call_seq_show': net/rxrpc/proc.c:66:29: warning: variable 'nowj' set but not used [-Wunused-but-set-variable] unsigned long timeout = 0, nowj;

[PATCH net-next] ieee802154: hwsim: fix copy-paste error in hwsim_set_edge_lqi()

2018-08-07 Thread Wei Yongjun
The return value from kzalloc() is not checked correctly. The test is done against a wrong variable. This patch fix it. Fixes: f25da51fdc38 ("ieee802154: hwsim: add replacement for fakelb") Signed-off-by: Wei Yongjun --- drivers/net/ieee802154/mac802154_hwsim.c | 2 +- 1 file

[PATCH net-next] ieee802154: hwsim: fix missing unlock on error in hwsim_add_one()

2018-08-07 Thread Wei Yongjun
Add the missing unlock before return from function hwsim_add_one() in the error handling case. Fixes: f25da51fdc38 ("ieee802154: hwsim: add replacement for fakelb") Signed-off-by: Wei Yongjun --- drivers/net/ieee802154/mac802154_hwsim.c | 4 +++- 1 file changed, 3 insertions(+),

[PATCH net-next] mlxsw: spectrum: Fix error return code in mlxsw_sp_port_create()

2017-11-06 Thread Wei Yongjun
Fix to return a negative error code from the VID create error handling case instead of 0, as done elsewhere in this function. Fixes: c57529e1d5d8 ("mlxsw: spectrum: Replace vPorts with Port-VLAN") Signed-off-by: Wei Yongjun --- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 1

[PATCH net-next] dpaa_eth: fix error return code in dpaa_eth_probe()

2017-11-06 Thread Wei Yongjun
Fix to return a negative error code from the dpaa_bp_alloc() error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun --- drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net

[PATCH net-next] openvswitch: Fix return value check in ovs_meter_cmd_features()

2017-11-13 Thread Wei Yongjun
In case of error, the function ovs_meter_cmd_reply_start() returns ERR_PTR() not NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: 96fbc13d7e77 ("openvswitch: Add meter infrastructure") Signed-off-by: Wei Yongjun --- net/openvswitch/meter.c | 2

[PATCH net-next] openvswitch: Make local function ovs_nsh_key_attr_size() static

2017-11-13 Thread Wei Yongjun
Fixes the following sparse warnings: net/openvswitch/flow_netlink.c:340:8: warning: symbol 'ovs_nsh_key_attr_size' was not declared. Should it be static? Signed-off-by: Wei Yongjun --- net/openvswitch/flow_netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -

[PATCH net-next] openvswitch: Using kfree_rcu() to simplify the code

2017-11-13 Thread Wei Yongjun
The callback function of call_rcu() just calls a kfree(), so we can use kfree_rcu() instead of call_rcu() + callback function. Signed-off-by: Wei Yongjun --- net/openvswitch/meter.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/net/openvswitch/meter.c b/net

[PATCH net-next] net: aquantia: make symbol hw_atl_boards static

2018-01-22 Thread Wei Yongjun
Fixes the following sparse warning: drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c:50:34: warning: symbol 'hw_atl_boards' was not declared. Should it be static? Fixes: 4948293ff963 ("net: aquantia: Introduce new AQC devices and capabilities") Signed-off-by: Wei Yongj

[PATCH net-next] nfp: fix error return code in nfp_pci_probe()

2018-01-22 Thread Wei Yongjun
Fix to return error code -EINVAL instead of 0 when num_vfs above limit_vfs, as done elsewhere in this function. Signed-off-by: Wei Yongjun --- drivers/net/ethernet/netronome/nfp/nfp_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/netronome/nfp/nfp_main.c b

[PATCH net-next] net: aquantia: Fix error return code in aq_pci_probe()

2018-01-22 Thread Wei Yongjun
Fix to return error code -ENOMEM from the aq_ndev_alloc() error handling case instead of 0, as done elsewhere in this function. Fixes: 23ee07ad3c2f ("net: aquantia: Cleanup pci functions module") Signed-off-by: Wei Yongjun --- drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c |

[PATCH net-next] cxgb4: make symbol pedits static

2018-01-23 Thread Wei Yongjun
Fixes the following sparse warning: drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c:46:27: warning: symbol 'pedits' was not declared. Should it be static? Fixes: 27ece1f357b7 ("cxgb4: add tc flower support for ETH-DMAC rewrite") Signed-off-by: Wei Yongjun --- drivers/

[PATCH] xen/9pfs: fix return value check in xen_9pfs_front_probe()

2017-05-16 Thread Wei Yongjun
From: Wei Yongjun In case of error, the function xenbus_read() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: 71ebd71921e4 ("xen/9pfs: connect to the backend") Signed-off-by: Wei Yongjun --- net/9p/trans

[PATCH net-next] xen/9pfs: p9_trans_xen_init and p9_trans_xen_exit can be static

2017-05-18 Thread Wei Yongjun
From: Wei Yongjun Fixes the following sparse warnings: net/9p/trans_xen.c:528:5: warning: symbol 'p9_trans_xen_init' was not declared. Should it be static? net/9p/trans_xen.c:540:6: warning: symbol 'p9_trans_xen_exit' was not declared. Should it be static? Signed

[PATCH net-next] ibmvnic: fix missing unlock on error in __ibmvnic_reset()

2017-05-18 Thread Wei Yongjun
From: Wei Yongjun Add the missing unlock before return from function __ibmvnic_reset() in the error handling case. Fixes: ed651a10875f ("ibmvnic: Updated reset handling") Signed-off-by: Wei Yongjun --- drivers/net/ethernet/ibm/ibmvnic.c | 1 + 1 file changed, 1 insertion(+) di

[PATCH net-next] qed: Remove unused including

2017-05-18 Thread Wei Yongjun
From: Wei Yongjun Remove including that is not needed. Signed-off-by: Wei Yongjun --- drivers/net/ethernet/qlogic/qed/qed_fcoe.c | 1 - drivers/net/ethernet/qlogic/qed/qed_iscsi.c | 1 - drivers/net/ethernet/qlogic/qed/qed_l2.c| 1 - drivers/net/ethernet/qlogic/qed/qed_ll2.c | 1

[PATCH net-next] net/mlx5e: Fix possible memory leak

2017-05-18 Thread Wei Yongjun
From: Wei Yongjun 'encap_header' is malloced and should be freed before leaving from the error handling cases, otherwise it will cause memory leak. Fixes: 232c001398ae ("net/mlx5e: Add support to neighbour update flow") Signed-off-by: Wei Yongjun --- drivers/net/etherne

[PATCH net-next] xfrm: Make function xfrm_dev_register static

2017-05-18 Thread Wei Yongjun
From: Wei Yongjun Fixes the following sparse warning: net/xfrm/xfrm_device.c:141:5: warning: symbol 'xfrm_dev_register' was not declared. Should it be static? Signed-off-by: Wei Yongjun --- net/xfrm/xfrm_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH net-next] net: aquantia: Make local functions static

2017-10-27 Thread Wei Yongjun
27; was not declared. Should it be static? Signed-off-by: Wei Yongjun --- drivers/net/ethernet/aquantia/atlantic/aq_ethtool.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_ethtool.c b/drivers/net/ethernet/aquantia/atlanti

[PATCH net-next] net: bcmgenet: Avoid calling platform_device_put() twice in bcmgenet_mii_exit()

2017-10-27 Thread Wei Yongjun
Remove platform_device_put() call after platform_device_unregister() from function bcmgenet_mii_exit(), otherwise, we will call platform_device_put() twice. Fixes: 9a4e79697009 ("net: bcmgenet: utilize generic Broadcom UniMAC MDIO controller driver") Signed-off-by: Wei Yongjun --- d

[PATCH net-next] sctp: fix error return code in sctp_send_add_streams()

2017-10-31 Thread Wei Yongjun
Fix to returnerror code -ENOMEM from the sctp_make_strreset_addstrm() error handling case instead of 0. 'retval' can be overwritten to 0 after call sctp_stream_alloc_out(). Fixes: e090abd0d81c ("sctp: factor out stream->out allocation") Signed-off-by: Wei Yongjun ---

[PATCH net-next] phylink: make local function phylink_phy_change() static

2017-11-02 Thread Wei Yongjun
Fixes the following sparse warnings: drivers/net/phy/phylink.c:570:6: warning: symbol 'phylink_phy_change' was not declared. Should it be static? Signed-off-by: Wei Yongjun --- drivers/net/phy/phylink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drive

[PATCH net-next] cxgb4: fix error return code in cxgb4_set_hash_filter()

2017-11-02 Thread Wei Yongjun
Fix to return a negative error code from thecxgb4_alloc_atid() error handling case instead of 0. Fixes: 12b276fbf6e0 ("cxgb4: add support to create hash filters") Signed-off-by: Wei Yongjun --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c | 4 +++- 1 file changed, 3 insert

[PATCH net-next] net/ncsi: Make local function ncsi_get_filter() static

2017-11-02 Thread Wei Yongjun
Fixes the following sparse warnings: net/ncsi/ncsi-manage.c:41:5: warning: symbol 'ncsi_get_filter' was not declared. Should it be static? Signed-off-by: Wei Yongjun --- net/ncsi/ncsi-manage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ncsi/ncsi-mana

[PATCH] Fix bug of update IPv4 PMTU when received ICMP Fragmentation Needed message

2007-05-31 Thread Wei Yongjun
says ICMP error message return as much as we can without exceeding 576 bytes. This patch has Fixed this BUG. Signed-off-by: Wei Yongjun <[EMAIL PROTECTED]> --- net/ipv4/route.c.orig 2007-05-25 05:22:47.0 +0800 +++ net/ipv4/route.c2007-06-01 11:42:55.0 +0800 @@ -

Re: [PATCH] Fix bug of update IPv4 PMTU when received ICMP Fragmentation Needed message

2007-06-03 Thread Wei Yongjun
the received message's size: unsigned short old_mtu = ntohs(iph->tot_len); So maybe the patch would like following. Signed-off-by: Wei Yongjun <[EMAIL PROTECTED]> --- net/ipv4/route.c.orig 2007-05-25 05:22:47.0 +0800 +++ net/ipv4/route.c2007-06-04 08:31:36.0

Re: [PATCH] Fix bug of update IPv4 PMTU when received ICMP Fragmentation Needed message

2007-06-03 Thread Wei Yongjun
On Mon, Jun 04, 2007 at 08:39:21AM +0800, Wei Yongjun wrote: Huh? The test new_mtu >= old_mtu should only hold if the sending router is buggy which is what the hack is for. Note here old_mtu is not the real old mtu, is the received message's size: unsigned short old_mtu = n

Re: [PATCH] Fix bug of update IPv4 PMTU when received ICMP Fragmentation Needed message

2007-06-03 Thread Wei Yongjun
On Mon, Jun 04, 2007 at 12:03:57PM +0800, Wei Yongjun wrote: So I want to know how the route announce a MTU larger then 576, such as 1280? RFC says ICMP error message return as much as we can without exceeding 576 bytes. I think there is a misunderstanding here. The RFC is talking

Re: [PATCH] Fix bug of update IPv4 PMTU when received ICMP Fragmentation Needed message

2007-06-03 Thread Wei Yongjun
iph->tot_len which is the length of field in the *original* IP header. We're certainly not allowed touch that field. Cheers, -- A new email address of FJWAN is launched from Apr.1 2007. The updated address is: [EMAIL PROTECTED] ------

[PATCH] Bug in pskb_trim_rcsum()

2006-07-16 Thread Wei Yongjun
of vendors do this. *Apparently with secret goal to sell you new device, when you *will add new protocol to your host. F.e. IPv6. 8) Signed-off-by: Wei Yongjun <[EMAIL PROTECTED]> --- a/include/linux/skbuff.h2006-07-17 10:14:23.175070472 -0400 +++ b/include/linux/skbu

Re: [PATCH] Bug in pskb_trim_rcsum()

2006-07-17 Thread Wei Yongjun
On Monday 17 July 2006 08:17, Herbert Xu wrote: > Wei Yongjun <[EMAIL PROTECTED]> wrote: > > So if I want to trim a skb, I think I must do a checksum even if the > > skb->ip_summed is CHECKSUM_UNNECESSARY. > > Nope. CHECKSUM_UNNECESSARY means that the hardware has a

Re: [PATCH] SNMPv2 tcpAttemptFails counter error

2006-07-28 Thread Wei Yongjun
I have changed my patch with your advice and it looks more effective. On Monday 24 July 2006 17:22, David Miller wrote: > From: Wei Yongjun <[EMAIL PROTECTED]> > Date: Wed, 05 Jul 2006 05:19:54 -0400 > > > In my test, those direct state transition can not be counted t

[PATCH] SNMPv2 udpInDatagrams counter error

2006-07-31 Thread Wei Yongjun
ummed != CHECKSUM_UNNECESSARY) { + if (skb->ip_summed != CHECKSUM_UNNECESSARY) { if (__udp_checksum_complete(skb)) { UDP_INC_STATS_BH(UDP_MIB_INERRORS); kfree_skb(skb); Signed-off-by: Wei Yongjun <[EMAIL PROTECTED]> - To uns

Re: [PATCH] SNMPv2 udpInDatagrams counter error

2006-07-31 Thread Wei Yongjun
cho reply. - Original Message - From: "Gerrit Renker" <[EMAIL PROTECTED]> To: Sent: Monday, July 31, 2006 4:19 PM Subject: Re: [PATCH] SNMPv2 udpInDatagrams counter error > This has been raised earlier, cf. http://bugzilla.kernel.org/show_bug.cgi?id=6660 > > Wei

[PATCH] Fix UDP filter condition when do checksum

2006-07-31 Thread Wei Yongjun
ip_summed != CHECKSUM_UNNECESSARY) { if (__udp_checksum_complete(skb)) { UDP_INC_STATS_BH(UDP_MIB_INERRORS); kfree_skb(skb); Signed-off-by: Wei Yongjun <[EMAIL PROTECTED]> `ß'  ' c link > - To un

Re: [PATCH] SNMPv2 udpInDatagrams counter error

2006-07-31 Thread Wei Yongjun
This change does not effect to tcpdump, only let UDP filter can not received UDP datagrams with checksum error. It is not a good idea, but I think is the best way to resolve this problem. If you want to capture error UDP packet, you can used tcpdump. On Monday 31 July 2006 04:57, Gerrit Renker wr

Re: [PATCH] SNMPv2 tcpOutSegs counter error

2006-08-03 Thread Wei Yongjun
I modified my patch by add a flag to sacked when retransmit, and it work well. On Monday 24 July 2006 17:44, David Miller wrote: > From: Wei Yongjun <[EMAIL PROTECTED]> > Date: Thu, 06 Jul 2006 04:01:18 -0400 > > This test is not accurate enough. For example, timer based >

Re: [PATCH] SNMPv2 tcpOutSegs counter error

2006-08-04 Thread Wei Yongjun
= tp->write_seq; TCP_INC_STATS(TCP_MIB_ACTIVEOPENS); Do you agree with me? If It is correctly, I will send this patch soon. On Thursday 03 August 2006 19:35, David Miller wrote: > From: Wei Yongjun <[EMAIL PROTECTED]> > Date: Thu, 03 Aug 2006 11:46:58 -0400 > > > I mo

Re: [PATCH] SNMPv2 tcpOutSegs counter error

2006-08-06 Thread Wei Yongjun
Patch has been fixed. On Friday 04 August 2006 07:23, David Miller wrote: > From: Wei Yongjun <[EMAIL PROTECTED]> > Date: Fri, 04 Aug 2006 08:46:13 -0400 > > > This always correct except when do active open in tcp client, which will > > send a SYN, that segment will no

Re: [PATCH] SNMPv2 tcpOutSegs counter error

2006-08-07 Thread Wei Yongjun
ly scenario, but possible I > > > think), should it count towards OUTSEGS? > > > > Probably the packet should be counted to OUTSEGS if any of it contains > > new data. > > OK, in that case Yongjun please update your patch to test against > tcb->end_seq instead of tcb->

[PATCH] IPv6: Fix the return value of ipv6_getsockopt

2007-12-12 Thread Wei Yongjun
argument of ipv6_getsockopt is not supported by the kernel. Signed-off-by: Wei Yongjun <[EMAIL PROTECTED]> --- a/net/ipv6/ipv6_sockglue.c 2007-12-11 04:33:00.0 -0500 +++ b/net/ipv6/ipv6_sockglue.c 2007-12-11 06:40:18.0 -0500 @@ -1046,7 +1046,7 @@ static int do_ipv6_gets

Re: [Lksctp-developers] SCTP: Fix dead loop while received unexpected chunk with length set to zero

2007-08-29 Thread Wei Yongjun
Vlad Yasevich wrote: Wei Yongjun wrote: A ootb chunk such as data in close state or init-ack in estab state will cause SCTP to enter dead loop. Look like this: (1) Endpoint A Endpoint B (Closed)(Closed) DATA

Re: [Lksctp-developers] SCTP: Fix dead loop while received unexpected chunk with length set to zero

2007-08-29 Thread Wei Yongjun
Vlad Yasevich wrote: Wei Yongjun wrote: Vlad Yasevich wrote: NACK Section 8.4: An SCTP packet is called an "out of the blue" (OOTB) packet if it is correctly formed (i.e., passed the receiver's CRC32c check; see Section 6.8), but the receiver is not able

Re: [Lksctp-developers] SCTP: Fix dead loop while received unexpected chunk with length set to zero

2007-08-30 Thread Wei Yongjun
Vlad Yasevich wrote: Wei Yongjun wrote: Vlad Yasevich wrote: Wei Yongjun wrote: Vlad Yasevich wrote: NACK Section 8.4: An SCTP packet is called an "out of the blue" (OOTB) packet if it is correctly formed (i.e., passed the receiver's CR

Re: [Lksctp-developers] SCTP: Fix dead loop while received unexpected chunk with length set to zero

2007-08-31 Thread Wei Yongjun
Vlad Yasevich wrote: Wei Yongjun wrote: Vlad Yasevich wrote: Wei Yongjun wrote: Vlad Yasevich wrote: NACK Section 8.4: An SCTP packet is called an "out of the blue" (OOTB) packet if it is correctly formed (i.e., passed the receiver's CR

[PATCH] SCTP: drop SACK if ctsn is not less than the next tsn of assoc

2007-07-30 Thread Wei Yongjun
] [SSEQ 6] [PPID 0x87d8b423] 02:19:58.931690 sctp (1) [SACK] [cum ack 217114046] [a_rwnd 54784] [#gap acks 0] [#dup tsns 0] Signed-off-by: Wei Yongjun <[EMAIL PROTECTED]> --- net/sctp/sm_statefuns.c.orig2007-07-29 18:11:01.0 -0400 +++ net/sctp/sm_statefuns.c 2007-07-29

Re: [PATCH] SCTP: drop SACK if ctsn is not less than the next tsn of assoc

2007-07-31 Thread Wei Yongjun
> On Tue, 2007-07-31 at 07:37 -0400, Neil Horman wrote: > >> On Tue, Jul 31, 2007 at 12:44:27PM +0800, Wei Yongjun wrote: >> >>> If SCTP data sender received a SACK which contains Cumulative TSN Ack is >>> not less than the Cumulative TSN Ack Point, an

Re: [PATCH] SCTP: drop SACK if ctsn is not less than the next tsn of assoc

2007-08-01 Thread Wei Yongjun
Sorry, coming in late due to list issues... Wei Yongjun wrote: On Tue, 2007-07-31 at 07:37 -0400, Neil Horman wrote: On Tue, Jul 31, 2007 at 12:44:27PM +0800, Wei Yongjun wrote: If SCTP data sender received a SACK which contains Cumulative TSN Ack is not less than

Re: [PATCH] SCTP: drop SACK if ctsn is not less than the next tsn of assoc

2007-08-02 Thread Wei Yongjun
g the association in this case since either the peer is a mis-behaved implementation, or the association is under attack. Patch has been modified base on comment. Thanks. Signed-off-by: Wei Yongjun <[EMAIL PROTECTED]> --- net/sctp/sm_statefuns.c.orig2007-07-29 18:11:01.0 -0

[PATCH] IPv6: Fix kernel panic while send SCTP data with IP fragments

2007-08-19 Thread Wei Yongjun
c1 83 e1 03 74 02 f3 a4 29 45 08 0f 84 7b 01 00 00 01 EIP: [] skb_copy_bits+0x4f/0x1ef SS:ESP 0068:c0759adc Kernel panic - not syncing: Fatal exception in interrupt Following is the patch. Signed-off-by: Wei Yongjun <[EMAIL PROTECTED]> --- a/net/ipv6/ip6_output.c 2007-08-14 10:36:03.

Re: [PATCH] IPv6: Fix kernel panic while send SCTP data with IP fragments

2007-08-19 Thread Wei Yongjun
Hi Arnaldo Carvalho de Melo: Em Mon, Aug 20, 2007 at 09:28:27AM +0800, Wei Yongjun escreveu: If ICMP6 message with "Packet Too Big" is received after send SCTP DATA, kernel panic will occur when SCTP DATA is send again. This is because of a bad dest address when call to skb

SCTP: Fix dead loop while received unexpected chunk with length set to zero

2007-08-26 Thread Wei Yongjun
th is set to zero, chunk->chunk_end will be never changed and process enter dead loop. Following is the patch. Signed-off-by: Wei Yongjun <[EMAIL PROTECTED]> --- a/net/sctp/inqueue.c2007-08-25 10:53:45.0 -0400 +++ b/net/sctp/inqueue.c2007-08-26 05:45:57.0

[PATCH] NET: Fix function put_cmsg() which may cause usr application memory overflow

2007-12-17 Thread Wei Yongjun
~ err = 0; out: return err; } The same promble exists in put_cmsg_compat(). This patch can fix this problem. Signed-off-by: Wei Yongjun <[EMAIL PROTECTED]> --- a/net/core/scm.c2007-12-11 08:41:57.0 -0500 +++ b/net/core/scm.c2007-12-11 12:10:25.0 -0500 @@ -1

[PATCH] SCTP: Fix kernel panic while received AUTH chunk while enabled auth

2008-01-21 Thread Wei Yongjun
4 Kernel panic - not syncing: Fatal exception in interrupt This patch fix this probleam to treat AUTH chunk as unknow chunk if peer has initialized with no auth capable. Signed-off-by: Wei Yongjun <[EMAIL PROTECTED]> --- a/net/sctp/sm_statefuns.c 2008-01-21 00:03:

[PATCH] SCTP: Fix kernel panic while received AUTH chunk with BAD shared key identifier

2008-01-22 Thread Wei Yongjun
04 8b 54 24 04 e8 eb fe ff ff 85 c0 89 44 24 18 0f 84 84 EIP: [] sctp_auth_asoc_create_secret+0xe9/0x1a1 [sctp] SS:ESP 0068:c0756cc0 Kernel panic - not syncing: Fatal exception in interrupt This patch fix this problem. Signed-off-by: Wei Yongjun <[EMAIL PROTECTED]> --- a/net/sct

[PATCH v2] ibmvnic: fix to use list_for_each_safe() when delete items

2016-06-21 Thread Wei Yongjun
Since we will remove items off the list using list_del() we need to use a safe version of the list_for_each() macro aptly named list_for_each_safe(). Signed-off-by: Wei Yongjun --- drivers/net/ethernet/ibm/ibmvnic.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff

Re: [PATCH] ibmvnic: fix to use list_for_each_safe() when delete items

2016-06-21 Thread Wei Yongjun
Hi Thomas Falcon, Thanks for found this. I will send new patch include your changes. Regards, Yongjun Wei On 06/22/2016 12:01 AM, Thomas Falcon wrote: On 06/20/2016 10:50 AM, Thomas Falcon wrote: On 06/17/2016 09:53 PM, weiyj...@163.com wrote: From: Wei Yongjun Since we will remove items

Re: [PATCH]Fix BUG of ip_rt_send_redirect()

2006-11-16 Thread Wei Yongjun
On Friday, November 17, 2006 11:51 AM Stephen Hemminger <[EMAIL PROTECTED]> wrote: On Thu, 16 Nov 2006 23:57:50 -0500 Li Yewang <[EMAIL PROTECTED]> wrote: [1]Summary of the problem: On IA32 system, If jiffies - b > 0x7fff, router can not send redirect packet.unsigned long b = rt->u.dst.rat

[PATCH net-next] devlink: fix return value check in devlink_dpipe_header_put()

2017-04-10 Thread Wei Yongjun
From: Wei Yongjun Fix the retrn value check which testing the wrong variable in devlink_dpipe_header_put(). Fixes: 1555d204e743 ("devlink: Support for pipeline debug (dpipe)") Signed-off-by: Wei Yongjun --- net/core/devlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) di

[PATCH net-next v2] devlink: fix return value check in devlink_dpipe_header_put()

2017-04-11 Thread Wei Yongjun
From: Wei Yongjun Fix the return value check which testing the wrong variable in devlink_dpipe_header_put(). Fixes: 1555d204e743 ("devlink: Support for pipeline debug (dpipe)") Signed-off-by: Wei Yongjun Acked-by: Jiri Pirko --- v1 -> v2: fix a typo in patch comment --- net/c

[PATCH net-next v2] net: wan: slic_ds26522: Remove .owner field for driver

2017-02-06 Thread Wei Yongjun
From: Wei Yongjun Remove .owner field if calls are used which set it automatically. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Wei Yongjun --- drivers/net/wan/slic_ds26522.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/wan/slic_ds26522.c

[PATCH net-next v2] net: wan: slic_ds26522: Use module_spi_driver to simplify the code

2017-02-06 Thread Wei Yongjun
From: Wei Yongjun module_spi_driver() makes the code simpler by eliminating boilerplate code. Signed-off-by: Wei Yongjun --- drivers/net/wan/slic_ds26522.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/net/wan/slic_ds26522.c b/drivers/net/wan

[PATCH net-next] net/sched: act_mirred: remove duplicated include from act_mirred.c

2017-02-06 Thread Wei Yongjun
From: Wei Yongjun Remove duplicated include. Signed-off-by: Wei Yongjun --- net/sched/act_mirred.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/net/sched/act_mirred.c b/net/sched/act_mirred.c index 84682f0..af49c7d 100644 --- a/net/sched/act_mirred.c +++ b/net/sched/act_mirred.c

[PATCH net-next] ipv6: sr: fix non static symbol warnings

2017-02-06 Thread Wei Yongjun
From: Wei Yongjun Fixes the following sparse warnings: net/ipv6/seg6_iptunnel.c:58:5: warning: symbol 'nla_put_srh' was not declared. Should it be static? net/ipv6/seg6_iptunnel.c:238:5: warning: symbol 'seg6_input' was not declared. Should it be static? net/ipv6/s

[PATCH net-next] sfc: efx_get_phys_port_id() can be static

2017-01-11 Thread Wei Yongjun
From: Wei Yongjun Fixes the following sparse warning: drivers/net/ethernet/sfc/efx.c:2337:5: warning: symbol 'efx_get_phys_port_id' was not declared. Should it be static? Signed-off-by: Wei Yongjun --- drivers/net/ethernet/sfc/efx.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH net-next] net: thunderx: Fix error return code in nicvf_open()

2017-01-11 Thread Wei Yongjun
From: Wei Yongjun Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 712c31853440 ("net: thunderx: Program LMAC credits based on MTU") Signed-off-by: Wei Yongjun --- drivers/net/ethernet/cavium/thunder/nicvf_

[PATCH net-next] cdc-ether: usbnet_cdc_zte_status() can be static

2017-01-12 Thread Wei Yongjun
From: Wei Yongjun Fixes the following sparse warning: drivers/net/usb/cdc_ether.c:469:6: warning: symbol 'usbnet_cdc_zte_status' was not declared. Should it be static? Signed-off-by: Wei Yongjun --- drivers/net/usb/cdc_ether.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

[PATCH net-next] lwt_bpf: bpf_lwt_prog_cmp() can be static

2017-01-12 Thread Wei Yongjun
From: Wei Yongjun Fixes the following sparse warning: net/core/lwt_bpf.c:355:5: warning: symbol 'bpf_lwt_prog_cmp' was not declared. Should it be static? Signed-off-by: Wei Yongjun --- net/core/lwt_bpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core

[PATCH net-next] net_sched: nla_memdup_cookie() can be static

2017-02-14 Thread Wei Yongjun
From: Wei Yongjun Fixes the following sparse warning: net/sched/act_api.c:532:5: warning: symbol 'nla_memdup_cookie' was not declared. Should it be static? Signed-off-by: Wei Yongjun --- net/sched/act_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH net-next] can: ti_hecc: fix return value check in ti_hecc_probe()

2017-04-24 Thread Wei Yongjun
From: Wei Yongjun In case of error, the function devm_ioremap_resource() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: dabf54dd1c63 ("can: ti_hecc: Convert TI HECC driver to DT only driver") Signed-off-by: W

[PATCH net-next] qed: fix invalid use of sizeof in qed_alloc_qm_data()

2017-04-25 Thread Wei Yongjun
From: Wei Yongjun sizeof() when applied to a pointer typed expression gives the size of the pointer, not that of the pointed data. Signed-off-by: Wei Yongjun --- drivers/net/ethernet/qlogic/qed/qed_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet

[PATCH net-next] drivers: net: xgene-v2: Fix error return code in xge_mdio_config()

2017-04-25 Thread Wei Yongjun
From: Wei Yongjun Fix to return error code -ENODEV from the no PHY found error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun --- drivers/net/ethernet/apm/xgene-v2/mdio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/apm

[PATCH net-next] fib_rules: fix error return code

2017-04-26 Thread Wei Yongjun
From: Wei Yongjun Fix to return error code -EINVAL from the error handling case instead of 0, as done elsewhere in this function. Fixes: 622ec2c9d524 ("net: core: add UID to flows, rules, and routes") Signed-off-by: Wei Yongjun --- net/core/fib_rules.c | 6 -- 1 file changed, 4

[PATCH] SNMPv2 tcpAttemptFails counter error

2006-07-05 Thread Wei Yongjun
d) Received SYN segment when SYN-RCVD state(came from SYN-SENT). 3. SYN-RCVD -> LISTEN e) Received RST segment when SYN-RCVD state(came from LISTEN). In my test, those direct state transition can not be counted to tcpAttemptFails. Following is my patch: Signed-off-by: Wei Yongju

[PATCH] SNMPv2 tcpOutSegs counter error

2006-07-06 Thread Wei Yongjun
p_header_size) tcp_event_data_sent(tp, skb, sk); - TCP_INC_STATS(TCP_MIB_OUTSEGS); + if (!(tcb->sacked & TCPCB_LOST)) + TCP_INC_STATS(TCP_MIB_OUTSEGS); err = icsk->icsk_af_ops->queue_xmit(skb, 0); if (likely(err <= 0)) Signed-off-by: Wei Yongj

Re: [PATCH]ip_options_fragment() has no effect on fragmentation

2006-05-08 Thread Wei Yongjun
I had tested the patch under linux system, maybe this mail is correct. Fix error point to options in ip_options_fragment(). optptr get a error pointer to the ipv4 header, correct is pointer to ipv4 options. Signed-off-by: Wei Yongjun <[EMAIL PROTECTED]> --- a/net/ipv4/ip_options.c 2

[PATCH]Enhancements of ip_options_fragment()

2006-01-29 Thread Wei Yongjun
[1]Summary of the problem: Kernel does not delete the space of the options which not allowed in fragments. [2]Full description of the problem: ip_options_fragment() just fill options which not allowed in fragments with NOOPs, does not delete the space of the options, following patch has corrected

<    1   2   3   >