[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 @@ -1424,7

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

2007-06-03 Thread Wei Yongjun
, is 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 +0800 @@ -1424,7

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 = ntohs(iph

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
-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] -- Wei Yongjun

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 2006-01-27

[PATCH]ip_options_fragment() has no effect on fragmentation

2006-01-26 Thread Wei Yongjun
-nh.raw + sizeof(struct iphdr); struct ip_options * opt = (IPCB(skb)-opt); int l = opt-optlen; int optlen; Regards -- Wei Yongjun FUJITSU INTERNAL:7124-2865 [EMAIL PROTECTED

[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

Re: [PATCH]Enhancements of ip_options_fragment()

2006-01-29 Thread Wei Yongjun
I think this problem should not occurred because the patch make the ipv4 header of a 32 bit alignment. [Please put new lines every 80 characters in your mails] On Monday 30 January 2006 22:44, Wei Yongjun wrote: [1]Summary of the problem: Kernel does not delete the space of the options

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 =

[PATCH] Some state changes not be counted to TCP_MIB_ATTEMPTFAILS

2006-02-23 Thread Wei Yongjun
Refer to RFC2012, tcpAttemptFails is defined as following: tcpAttemptFails OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only STATUS current DESCRIPTION The number of times TCP connections have made a direct transition to the CLOSED

Re: [PATCH]IPv4 UDP does not discard the datagram with invalid checksum

2006-02-23 Thread Wei Yongjun
Under IPv4, when I send a UDP packet with invalid checksum, kernel used udp_rcv() to up packet to UDP layer, application used udp_recvmsg to receive message. So if one UDP packet with invalid checksum is arrived to host, UDP_MIB_INDATAGRAMS will be increased 1, UDP_MIB_INERRORS should be increased

[PATCH] TCP_MIB_OUTSEGS increased including retransmitted octets

2006-02-24 Thread Wei Yongjun
Linux kernel increased the TCP_MIB_OUTSEGS even if only retransmitted octets is send out. RFC2012 saied that it excluding those containing only retransmitted octets. Refer to RFC2012, tcpOutSegs is defined as following: tcpOutSegs OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS

[PATCH] SNMPv2 tcpAttemptFails counter error

2006-07-05 Thread Wei Yongjun
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 Yongjun [EMAIL PROTECTED] --- a/net

[PATCH] SNMPv2 tcpOutSegs counter error

2006-07-06 Thread Wei Yongjun
) 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 Yongjun [EMAIL PROTECTED

[PATCH] Bug in pskb_trim_rcsum()

2006-07-16 Thread Wei Yongjun
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/skbuff.h2006-07-17 10:18:31.762279472 -0400

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 already verified the checksum

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 to tcpAttemptFails. Following is my

[PATCH] SNMPv2 udpInDatagrams counter error

2006-07-31 Thread Wei Yongjun
) { + 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 unsubscribe from this list: send the line unsubscribe

Re: [PATCH] SNMPv2 udpInDatagrams counter error

2006-07-31 Thread Wei Yongjun
Renker [EMAIL PROTECTED] To: netdev@vger.kernel.org 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 Yongjun wrote: | When I send a UDP datagrams with checksum error

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

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 retransmits will not set

Re: [PATCH] SNMPv2 tcpOutSegs counter error

2006-08-04 Thread Wei Yongjun
); 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 modified my patch by add a flag to sacked when retransmit, and it work well

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 not be counted, even

Re: [PATCH] SNMPv2 tcpOutSegs counter error

2006-08-07 Thread Wei Yongjun
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-seq. Cheers, Signed-off-by: Wei Yongjun [EMAIL PROTECTED] --- a/net/ipv4/tcp_output.c 2006-08-03 18:05:22.425081936 -0400 +++ b/net/ipv4

[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 18:14

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, and if this Cumulative TSN Ack is not used

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
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 -0400 +++ net/sctp

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

2007-08-19 Thread Wei Yongjun
- 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.0 -0400 +++ b/net/ipv6/ip6_output.c 2007-08-17 15:33:35.0 -0400 @@ -794,7 +794,7 @@ slow_path

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_copy_bits

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

2007-08-26 Thread Wei Yongjun
, 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 -0400 @@ -165,10 +165,8

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 to identify

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 CRC32c check; see

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 CRC32c check; see

[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_getsockopt(struct

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

2007-12-17 Thread Wei Yongjun
(). 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 @@ -196,6 +196,8 @@ int put_cmsg(struct msghdr * msg, int le if (copy_to_user(CMSG_DATA

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

2008-01-21 Thread Wei Yongjun
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:25.0 -0500 +++ b/net/sctp/sm_statefuns.c 2008-01-21 05:14:08.0

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

2008-01-22 Thread Wei Yongjun
: [c8f5de2e] 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/sctp/auth.c 2008-01-21 00:03:25.0 -0500 +++ b/net/sctp/auth.c 2008-01

[PATCH] SCTP: Fix kernel panic while received retransmitted ASCONF chunk 3 times

2008-01-26 Thread Wei Yongjun
Signed-off-by: Wei Yongjun [EMAIL PROTECTED] --- a/net/sctp/sm_statefuns.c 2008-01-25 00:50:27.0 -0500 +++ b/net/sctp/sm_statefuns.c 2008-01-25 03:03:15.0 -0500 @@ -3420,9 +3420,10 @@ sctp_disposition_t sctp_sf_do_asconf(con * time and instead of re-processing

[PATCH] SCTP: Fix miss of report unrecognized HMAC Algorithm parameter

2008-01-27 Thread Wei Yongjun
This patch fix miss of check for report unrecognized HMAC Algorithm parameter. When AUTH is disabled, goto fall through path to report unrecognized parameter, else, just break. Wei Neil Horman wrote: On Wed, Jan 23, 2008 at 09:30:27AM +0900, Wei Yongjun wrote: This patch fix miss of check

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

2008-02-05 Thread Wei Yongjun
--- Kernel Panic This patch fix this probleam to treat AUTH chunk as unknow chunk if peer has initialized with no auth capable. Sorry for the delay. Was on vacation without net access. Wei Yongjun wrote: This patch fix this probleam to treat AUTH chunk as unknow chunk if peer has

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

2008-02-05 Thread Wei Yongjun
:29:20PM +0900, Wei Yongjun wrote: FWIW, Ack from me. The assignment of NULL to key can safely be removed, since key_for_each (which is just list_for_each_entry under the covers does an initial assignment to key anyway). If the endpoint_shared_keys list is empty, or if the key_id being

[PATCH] SCTP: Fix kernel panic while received ASCONF chunk with bad serial number

2008-02-05 Thread Wei Yongjun
but a bogus pointer. Signed-off-by: Wei Yongjun [EMAIL PROTECTED] --- a/net/sctp/associola.c 2008-01-28 20:31:39.0 -0500 +++ b/net/sctp/associola.c 2008-01-28 23:45:20.0 -0500 @@ -1525,7 +1525,7 @@ struct sctp_chunk *sctp_assoc_lookup_asc

Re: [PATCH] Can not send icmp netunreach packet

2008-02-26 Thread Wei Yongjun
Jarek Poplawski wrote: Maybe ip_error() does not handle the ESRCH error. In this place ESRCH eq to ENETUNREACH? static int ip_error(struct sk_buff *skb) { struct rtable *rt = (struct rtable*)skb-dst; unsigned long now; int code; switch (rt-u.dst.error) {

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 <yongj

[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 <yongjun_...@trendmicro.com.cn> --- drivers/net/ethernet/ibm/ibmvnic.c | 14 +++--- 1 file chan

[PATCH -next] libcxgb: remove unused including

2016-07-22 Thread Wei Yongjun
Remove including that don't need it. Signed-off-by: Wei Yongjun <weiyj...@gmail.com> --- drivers/net/ethernet/chelsio/libcxgb/libcxgb_ppm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/chelsio/libcxgb/libcxgb_ppm.c b/drivers/net/ethernet/chelsio/libcxgb/libcxgb

[PATCH -next] i40e: Use list_move instead of list_del/list_add

2016-07-26 Thread Wei Yongjun
Using list_move() instead of list_del() + list_add(). Signed-off-by: Wei Yongjun <weiyj...@gmail.com> --- drivers/net/ethernet/intel/i40e/i40e_client.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e_client.c b/drivers/net/et

[PATCH -next] tipc: fix imbalance read_unlock_bh in __tipc_nl_add_monitor()

2016-07-27 Thread Wei Yongjun
for basic block Fixes: cf6f7e1d5109 ('tipc: dump monitor attributes') Signed-off-by: Wei Yongjun <weiyj...@gmail.com> --- net/tipc/monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/tipc/monitor.c b/net/tipc/monitor.c index be70a57..b62caa1 100644 --- a/ne

[PATCH -next] drivers: net: phy: xgene: Remove redundant dev_err call in xgene_mdio_probe()

2016-07-27 Thread Wei Yongjun
There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Signed-off-by: Wei Yongjun <weiyj...@gmail.com> --- drivers/net/phy/mdio-xgene.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/ph

[PATCH -next] qed: Use DEFINE_SPINLOCK() for spinlock

2016-08-02 Thread Wei Yongjun
spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). Signed-off-by: Wei Yongjun <weiyj...@gmail.com> --- drivers/net/ethernet/qlogic/qed/qed_dev.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drive

[PATCH -next] qed: Fix error return code in qed_resc_alloc()

2016-08-01 Thread Wei Yongjun
Fix to return error code -EINVAL instead of 0 when EQ elements is too larger, as done elsewhere in this function. Signed-off-by: Wei Yongjun <weiyj...@gmail.com> --- drivers/net/ethernet/qlogic/qed/qed_dev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/qlog

[PATCH] net: arc_emac: add missing of_node_put() in arc_emac_probe()

2016-08-03 Thread Wei Yongjun
commit a94efbd7cc45 ("ethernet: arc: emac_main: add missing of_node_put after calling of_parse_phandle") added missing of_node_put after calling of_parse_phandle, but missing the devm_ioremap_resource() error handling case. Signed-off-by: Wei Yongjun <weiyj...@gmail.com> --- driv

[PATCH -next] qed: Fix possible memory leak in qed_dcbnl_get_ieee_pfc()

2016-08-11 Thread Wei Yongjun
'dcbx_info is malloced in qed_dcbnl_get_ieee_pfc() and should be freed before leaving from the error handling cases, otherwise it will cause memory leak. Fixes: a1d8d8a51e83 ("qed: Add dcbnl support.") Signed-off-by: Wei Yongjun <weiyj...@gmail.com> --- drivers/net/ethernet/qlogi

[PATCH -next] sit: make function ipip6_valid_ip_proto() static

2016-08-12 Thread Wei Yongjun
Fixes the following sparse warning: net/ipv6/sit.c:1129:6: warning: symbol 'ipip6_valid_ip_proto' was not declared. Should it be static? Signed-off-by: Wei Yongjun <weiyj...@gmail.com> --- net/ipv6/sit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv6/sit.c

[PATCH -next] net: dsa: b53: remove .owner and .bus fields for driver

2016-08-12 Thread Wei Yongjun
Remove .owner and .bus fields since module_spi_driver() is used which set them automatically. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Wei Yongjun <weiyj...@gmail.com> --- drivers/net/dsa/b53/b53_spi.c | 2 -- 1 file changed, 2 deletions(-) diff

[PATCH -next] net: macb: add missing free_netdev() on error in macb_probe()

2016-08-12 Thread Wei Yongjun
Add the missing free_netdev() before return from function macb_probe() in the platform_get_irq() error handling case. Fixes: c69618b3e4f2 ("net/macb: fix probe sequence to setup clocks earlier") Signed-off-by: Wei Yongjun <weiyj...@gmail.com> --- drivers/net/ethernet/cadence/

[PATCH -next] net: axienet: Fix return value check in axienet_probe()

2016-07-19 Thread Wei Yongjun
From: Wei Yongjun <yongjun_...@trendmicro.com.cn> In case of error, the function of_parse_phandle() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Fixes: 46aa27df8853 ('net: axienet: Use devm_* calls') Signed-off-by: Wei Y

[PATCH -next] net: cpmac: fix error handling of cpmac_probe()

2016-07-19 Thread Wei Yongjun
From: Wei Yongjun <yongjun_...@trendmicro.com.cn> Add the missing free_netdev() before return from function cpmac_probe() in the error handling case. This patch revert commit 0465be8f4f1d ("net: cpmac: fix in releasing resources"), which changed to only free_netdev while regist

[PATCH -next] net/mlx5: Use PTR_ERR_OR_ZERO() to simplify the code

2016-07-19 Thread Wei Yongjun
From: Wei Yongjun <yongjun_...@trendmicro.com.cn> Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR. Generated by: scripts/coccinelle/api/ptr_ret.cocci Signed-off-by: Wei Yongjun <yongjun_...@trendmicro.com.cn> --- drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 10 +

[PATCH -next] wan/fsl_ucc_hdlc: use module_platform_driver to simplify the code

2016-07-19 Thread Wei Yongjun
From: Wei Yongjun <yongjun_...@trendmicro.com.cn> module_platform_driver() makes the code simpler by eliminating boilerplate code. Signed-off-by: Wei Yongjun <yongjun_...@trendmicro.com.cn> --- drivers/net/wan/fsl_ucc_hdlc.c | 13 + 1 file changed, 1 insertion(+),

[PATCH -next] wan/fsl_ucc_hdlc: remove .owner field for driver

2016-07-19 Thread Wei Yongjun
From: Wei Yongjun <yongjun_...@trendmicro.com.cn> 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 <yongjun_...@trendmicro.com.cn> --- drivers/net/wan/fsl_ucc_hdlc.c |

[PATCH -next] net: ethernet: nb8800: fix error handling of nb8800_probe()

2016-07-19 Thread Wei Yongjun
From: Wei Yongjun <yongjun_...@trendmicro.com.cn> In ops->reset() error handling case, clk_disable_unprepare() is missed before return from this function. Signed-off-by: Wei Yongjun <yongjun_...@trendmicro.com.cn> --- drivers/net/ethernet/aurora/nb8800.c | 2 +- 1 file chang

[PATCH -next] net: ipv6: use list_move instead of list_del/list_add

2016-07-28 Thread Wei Yongjun
Using list_move() instead of list_del() + list_add(). Signed-off-by: Wei Yongjun <weiyj...@gmail.com> --- net/ipv6/addrconf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 6287a8b..ab3e796 100644 --- a/net/ipv6/addr

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

2017-02-06 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> 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 <weiyongj...@huawei.com> --- drivers/net/wan/slic_ds26522.c | 1 - 1 file changed

[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 <weiyongj...@huawei.com> module_spi_driver() makes the code simpler by eliminating boilerplate code. Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/net/wan/slic_ds26522.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --g

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

2017-02-06 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> 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? ne

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

2017-02-06 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> Remove duplicated include. Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- 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 ---

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

2017-02-14 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> 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 <weiyongj...@huawei.com> --- net/sched/act_api.c | 2 +- 1 file changed,

[PATCH -next v2] net: phy: Add missing of_node_put() in xgmiitorgmii_probe()

2016-08-21 Thread Wei Yongjun
This node pointer is returned by of_parse_phandle() with refcount incremented in this function. of_node_put() on it before exitting this function. This is detected by Coccinelle semantic patch. Signed-off-by: Wei Yongjun <weiyj...@gmail.com> --- v1 -> v2: release it unconditionally

[PATCH -next] net: phy: Fix return value check in xgmiitorgmii_probe()

2016-08-15 Thread Wei Yongjun
In case of error, the function of_parse_phandle() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Signed-off-by: Wei Yongjun <weiyj...@gmail.com> --- drivers/net/phy/xilinx_gmii2rgmii.c | 2 +- 1 file changed, 1 insertion

[PATCH -next] net: ena: Remove unnecessary pci_set_drvdata()

2016-08-15 Thread Wei Yongjun
The driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Wei Yongjun <weiyj...@gmail.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 3 --- 1 file changed, 3 del

[PATCH -next] net: ena: Fix error return code in ena_device_init()

2016-08-15 Thread Wei Yongjun
Fix to return a negative error code from the invalid dma width error handling case instead of 0. Signed-off-by: Wei Yongjun <weiyj...@gmail.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/amazon/ena/ena_netde

[PATCH -next] net: thunderx: Remove unnecessary pci_set_drvdata()

2016-08-15 Thread Wei Yongjun
The driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Wei Yongjun <weiyj...@gmail.com> --- drivers/net/ethernet/cavium/thunder/thunder_xcv.c | 2 -- 1 file chan

[PATCH -next] net: mediatek: remove unnecessary platform_set_drvdata()

2016-08-15 Thread Wei Yongjun
The driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Wei Yongjun <weiyj...@gmail.com> --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 1 - 1 file changed, 1 de

[PATCH -next] cxgb4: Simplify the return expression

2016-08-20 Thread Wei Yongjun
Simplify the return expression. Signed-off-by: Wei Yongjun <weiyj...@gmail.com> --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio

[PATCH -next] net: phy: Add missing of_node_put() in xgmiitorgmii_probe()

2016-08-20 Thread Wei Yongjun
This node pointer is returned by of_parse_phandle() with refcount incremented in this function. of_node_put() on it before exitting this function. This is detected by Coccinelle semantic patch. Signed-off-by: Wei Yongjun <weiyj...@gmail.com> --- drivers/net/phy/xilinx_gmii2rgmii.c | 1 +

[PATCH -next] netfilter: nft_hash: fix non static symbol warning

2016-08-21 Thread Wei Yongjun
Fixes the following sparse warning: net/netfilter/nft_hash.c:40:25: warning: symbol 'nft_hash_policy' was not declared. Should it be static? Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- net/netfilter/nft_hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH -next] ixgbe: Fix non static symbol warnings

2016-08-23 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> Fixes the following sparse warnings: drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c:2128:5: warning: symbol 'ixgbe_led_on_t_x550em' was not declared. Should it be static? drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c:2150:5: warning:

Re: [PATCH -next] net: phy: xgmiitorgmii: Fix non static symbol warning

2016-08-23 Thread Wei Yongjun
Hi Andrew, On 08/23/2016 11:16 PM, Andrew Lunn wrote: > On Tue, Aug 23, 2016 at 03:06:05PM +0000, Wei Yongjun wrote: >> From: Wei Yongjun <weiyongj...@huawei.com> > Hi Wei > > No need for the additional From: > > git am will use the one in the mail hea

[PATCH -next] net: hns: remove redundant dev_err call in hns_dsaf_get_cfg()

2016-08-23 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/net/ethernet/hisilicon/hns/hns_dsaf

[PATCH -next] cxgb4: Remove unused including

2016-08-23 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> Remove including that don't need it. Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.

[PATCH -next] net: dsa: bcm_sf2: Remove redundant dev_err call in bcm_sf2_sw_probe()

2016-08-23 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/net/dsa/bcm_sf2.c | 4 +--- 1 file changed, 1 ins

[PATCH -next] igb: fix non static symbol warning

2016-08-23 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> Fixes the following sparse warning: drivers/net/ethernet/intel/igb/igb_ethtool.c:2707:5: warning: symbol 'igb_rxnfc_write_vlan_prio_filter' was not declared. Should it be static? Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> ---

[PATCH -next] net: phy: xgmiitorgmii: Fix non static symbol warning

2016-08-23 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> Fixes the following sparse warning: drivers/net/phy/xilinx_gmii2rgmii.c:61:5: warning: symbol 'xgmiitorgmii_probe' was not declared. Should it be static? Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/net/phy/xilinx_gmii

[PATCH -next] vmxnet3: fix non static symbol warning

2016-08-23 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> Fixes the following sparse warning: drivers/net/vmxnet3/vmxnet3_drv.c:1645:1: warning: symbol 'vmxnet3_rq_destroy_all_rxdataring' was not declared. Should it be static? Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers

[PATCH -next] xen-netback: using kfree_rcu() to simplify the code

2016-08-22 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> 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 <weiyongj...@huawei.com> --- drivers/net/xen-netback/hash.c | 13 ++--- 1 fil

Re: [PATCH net] qdisc: fix a module refcount leak in qdisc_create_dflt()

2016-08-25 Thread Wei Yongjun
On 08/25/2016 12:39 AM, Eric Dumazet wrote: > From: Eric Dumazet > > Should qdisc_alloc() fail, we must release the module refcount > we got right before. > > Fixes: 6da7c8fcbcbd ("qdisc: allow setting default queuing discipline") > Signed-off-by: Eric Dumazet

[PATCH] ipv6: addrconf: fix dev refcont leak when DAD failed

2016-09-05 Thread Wei Yongjun
ge count = 1 Cc: sta...@vger.kernel.org Fixes: c15b1ccadb32 ("ipv6: move DAD and addrconf_verify processing to workqueue") Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index bdf368e..2f1f5d4 100644 --- a/net/ipv6/addrconf.c

[PATCH -next] net: macb: fix missing unlock on error in macb_start_xmit()

2016-09-10 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> Fix missing unlock before return from function macb_start_xmit() in the error handling case. Fixes: 007e4ba3ee13 ("net: macb: initialize checksum when using checksum offloading") Signed-off-by: Wei Yongjun <weiyongj...@huawei.co

[PATCH -next] net: ethernet: dwmac: fix non static symbol warning

2016-09-10 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> Fixes the following sparse warning: drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c:172:1: warning: symbol 'stm32_dwmac_pm_ops' was not declared. Should it be static? Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/

[PATCH -next] tipc: fix possible memory leak in tipc_udp_enable()

2016-09-09 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> 'ub' is malloced in tipc_udp_enable() and should be freed before leaving from the error handling cases, otherwise it will cause memory leak. Fixes: ba5aa84a2d22 ("tipc: split UDP nl address parsing") Signed-off-by: Wei Yongjun <wei

[PATCH v2] qed: Fix to use list_for_each_entry_safe() when delete items

2016-10-10 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> Since we will remove items off the list using list_del() we need to use a safe version of the list_for_each_entry() macro aptly named list_for_each_entry_safe(). Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> Acked-by: Yuval Min

[PATCH] qed: Fix to use list_for_each_entry_safe() when delete items

2016-10-09 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> Since we will remove items off the list using list_del() we need to use a safe version of the list_for_each_entry() macro aptly named list_for_each_entry_safe(). Fixes: 0a7fb11c23c0 ("qed: Add Light L2 support") Signed-off-by: Wei Y

[PATCH -next] net: emac: remove .owner field for driver

2016-09-14 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> 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 <weiyongj...@huawei.com> --- drivers/net/ethernet/qualcomm/emac/emac.c | 1 - 1

[PATCH -next] net: dsa: bcm_sf2: Fix non static symbol warning

2016-09-14 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> Fixes the following sparse warning: drivers/net/dsa/bcm_sf2.c:963:19: warning: symbol 'bcm_sf2_io_ops' was not declared. Should it be static? Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/net/dsa/bcm_sf2.c | 2 +- 1 fil

[PATCH -next] net: emac: remove unnecessary dev_set_drvdata()

2016-09-14 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> The driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/net/ethernet/q

[PATCH -next] net: dsa: b53: Remove unused including

2016-09-14 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> Remove including that don't need it. Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/net/dsa/b53/b53_priv.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/dsa/b53/b53_priv.h b/drivers/net/dsa/b53/b53_

  1   2   3   >