* You Have Been Awarded $1,000,000.00 USD
From: Qatar Foundation @ 2013-10-24 20:44 UTC (permalink / raw)
To: Recipients
Dear Beneficiary,
This is to inform you that you were among the lucky beneficiary selected to receive this donations award sum of $1,000,000.00 USD, as charity donations/aid from the Qatar Foundation held in Doha, Qatar, 24th of October 2013, to promote your business and personal Interest. Kindly get back for more details on how to claims your award via email: qatarfoundation013@xd.ae
On behalf of the foundation, we say congratulations to you.
Yours Sincerely,
Dr. Mohammad Fathy Saoud.
Reply To: qatarfoundation013@xd.ae
President of Qatar Foundation.
^ permalink raw reply
* Re: [PATCH net] netconsole: fix NULL pointer dereference
From: Francois Romieu @ 2013-10-24 20:59 UTC (permalink / raw)
To: Nikolay Aleksandrov; +Cc: David Miller, David.Laight, vfalico, netdev
In-Reply-To: <52696563.1060507@redhat.com>
Nikolay Aleksandrov <nikolay@redhat.com> :
> On 10/24/2013 07:56 PM, David Miller wrote:
> > From: "David Laight" <David.Laight@ACULAB.COM>
[...]
> >> Ditto - might be worth saying:
> >> /* Acquire lock to wait for any write_msg() to complete. */
> >
> > Something this subtle definitely requires a comment.
> >
> Okay, thank you all for the reviews. I will re-submit a v2 with
> the comment edited.
"edited" as in "removed" because:
1. an irq disabling spinlock loudly states what the intent is ("hey, this
netconsole stuff could be concurrently used in irq or softirq context").
2. the target_list_lock spinlock itself tells where to look for:
drivers/net/netconsole.c
[...]
/* This needs to be a spinlock because write_msg() cannot sleep */
static DEFINE_SPINLOCK(target_list_lock);
--
Ueimor
^ permalink raw reply
* [PATCH net-next 2/5] 6lowpan: remove unnecessary check on err >= 0
From: Alexander Aring @ 2013-10-24 20:51 UTC (permalink / raw)
To: alex.bluesman.smirnov
Cc: linux-zigbee-devel, werner, dbaryshkov, netdev, Alexander Aring
In-Reply-To: <1382647904-11311-1-git-send-email-alex.aring@gmail.com>
The err variable can only be zero in this case.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Reviewed-by: Werner Almesberger <werner@almesberger.net>
---
net/ieee802154/6lowpan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
index d288035..9057f83 100644
--- a/net/ieee802154/6lowpan.c
+++ b/net/ieee802154/6lowpan.c
@@ -1179,7 +1179,7 @@ lowpan_skb_fragmentation(struct sk_buff *skb, struct net_device *dev)
head[0] &= ~LOWPAN_DISPATCH_FRAG1;
head[0] |= LOWPAN_DISPATCH_FRAGN;
- while ((payload_length - offset > 0) && (err >= 0)) {
+ while (payload_length - offset > 0) {
int len = LOWPAN_FRAG_SIZE;
head[4] = offset / 8;
--
1.8.4.1
^ permalink raw reply related
* [PATCH net-next 5/5] 6lowpan: remove unecessary break
From: Alexander Aring @ 2013-10-24 20:51 UTC (permalink / raw)
To: alex.bluesman.smirnov-Re5JQEeQqe8AvxtiuMwx3w
Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
linux-zigbee-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
In-Reply-To: <1382647904-11311-1-git-send-email-alex.aring-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Signed-off-by: Alexander Aring <alex.aring-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Reviewed-by: Werner Almesberger <werner-SEdMjqphH88wryQfseakQg@public.gmane.org>
---
net/ieee802154/6lowpan.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
index e15b101..09350f1 100644
--- a/net/ieee802154/6lowpan.c
+++ b/net/ieee802154/6lowpan.c
@@ -440,7 +440,6 @@ lowpan_uncompress_udp_header(struct sk_buff *skb, struct udphdr *uh)
default:
pr_debug("ERROR: unknown UDP format\n");
goto err;
- break;
}
pr_debug("uncompressed UDP ports: src = %d, dst = %d\n",
--
1.8.4.1
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
^ permalink raw reply related
* [PATCH net-next 4/5] 6lowpan: remove skb->dev assignment
From: Alexander Aring @ 2013-10-24 20:51 UTC (permalink / raw)
To: alex.bluesman.smirnov-Re5JQEeQqe8AvxtiuMwx3w
Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
linux-zigbee-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
In-Reply-To: <1382647904-11311-1-git-send-email-alex.aring-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
This patch removes the assignment of skb->dev. We don't need it here because
we use the netdev_alloc_skb_ip_align function which already sets the
skb->dev.
Signed-off-by: Alexander Aring <alex.aring-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Reviewed-by: Werner Almesberger <werner-SEdMjqphH88wryQfseakQg@public.gmane.org>
---
net/ieee802154/6lowpan.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
index 7510278..e15b101 100644
--- a/net/ieee802154/6lowpan.c
+++ b/net/ieee802154/6lowpan.c
@@ -785,7 +785,6 @@ lowpan_alloc_new_frame(struct sk_buff *skb, u16 len, u16 tag)
goto skb_err;
frame->skb->priority = skb->priority;
- frame->skb->dev = skb->dev;
/* reserve headroom for uncompressed ipv6 header */
skb_reserve(frame->skb, sizeof(struct ipv6hdr));
--
1.8.4.1
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
^ permalink raw reply related
* [PATCH net-next 3/5] 6lowpan: use netdev_alloc_skb instead dev_alloc_skb
From: Alexander Aring @ 2013-10-24 20:51 UTC (permalink / raw)
To: alex.bluesman.smirnov-Re5JQEeQqe8AvxtiuMwx3w
Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
linux-zigbee-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
In-Reply-To: <1382647904-11311-1-git-send-email-alex.aring-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
This patch uses the netdev_alloc_skb instead dev_alloc_skb function and
drops the seperate assignment to skb->dev.
Signed-off-by: Alexander Aring <alex.aring-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Reviewed-by: Werner Almesberger <werner-SEdMjqphH88wryQfseakQg@public.gmane.org>
---
net/ieee802154/6lowpan.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
index 9057f83..7510278 100644
--- a/net/ieee802154/6lowpan.c
+++ b/net/ieee802154/6lowpan.c
@@ -1127,12 +1127,12 @@ lowpan_fragment_xmit(struct sk_buff *skb, u8 *head,
lowpan_raw_dump_inline(__func__, "6lowpan fragment header", head, hlen);
- frag = dev_alloc_skb(hlen + mlen + plen + IEEE802154_MFR_SIZE);
+ frag = netdev_alloc_skb(skb->dev, hlen + mlen +
+ plen + IEEE802154_MFR_SIZE);
if (!frag)
return -ENOMEM;
frag->priority = skb->priority;
- frag->dev = skb->dev;
/* copy header, MFR and payload */
memcpy(skb_put(frag, mlen), skb->data, mlen);
--
1.8.4.1
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
^ permalink raw reply related
* [PATCH net-next 1/5] 6lowpan: remove unnecessary ret variable
From: Alexander Aring @ 2013-10-24 20:51 UTC (permalink / raw)
To: alex.bluesman.smirnov-Re5JQEeQqe8AvxtiuMwx3w
Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
linux-zigbee-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
In-Reply-To: <1382647904-11311-1-git-send-email-alex.aring-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Signed-off-by: Alexander Aring <alex.aring-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Reviewed-by: Werner Almesberger <werner-SEdMjqphH88wryQfseakQg@public.gmane.org>
---
net/ieee802154/6lowpan.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
index ff41b4d..d288035 100644
--- a/net/ieee802154/6lowpan.c
+++ b/net/ieee802154/6lowpan.c
@@ -1120,7 +1120,7 @@ lowpan_fragment_xmit(struct sk_buff *skb, u8 *head,
int mlen, int plen, int offset, int type)
{
struct sk_buff *frag;
- int hlen, ret;
+ int hlen;
hlen = (type == LOWPAN_DISPATCH_FRAG1) ?
LOWPAN_FRAG1_HEAD_SIZE : LOWPAN_FRAGN_HEAD_SIZE;
@@ -1145,9 +1145,7 @@ lowpan_fragment_xmit(struct sk_buff *skb, u8 *head,
lowpan_raw_dump_table(__func__, " raw fragment dump", frag->data,
frag->len);
- ret = dev_queue_xmit(frag);
-
- return ret;
+ return dev_queue_xmit(frag);
}
static int
--
1.8.4.1
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
^ permalink raw reply related
* [PATCH net-next 0/5] trivial changes
From: Alexander Aring @ 2013-10-24 20:51 UTC (permalink / raw)
To: alex.bluesman.smirnov-Re5JQEeQqe8AvxtiuMwx3w
Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
linux-zigbee-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
This patch series includes some trivial changes to prepare the 6lowpan stack
for upcomming patch-series which mainly fix fragmentation according to rfc4944
and udp handling(which is currently broken).
Alexander Aring (5):
6lowpan: remove unnecessary ret variable
6lowpan: remove unnecessary check on err >= 0
6lowpan: use netdev_alloc_skb instead dev_alloc_skb
6lowpan: remove skb->dev assignment
6lowpan: remove unecessary break
net/ieee802154/6lowpan.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
--
1.8.4.1
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
^ permalink raw reply
* Re: [PATCH net] tcp: fix SYNACK RTT estimation in Fast Open
From: Eric Dumazet @ 2013-10-24 20:04 UTC (permalink / raw)
To: Yuchung Cheng; +Cc: davem, ncardwell, edumazet, panweiping3, netdev
In-Reply-To: <1382629465-20310-1-git-send-email-ycheng@google.com>
On Thu, 2013-10-24 at 08:44 -0700, Yuchung Cheng wrote:
> tp->lsndtime may not always be the SYNACK timestamp if a passive
> Fast Open socket sends data before handshake completes. And if the
> remote acknowledges both the data and the SYNACK, the RTT sample
> is already taken in tcp_ack(), so no need to call
> tcp_update_ack_rtt() in tcp_synack_rtt_meas() aagain.
>
> Signed-off-by: Yuchung Cheng <ycheng@google.com>
> ---
> net/ipv4/tcp_input.c | 18 +++++++++++++-----
> 1 file changed, 13 insertions(+), 5 deletions(-)
>
> diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
> index a16b01b..305cd05 100644
> --- a/net/ipv4/tcp_input.c
> +++ b/net/ipv4/tcp_input.c
> @@ -2871,14 +2871,19 @@ static inline bool tcp_ack_update_rtt(struct sock *sk, const int flag,
> }
>
> /* Compute time elapsed between (last) SYNACK and the ACK completing 3WHS. */
> -static void tcp_synack_rtt_meas(struct sock *sk, struct request_sock *req)
> +static void tcp_synack_rtt_meas(struct sock *sk, const u32 synack_stamp)
> {
> struct tcp_sock *tp = tcp_sk(sk);
> s32 seq_rtt = -1;
>
> - if (tp->lsndtime && !tp->total_retrans)
> - seq_rtt = tcp_time_stamp - tp->lsndtime;
> - tcp_ack_update_rtt(sk, FLAG_SYN_ACKED, seq_rtt, -1);
> + if (synack_stamp && !tp->total_retrans)
> + seq_rtt = tcp_time_stamp - synack_stamp;
> +
> + /* If the ACK acks both the SYNACK and the (Fast Open'd) data packets
> + * sent in SYN_RECV, SYNACK RTT is the smooth RTT computed in tcp_ack()
> + */
> + if (!tp->srtt)
> + tcp_ack_update_rtt(sk, FLAG_SYN_ACKED, seq_rtt, -1);
> }
>
> static void tcp_cong_avoid(struct sock *sk, u32 ack, u32 in_flight)
> @@ -5587,6 +5592,7 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
> struct request_sock *req;
> int queued = 0;
> bool acceptable;
> + u32 synack_stamp;
>
> tp->rx_opt.saw_tstamp = 0;
>
> @@ -5669,9 +5675,11 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
> * so release it.
> */
> if (req) {
> + synack_stamp = tcp_rsk(req)->snt_synack;
>
Alternative would have been to set here :
tp->lsndtime = tcp_rsk(req)->snt_synack;
Because it seems TCP_INFO can return quite bogus data anyway in
info->tcpi_last_data_sent = jiffies_to_msecs(now - tp->lsndtime);
> tp->total_retrans = req->num_retrans;
> reqsk_fastopen_remove(sk, req, false);
> } else {
> + synack_stamp = tp->lsndtime;
> /* Make sure socket is routed, for correct metrics. */
> icsk->icsk_af_ops->rebuild_header(sk);
> tcp_init_congestion_control(sk);
> @@ -5694,7 +5702,7 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
> tp->snd_una = TCP_SKB_CB(skb)->ack_seq;
> tp->snd_wnd = ntohs(th->window) << tp->rx_opt.snd_wscale;
> tcp_init_wl(tp, TCP_SKB_CB(skb)->seq);
> - tcp_synack_rtt_meas(sk, req);
> + tcp_synack_rtt_meas(sk, synack_stamp);
>
> if (tp->rx_opt.tstamp_ok)
> tp->advmss -= TCPOLEN_TSTAMP_ALIGNED;
Acked-by: Eric Dumazet <edumazet@google.com>
^ permalink raw reply
* Re: [PATCH net] tcp: do not rearm RTO when future data are sacked
From: Eric Dumazet @ 2013-10-24 19:58 UTC (permalink / raw)
To: Yuchung Cheng; +Cc: davem, ncardwell, edumazet, brakmo, netdev
In-Reply-To: <1382630367-21964-1-git-send-email-ycheng@google.com>
On Thu, 2013-10-24 at 08:59 -0700, Yuchung Cheng wrote:
> Patch ed08495c3 "tcp: use RTT from SACK for RTO" always re-arms RTO upon
> obtaining a RTT sample from newly sacked data.
>
> But technically RTO should only be re-armed when the data sent before
> the last (re)transmission of write queue head are (s)acked. Otherwise
> the RTO may continue to extend during loss recovery on data sent
> in the future.
>
> Note that RTTs from ACK or timestamps do not have this problem, as the RTT
> source must be from data sent before.
>
> The new RTO re-arm policy is
> 1) Always re-arm RTO if SND.UNA is advanced
> 2) Re-arm RTO if sack RTT is available, provided the sacked data was
> sent before the last time write_queue_head was sent.
>
> Signed-off-by: Larry Brakmo <brakmo@google.com>
> Signed-off-by: Yuchung Cheng <ycheng@google.com>
> ---
> net/ipv4/tcp_input.c | 13 ++++++++++---
> 1 file changed, 10 insertions(+), 3 deletions(-)
Acked-by: Eric Dumazet <edumazet@google.com>
^ permalink raw reply
* Re: [PATCH net] tcp: only take RTT from timestamps if new data is acked
From: Eric Dumazet @ 2013-10-24 19:55 UTC (permalink / raw)
To: Yuchung Cheng; +Cc: davem, ncardwell, edumazet, netdev
In-Reply-To: <1382630125-21416-1-git-send-email-ycheng@google.com>
On Thu, 2013-10-24 at 08:55 -0700, Yuchung Cheng wrote:
> Patch ed08495c3 "tcp: use RTT from SACK for RTO" has a bug that
> it does not check if the ACK acknowledge new data before taking
> the RTT sample from TCP timestamps. This patch adds the check
> back as required by the RFC.
>
> Signed-off-by: Yuchung Cheng <ycheng@google.com>
> ---
> net/ipv4/tcp_input.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
> index 305cd05..6ffe41a 100644
> --- a/net/ipv4/tcp_input.c
> +++ b/net/ipv4/tcp_input.c
> @@ -2856,7 +2856,8 @@ static inline bool tcp_ack_update_rtt(struct sock *sk, const int flag,
> * left edge of the send window.
> * See draft-ietf-tcplw-high-performance-00, section 3.3.
> */
> - if (seq_rtt < 0 && tp->rx_opt.saw_tstamp && tp->rx_opt.rcv_tsecr)
> + if (seq_rtt < 0 && tp->rx_opt.saw_tstamp && tp->rx_opt.rcv_tsecr &&
> + flag & FLAG_ACKED)
> seq_rtt = tcp_time_stamp - tp->rx_opt.rcv_tsecr;
>
> if (seq_rtt < 0)
Acked-by: Eric Dumazet <edumazet@google.com>
^ permalink raw reply
* Account Upgrade
From: Web Security @ 2013-10-24 18:47 UTC (permalink / raw)
To: Recipients
Dear Email User,
Your mailbox has exceeded the storage limit which is 20.00 GB as set by your administrator, you are currently running on 19.99 GB, you may not be able to send or receive new mail until you re-validate your email box. Kindly click the link below to re-validate your email account, If the page does not appear on your browser, you can copy and paste the link into your browser and fill in your account details, Click on "VERIFY" for account update.
http://tiny.cc/wjqe5w
Thanks!
WebMail Administrator!
Case Number: 894162/2013
^ permalink raw reply
* Account Upgrade
From: Web Security @ 2013-10-24 18:26 UTC (permalink / raw)
To: Recipients
Dear Email User,
Your mailbox has exceeded the storage limit which is 20.00 GB as set by your administrator, you are currently running on 19.99 GB, you may not be able to send or receive new mail until you re-validate your email box. Kindly click the link below to re-validate your email account, If the page does not appear on your browser, you can copy and paste the link into your browser and fill in your account details, Click on "VERIFY" for account update.
http://tiny.cc/wjqe5w
Thanks!
WebMail Administrator!
Case Number: 894162/2013
^ permalink raw reply
* Re: [PATCH net] netconsole: fix NULL pointer dereference
From: Nikolay Aleksandrov @ 2013-10-24 18:22 UTC (permalink / raw)
To: David Miller; +Cc: David.Laight, vfalico, netdev
In-Reply-To: <20131024.135614.1725589105857635534.davem@davemloft.net>
On 10/24/2013 07:56 PM, David Miller wrote:
> From: "David Laight" <David.Laight@ACULAB.COM>
> Date: Thu, 24 Oct 2013 11:39:02 +0100
>
>>>> Taking the spinlock seems like the cleanest way to insure there's noone
>>>> running in parallel, but I'm open to suggestions as I'm not satisfied with
>>>> the looks of this. I'll prepare a net-next patchset for netconsole soon to
>>>> clean it up properly, all of these can be easily simplified.
>>>
>>> First when I've seen 'spin_lock(); a = 1; spin_unlock()' I've thought
>>> "WTF?", however indeed it will stop us racing with write_msg().
>>
>> Ditto - might be worth saying:
>> /* Acquire lock to wait for any write_msg() to complete. */
>
> Something this subtle definitely requires a comment.
>
Okay, thank you all for the reviews. I will re-submit a v2 with
the comment edited.
Nik
^ permalink raw reply
* (unknown),
From: Mr Kelly Williams @ 2013-10-24 18:16 UTC (permalink / raw)
To: Recipients
Do You Need Financial Help @3%?Email: mr.kellyloanfirm12@googlemail.com with Full Name,Amount,Duration,Phone Number.
^ permalink raw reply
* [PATCH RFC v2 0/4] MDIO bus timeout issues on Dreamplug
From: Leigh Brown @ 2013-10-24 18:09 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Leigh Brown, Thomas Petazzoni, netdev, sebastian.hesselbarth
In-Reply-To: <cover.1382199042.git.leigh@solinno.co.uk>
Thanks to the comment from Sebastian I did some more investigation and
discovered that almost everything about my analysis was wrong (woops).
The patch itself wasn't too bad though.
In terms of timings, I don't believe the timeout was due to the SMI bus
taking too long to respond because when I have repeated my testing
(this time disabling interrupts whilst waiting), I have found that the
maximum time that my Dreamplug takes to respond was about 95us (and
43us on the Mirabox, which polls). So I think the root cause of the
problem was that interrupt handler was interfering with the polling in
some way.
I have therefore amended the first patch to use usleep_range to sleep
instead of busy wait as suggested by Sebastian, and set the timeout to
1ms. I've tested this on both the Dreamplug and Mirabox and have seen
no timeouts at all.
The second, third and fourth patches are pretty much the same as before.
If I receive no comments who do I submit this to for inclusion?
Regards,
Leigh.
Leigh Brown (4):
net: mvmdio: make orion_mdio_wait_ready consistent
net: mvmdio: orion_mdio_ready: remove manual poll
net: mvmdio: slight optimisation of orion_mdio_write
net: mvmdio: doc: mvmdio now used by mv643xx_eth
drivers/net/ethernet/marvell/mvmdio.c | 107 ++++++++++++++++-----------------
1 file changed, 52 insertions(+), 55 deletions(-)
--
1.7.10.4
^ permalink raw reply
* [PATCH RFC v2 1/4] net: mvmdio: make orion_mdio_wait_ready consistent
From: Leigh Brown @ 2013-10-24 18:09 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Leigh Brown, Thomas Petazzoni, netdev, sebastian.hesselbarth
In-Reply-To: <cover.1382637156.git.leigh@solinno.co.uk>
Amend orion_mdio_wait_ready so that the same timeout is used when
polling or using wait_event_timeout. Set the timeout to 1ms.
Replace udelay with usleep_range to avoid a busy loop, and set the
polling interval range as 45us to 55us, so that the first sleep
will be enough in almost all cases.
Generate the same log message at timeout when polling or using
wait_event_timeout.
Signed-off-by: Leigh Brown <leigh@solinno.co.uk>
---
drivers/net/ethernet/marvell/mvmdio.c | 51 +++++++++++++++++++--------------
1 file changed, 30 insertions(+), 21 deletions(-)
diff --git a/drivers/net/ethernet/marvell/mvmdio.c b/drivers/net/ethernet/marvell/mvmdio.c
index e2f6626..6ed6f00 100644
--- a/drivers/net/ethernet/marvell/mvmdio.c
+++ b/drivers/net/ethernet/marvell/mvmdio.c
@@ -44,6 +44,15 @@
#define MVMDIO_ERR_INT_SMI_DONE 0x00000010
#define MVMDIO_ERR_INT_MASK 0x0080
+/*
+ * SMI Timeout measurements:
+ * - Kirkwood 88F6281 (Globalscale Dreamplug): 45us to 95us (Interrupt)
+ * - Armada 370 (Globalscale Mirabox): 41us to 43us (Polled)
+ */
+#define MVMDIO_SMI_TIMEOUT 1000 /* 1000us = 1ms */
+#define MVMDIO_SMI_POLL_INTERVAL_MIN 45
+#define MVMDIO_SMI_POLL_INTERVAL_MAX 55
+
struct orion_mdio_dev {
struct mutex lock;
void __iomem *regs;
@@ -68,34 +77,34 @@ static int orion_mdio_smi_is_done(struct orion_mdio_dev *dev)
static int orion_mdio_wait_ready(struct mii_bus *bus)
{
struct orion_mdio_dev *dev = bus->priv;
- int count;
+ unsigned long timeout = usecs_to_jiffies(MVMDIO_SMI_TIMEOUT);
+ unsigned long end = jiffies + timeout;
+ int timedout = 0;
- if (dev->err_interrupt <= 0) {
- count = 0;
- while (1) {
- if (orion_mdio_smi_is_done(dev))
+ while (1) {
+ if (orion_mdio_smi_is_done(dev))
+ return 0;
+ else
+ if (timedout)
break;
- if (count > 100) {
- dev_err(bus->parent,
- "Timeout: SMI busy for too long\n");
- return -ETIMEDOUT;
- }
+ if (dev->err_interrupt <= 0) {
+ usleep_range(MVMDIO_SMI_POLL_INTERVAL_MIN,
+ MVMDIO_SMI_POLL_INTERVAL_MAX);
- udelay(10);
- count++;
- }
- } else {
- if (!orion_mdio_smi_is_done(dev)) {
+ if (time_is_before_jiffies(end))
+ ++timedout;
+ } else {
wait_event_timeout(dev->smi_busy_wait,
- orion_mdio_smi_is_done(dev),
- msecs_to_jiffies(100));
- if (!orion_mdio_smi_is_done(dev))
- return -ETIMEDOUT;
- }
+ orion_mdio_smi_is_done(dev),
+ timeout);
+
+ ++timedout;
+ }
}
- return 0;
+ dev_err(bus->parent, "Timeout: SMI busy for too long\n");
+ return -ETIMEDOUT;
}
static int orion_mdio_read(struct mii_bus *bus, int mii_id,
--
1.7.10.4
^ permalink raw reply related
* [PATCH RFC v2 4/4] net: mvmdio: doc: mvmdio now used by mv643xx_eth
From: Leigh Brown @ 2013-10-24 18:09 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Leigh Brown, Thomas Petazzoni, netdev, sebastian.hesselbarth
In-Reply-To: <cover.1382637156.git.leigh@solinno.co.uk>
Amend the documentation in the mvmdio driver to note the fact
that it is now used by both the mvneta and mv643xx_eth drivers.
Signed-off-by: Leigh Brown <leigh@solinno.co.uk>
---
drivers/net/ethernet/marvell/mvmdio.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/marvell/mvmdio.c b/drivers/net/ethernet/marvell/mvmdio.c
index 13f4614..79b6d32 100644
--- a/drivers/net/ethernet/marvell/mvmdio.c
+++ b/drivers/net/ethernet/marvell/mvmdio.c
@@ -4,11 +4,9 @@
* Since the MDIO interface of Marvell network interfaces is shared
* between all network interfaces, having a single driver allows to
* handle concurrent accesses properly (you may have four Ethernet
- * ports, but they in fact share the same SMI interface to access the
- * MDIO bus). Moreover, this MDIO interface code is similar between
- * the mv643xx_eth driver and the mvneta driver. For now, it is only
- * used by the mvneta driver, but it could later be used by the
- * mv643xx_eth driver as well.
+ * ports, but they in fact share the same SMI interface to access
+ * the MDIO bus). This driver is currently used by the mvneta and
+ * mv643xx_eth drivers.
*
* Copyright (C) 2012 Marvell
*
--
1.7.10.4
^ permalink raw reply related
* [PATCH RFC v2 2/4] net: mvmdio: orion_mdio_ready: remove manual poll
From: Leigh Brown @ 2013-10-24 18:09 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Leigh Brown, Thomas Petazzoni, netdev, sebastian.hesselbarth
In-Reply-To: <cover.1382637156.git.leigh@solinno.co.uk>
Replace manual poll of MVMDIO_SMI_READ_VALID with a call to
orion_mdio_wait_ready. This ensures a consistent timeout,
eliminates a busy loop, and allows for use of interrupts on
systems that support them.
Signed-off-by: Leigh Brown <leigh@solinno.co.uk>
---
drivers/net/ethernet/marvell/mvmdio.c | 36 +++++++++++++--------------------
1 file changed, 14 insertions(+), 22 deletions(-)
diff --git a/drivers/net/ethernet/marvell/mvmdio.c b/drivers/net/ethernet/marvell/mvmdio.c
index 6ed6f00..f053475 100644
--- a/drivers/net/ethernet/marvell/mvmdio.c
+++ b/drivers/net/ethernet/marvell/mvmdio.c
@@ -111,43 +111,35 @@ static int orion_mdio_read(struct mii_bus *bus, int mii_id,
int regnum)
{
struct orion_mdio_dev *dev = bus->priv;
- int count;
u32 val;
int ret;
mutex_lock(&dev->lock);
ret = orion_mdio_wait_ready(bus);
- if (ret < 0) {
- mutex_unlock(&dev->lock);
- return ret;
- }
+ if (ret < 0)
+ goto out;
writel(((mii_id << MVMDIO_SMI_PHY_ADDR_SHIFT) |
(regnum << MVMDIO_SMI_PHY_REG_SHIFT) |
MVMDIO_SMI_READ_OPERATION),
dev->regs);
- /* Wait for the value to become available */
- count = 0;
- while (1) {
- val = readl(dev->regs);
- if (val & MVMDIO_SMI_READ_VALID)
- break;
-
- if (count > 100) {
- dev_err(bus->parent, "Timeout when reading PHY\n");
- mutex_unlock(&dev->lock);
- return -ETIMEDOUT;
- }
-
- udelay(10);
- count++;
+ ret = orion_mdio_wait_ready(bus);
+ if (ret < 0)
+ goto out;
+
+ val = readl(dev->regs);
+ if (!(val & MVMDIO_SMI_READ_VALID)) {
+ dev_err(bus->parent, "SMI bus read not valid\n");
+ ret = -ENODEV;
+ goto out;
}
+ ret = val & 0xFFFF;
+out:
mutex_unlock(&dev->lock);
-
- return val & 0xFFFF;
+ return ret;
}
static int orion_mdio_write(struct mii_bus *bus, int mii_id,
--
1.7.10.4
^ permalink raw reply related
* [PATCH RFC v2 3/4] net: mvmdio: slight optimisation of orion_mdio_write
From: Leigh Brown @ 2013-10-24 18:09 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Leigh Brown, Thomas Petazzoni, netdev, sebastian.hesselbarth
In-Reply-To: <cover.1382637156.git.leigh@solinno.co.uk>
Make only a single call to mutex_unlock in orion_mdio_write.
Signed-off-by: Leigh Brown <leigh@solinno.co.uk>
---
drivers/net/ethernet/marvell/mvmdio.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/marvell/mvmdio.c b/drivers/net/ethernet/marvell/mvmdio.c
index f053475..13f4614 100644
--- a/drivers/net/ethernet/marvell/mvmdio.c
+++ b/drivers/net/ethernet/marvell/mvmdio.c
@@ -151,10 +151,8 @@ static int orion_mdio_write(struct mii_bus *bus, int mii_id,
mutex_lock(&dev->lock);
ret = orion_mdio_wait_ready(bus);
- if (ret < 0) {
- mutex_unlock(&dev->lock);
- return ret;
- }
+ if (ret != 0)
+ goto out;
writel(((mii_id << MVMDIO_SMI_PHY_ADDR_SHIFT) |
(regnum << MVMDIO_SMI_PHY_REG_SHIFT) |
@@ -162,9 +160,9 @@ static int orion_mdio_write(struct mii_bus *bus, int mii_id,
(value << MVMDIO_SMI_DATA_SHIFT)),
dev->regs);
+out:
mutex_unlock(&dev->lock);
-
- return 0;
+ return ret;
}
static int orion_mdio_reset(struct mii_bus *bus)
--
1.7.10.4
^ permalink raw reply related
* Re: [PATCH net] netconsole: fix NULL pointer dereference
From: David Miller @ 2013-10-24 17:56 UTC (permalink / raw)
To: David.Laight; +Cc: vfalico, nikolay, netdev
In-Reply-To: <AE90C24D6B3A694183C094C60CF0A2F6026B73A9@saturn3.aculab.com>
From: "David Laight" <David.Laight@ACULAB.COM>
Date: Thu, 24 Oct 2013 11:39:02 +0100
>> >Taking the spinlock seems like the cleanest way to insure there's noone
>> >running in parallel, but I'm open to suggestions as I'm not satisfied with
>> >the looks of this. I'll prepare a net-next patchset for netconsole soon to
>> >clean it up properly, all of these can be easily simplified.
>>
>> First when I've seen 'spin_lock(); a = 1; spin_unlock()' I've thought
>> "WTF?", however indeed it will stop us racing with write_msg().
>
> Ditto - might be worth saying:
> /* Acquire lock to wait for any write_msg() to complete. */
Something this subtle definitely requires a comment.
^ permalink raw reply
* Re: [PATCHv2 net] netpoll: fix rx_hook() interface by passing the skb
From: David Miller @ 2013-10-24 17:53 UTC (permalink / raw)
To: David.Laight; +Cc: antonio, netdev
In-Reply-To: <AE90C24D6B3A694183C094C60CF0A2F6026B73A5@saturn3.aculab.com>
From: "David Laight" <David.Laight@ACULAB.COM>
Date: Thu, 24 Oct 2013 09:43:38 +0100
> From a code optimisation point of view you probably don't want to be
> calculating the source, offset and length early.
> It is quite likely that the local variables will have to be written
> to the stack (because of the function calls) - so it is almost
> certainly more efficient to calculate them just before the call.
But this change is being made from a bug prevention point of view,
we already we're already getting this code path wrong as-is.
^ permalink raw reply
* Re: [PATCH net] tcp: do not rearm RTO when future data are sacked
From: Neal Cardwell @ 2013-10-24 17:03 UTC (permalink / raw)
To: Yuchung Cheng; +Cc: David Miller, Eric Dumazet, Lawrence Brakmo, Netdev
In-Reply-To: <1382630367-21964-1-git-send-email-ycheng@google.com>
On Thu, Oct 24, 2013 at 11:59 AM, Yuchung Cheng <ycheng@google.com> wrote:
> Patch ed08495c3 "tcp: use RTT from SACK for RTO" always re-arms RTO upon
> obtaining a RTT sample from newly sacked data.
>
> But technically RTO should only be re-armed when the data sent before
> the last (re)transmission of write queue head are (s)acked. Otherwise
> the RTO may continue to extend during loss recovery on data sent
> in the future.
>
> Note that RTTs from ACK or timestamps do not have this problem, as the RTT
> source must be from data sent before.
>
> The new RTO re-arm policy is
> 1) Always re-arm RTO if SND.UNA is advanced
> 2) Re-arm RTO if sack RTT is available, provided the sacked data was
> sent before the last time write_queue_head was sent.
>
> Signed-off-by: Larry Brakmo <brakmo@google.com>
> Signed-off-by: Yuchung Cheng <ycheng@google.com>
> ---
> net/ipv4/tcp_input.c | 13 ++++++++++---
> 1 file changed, 10 insertions(+), 3 deletions(-)
Acked-by: Neal Cardwell <ncardwell@google.com>
neal
^ permalink raw reply
* Re: [PATCH net] tcp: only take RTT from timestamps if new data is acked
From: Neal Cardwell @ 2013-10-24 17:02 UTC (permalink / raw)
To: Yuchung Cheng; +Cc: David Miller, Eric Dumazet, Netdev
In-Reply-To: <1382630125-21416-1-git-send-email-ycheng@google.com>
On Thu, Oct 24, 2013 at 11:55 AM, Yuchung Cheng <ycheng@google.com> wrote:
> Patch ed08495c3 "tcp: use RTT from SACK for RTO" has a bug that
> it does not check if the ACK acknowledge new data before taking
> the RTT sample from TCP timestamps. This patch adds the check
> back as required by the RFC.
>
> Signed-off-by: Yuchung Cheng <ycheng@google.com>
> ---
> net/ipv4/tcp_input.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Acked-by: Neal Cardwell <ncardwell@google.com>
neal
^ permalink raw reply
* Re: [PATCH net] tcp: fix SYNACK RTT estimation in Fast Open
From: Neal Cardwell @ 2013-10-24 17:02 UTC (permalink / raw)
To: Yuchung Cheng; +Cc: David Miller, Eric Dumazet, panweiping3, Netdev
In-Reply-To: <1382629465-20310-1-git-send-email-ycheng@google.com>
On Thu, Oct 24, 2013 at 11:44 AM, Yuchung Cheng <ycheng@google.com> wrote:
> tp->lsndtime may not always be the SYNACK timestamp if a passive
> Fast Open socket sends data before handshake completes. And if the
> remote acknowledges both the data and the SYNACK, the RTT sample
> is already taken in tcp_ack(), so no need to call
> tcp_update_ack_rtt() in tcp_synack_rtt_meas() aagain.
>
> Signed-off-by: Yuchung Cheng <ycheng@google.com>
> ---
> net/ipv4/tcp_input.c | 18 +++++++++++++-----
> 1 file changed, 13 insertions(+), 5 deletions(-)
Acked-by: Neal Cardwell <ncardwell@google.com>
neal
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox