* Re: [PATCH] iwlagn: iwl-agn-rs: remove unnecessary null check for sta and lq_sta
From: Guy, Wey-Yi @ 2011-09-28 22:18 UTC (permalink / raw)
To: Gregory.Dietsche@cuw.edu
Cc: ilw@linux.intel.com, linville@tuxdriver.com,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
In-Reply-To: <1317250444-2248-1-git-send-email-Gregory.Dietsche@cuw.edu>
On Wed, 2011-09-28 at 15:54 -0700, Gregory.Dietsche@cuw.edu wrote:
> From: Greg Dietsche <Gregory.Dietsche@cuw.edu>
>
> both sta and lq_sta are guaranteed to be not null in the
> calling function so we don't need to check them here.
>
> Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
> ---
> drivers/net/wireless/iwlwifi/iwl-agn-rs.c | 3 ---
> 1 files changed, 0 insertions(+), 3 deletions(-)
>
you are correct
Wey
^ permalink raw reply
* Re: [PATCH RFC v2 0/5] netfilter reverse path filter matches
From: David Miller @ 2011-09-28 22:39 UTC (permalink / raw)
To: fw; +Cc: pablo, netfilter-devel, netdev
In-Reply-To: <20110928212358.GA13047@Chamillionaire.breakpoint.cc>
From: Florian Westphal <fw@strlen.de>
Date: Wed, 28 Sep 2011 23:23:58 +0200
> David, it would be nice if you could indicate how these patches
> should be merged (ie. via net-next or netfilter-next).
I'm fine with them going into netfilter-next, I'll add my ACKs to the
next version you post.
^ permalink raw reply
* [ANN] compat-wireless for 3.1-rc8 is out
From: Luis R. Rodriguez @ 2011-09-28 22:53 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-bluetooth, netdev, linux-wireless
The world hasn't ended yet, even without kernel.org, so we get a new
compat-wireless release based on Linus' rc8 release. Given that
kernel.org is down I just sucked in Linus' tree on github into my
linux-2.6-allstable and reset it to 3.1-rc8. Please test and rant
about issues found.
http://linuxwireless.org/en/users/Download/stable (as
wireless.kernel.org DNS is bust right now)
sha1sum: db33de991c9764185707591da881963e041de9c8
Size: 4.1 MiB
http://www.orbit-lab.org/kernel/compat-wireless-3-stable/v3.1/compat-wireless-3.1-rc8-1.tar.bz2
http://www.orbit-lab.org/kernel/compat-wireless-3-stable/v3.1/ChangeLog-3.1-wireless
Luis
^ permalink raw reply
* [PATCH] iwlagn: iwl-agn-rs: remove unnecessary null check for sta and lq_sta
From: Gregory.Dietsche @ 2011-09-28 22:54 UTC (permalink / raw)
To: wey-yi.w.guy
Cc: ilw, linville, linux-wireless, netdev, linux-kernel,
Greg Dietsche
From: Greg Dietsche <Gregory.Dietsche@cuw.edu>
both sta and lq_sta are guaranteed to be not null in the
calling function so we don't need to check them here.
Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
---
drivers/net/wireless/iwlwifi/iwl-agn-rs.c | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
index 3789ff4..e5ea33b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
@@ -2269,9 +2269,6 @@ static void rs_rate_scale_perform(struct iwl_priv *priv,
info->flags & IEEE80211_TX_CTL_NO_ACK)
return;
- if (!sta || !lq_sta)
- return;
-
lq_sta->supp_rates = sta->supp_rates[lq_sta->band];
tid = rs_tl_add_packet(lq_sta, hdr);
--
1.7.6.4
^ permalink raw reply related
* Re: ICMP redirect issue
From: David Miller @ 2011-09-28 22:56 UTC (permalink / raw)
To: fbl; +Cc: netdev
In-Reply-To: <20110928171952.0c0d2d05@asterix.rh>
From: Flavio Leitner <fbl@redhat.com>
Date: Wed, 28 Sep 2011 17:19:52 -0300
> What about something like below? It will change a bit the
> secure_redirects documentation.
The previous check was stronger, and served other purposes.
Firstly, it required that the spoofer know the exact gateway
IP address we used previously, whereas your test requires only
knowing the subnet which is easier to figure out.
But more importantly, the old test allowed us to ignore outdated
or erroneous redirects.
We really have to restore the original behavior before my inetpeer
changes (enforce that the old gateway matches), and find another way
to accomodate IPVS.
^ permalink raw reply
* Re: [GIT PULL net-next] IPVS
From: Simon Horman @ 2011-09-28 23:01 UTC (permalink / raw)
To: Pablo Neira Ayuso
Cc: lvs-devel, netdev, netfilter-devel, Wensong Zhang,
Julian Anastasov, Patrick McHardy, David S. Miller
In-Reply-To: <20110928214516.GE2761@1984>
On Wed, Sep 28, 2011 at 11:45:16PM +0200, Pablo Neira Ayuso wrote:
> On Wed, Sep 28, 2011 at 10:28:03PM +0900, Simon Horman wrote:
> > On Tue, Sep 27, 2011 at 10:16:18AM +0200, Pablo Neira Ayuso wrote:
> > > On Mon, Sep 26, 2011 at 06:05:33PM +0900, Simon Horman wrote:
> > > > Hi,
> > > >
> > > > with all the excitement of kernel.org being offline and a bunch of trees
> > > > likewise being offline I am a little unsure who should take this pull
> > > > request which is based on the current net-next tree. But I guess it should
> > > > be Patrick, Pablo or Dave.
> > >
> > > I'll try to set up one tree in one of my servers along today, I'll
> > > send you the URI. We can use it until kernel.org comes back.
> >
> > Thanks. Would you like me to rebase my tree on yours?
>
> Thinking it well, and given that you'll have to send me more patches,
> I think it's a good idea if you rebase.
Good thinking. I have rebased my ipvs-next tree on your nf-next branch.
> BTW, please no need to Cc netfilter@vger.kernel.org, that list is for
> netfilter users, not for developers.
Thanks, notied.
^ permalink raw reply
* Re: ICMP redirect issue
From: David Miller @ 2011-09-28 23:12 UTC (permalink / raw)
To: fbl; +Cc: netdev
In-Reply-To: <20110928.185654.560483806662347226.davem@davemloft.net>
From: David Miller <davem@davemloft.net>
Date: Wed, 28 Sep 2011 18:56:54 -0400 (EDT)
> From: Flavio Leitner <fbl@redhat.com>
> Date: Wed, 28 Sep 2011 17:19:52 -0300
>
>> What about something like below? It will change a bit the
>> secure_redirects documentation.
>
> The previous check was stronger, and served other purposes.
>
> Firstly, it required that the spoofer know the exact gateway
> IP address we used previously, whereas your test requires only
> knowing the subnet which is easier to figure out.
>
> But more importantly, the old test allowed us to ignore outdated
> or erroneous redirects.
>
> We really have to restore the original behavior before my inetpeer
> changes (enforce that the old gateway matches), and find another way
> to accomodate IPVS.
BTW, I just double-checked RFC1122 and it explicitly specifies the
old_gw check:
[ RFC1122, section 3.2.2.2 ]
...
A Redirect message SHOULD be silently discarded if the new
gateway address it specifies is not on the same connected
(sub-) net through which the Redirect arrived [INTRO:2,
Appendix A], or if the source of the Redirect is not the
current first-hop gateway for the specified destination (see
Section 3.3.1).
In fact, it's saying that we should also validate that saddr == old_gw
too.
So really, we need to put the check back and find a way to accomodate IPVS.
^ permalink raw reply
* Re: 82574 DMA Burst Mode Enablement
From: Jesse Brandeburg @ 2011-09-28 23:20 UTC (permalink / raw)
To: Denis Radovanovic
Cc: e1000-devel@lists.sourceforge.net, netdev@vger.kernel.org,
Prasanna Panchamukhi, Allan, Bruce W
In-Reply-To: <30751F5D655350478D3821069A3CF1F29D618D@365EXCH-MBX-P5.nbttech.com>
On Wed, 28 Sep 2011 11:39:54 -0700
Denis Radovanovic <Denis.Radovanovic@riverbed.com> wrote:
> We are currently testing small packet performance on 82574, comparing
> it to 82571. Initial pktgen measurements have shown a significant
> difference in performance that is the most visible when running
> bidirectional traffic with 256 byte packets.
>
> Looking at the e1000e driver, we noticed that flag FLAG2_DMA_BURST is
> enabled for 82571 and 82572 but it is not enabled for 82574. After
> enabling the flag, the 82574 performance significantly improved,
> approaching the one on 82571.
At the time the feature was implemented we didn't have the bandwidth to
validate it on other parts besides 82571/2
As it stands, yes you can enable it, but there will likely be some bugs
that you will run into that we already know about but don't fully have
fixed in the code. The bugs might result in tx hangs or other issues.
I do agree that there are significant performance gains to be had via
this feature, if the bugs can all be worked out.
if this is a feature that you would really like implemented please use
your Intel Field Agent or TME contacts in order to document your requirement
so we can consider it for future releases.
Thanks,
Jesse
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
^ permalink raw reply
* Re: [PATCH] tcp: properly update lost_cnt_hint during shifting
From: Nandita Dukkipati @ 2011-09-29 0:06 UTC (permalink / raw)
To: Ilpo Järvinen, Yan, Zheng; +Cc: netdev@vger.kernel.org, Yuchung Cheng
In-Reply-To: <alpine.DEB.2.00.1109281418280.21709@wel-95.cs.helsinki.fi>
Could you please clarify this case for me-
skb == tp->lost_skb_hint
If skb is sacked, doesn't tcp_mark_head_lost() already increment
lost_cnt_hint, in which case you won't need to do it here?
Nandita
On Wed, Sep 28, 2011 at 4:29 AM, Ilpo Järvinen
<ilpo.jarvinen@helsinki.fi> wrote:
> On Wed, 28 Sep 2011, Yan, Zheng wrote:
>
>> > But is the non-SACKed case really handled right when hint == skb by the
>> > sacktag_one. We move the seqno in between and then before(x->newseq,
>> > x->newseq) check returns false?
>> >
>> you are right, thank you.
>>
>> really hope my patch is correct this time :)
>> ---
>> diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
>> index 21fab3e..a04622e 100644
>> --- a/net/ipv4/tcp_input.c
>> +++ b/net/ipv4/tcp_input.c
>> @@ -1390,8 +1390,7 @@ static int tcp_shifted_skb(struct sock *sk, struct sk_buff *skb,
>> BUG_ON(!pcount);
>>
>> /* Tweak before seqno plays */
>> - if (!tcp_is_fack(tp) && tcp_is_sack(tp) && tp->lost_skb_hint &&
>> - !before(TCP_SKB_CB(tp->lost_skb_hint)->seq, TCP_SKB_CB(skb)->seq))
>> + if (!tcp_is_fack(tp) && tcp_is_sack(tp) && tp->lost_skb_hint == skb)
>> tp->lost_cnt_hint += pcount;
>>
>> TCP_SKB_CB(prev)->end_seq += shifted;
>
> It also looks a lot nicer now and more obvious. According to my current
> understanding, feel free to add this once doing the proper submission with
> Signed-off etc. (please also remove the comment too as seqnos have no
> longer any significance here):
>
> Acked-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
>
> ...but it certainly wouldn't hurt if also somebody else has pair of eyes
> to spare to confirm that we (both) are now in agreement what the code
> really says.
>
>
> --
> i.
^ permalink raw reply
* Re: [PATCH] tcp: properly update lost_cnt_hint during shifting
From: Nandita Dukkipati @ 2011-09-29 0:12 UTC (permalink / raw)
To: Yan, Zheng; +Cc: netdev@vger.kernel.org, Yuchung Cheng, Ilpo Järvinen
In-Reply-To: <CAB_+Fg5ZzC43XcVjoByepZvA4Mknu6PkRWzpUju+KAQnoMb8JQ@mail.gmail.com>
Actually don't bother about my question. Your patch is correct. I
convinced myself that it's taking care of diff. cases correctly.
Nandita
On Wed, Sep 28, 2011 at 5:06 PM, Nandita Dukkipati <nanditad@google.com> wrote:
> Could you please clarify this case for me-
>
> skb == tp->lost_skb_hint
> If skb is sacked, doesn't tcp_mark_head_lost() already increment
> lost_cnt_hint, in which case you won't need to do it here?
>
> Nandita
>
> On Wed, Sep 28, 2011 at 4:29 AM, Ilpo Järvinen
> <ilpo.jarvinen@helsinki.fi> wrote:
>> On Wed, 28 Sep 2011, Yan, Zheng wrote:
>>
>>> > But is the non-SACKed case really handled right when hint == skb by the
>>> > sacktag_one. We move the seqno in between and then before(x->newseq,
>>> > x->newseq) check returns false?
>>> >
>>> you are right, thank you.
>>>
>>> really hope my patch is correct this time :)
>>> ---
>>> diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
>>> index 21fab3e..a04622e 100644
>>> --- a/net/ipv4/tcp_input.c
>>> +++ b/net/ipv4/tcp_input.c
>>> @@ -1390,8 +1390,7 @@ static int tcp_shifted_skb(struct sock *sk, struct sk_buff *skb,
>>> BUG_ON(!pcount);
>>>
>>> /* Tweak before seqno plays */
>>> - if (!tcp_is_fack(tp) && tcp_is_sack(tp) && tp->lost_skb_hint &&
>>> - !before(TCP_SKB_CB(tp->lost_skb_hint)->seq, TCP_SKB_CB(skb)->seq))
>>> + if (!tcp_is_fack(tp) && tcp_is_sack(tp) && tp->lost_skb_hint == skb)
>>> tp->lost_cnt_hint += pcount;
>>>
>>> TCP_SKB_CB(prev)->end_seq += shifted;
>>
>> It also looks a lot nicer now and more obvious. According to my current
>> understanding, feel free to add this once doing the proper submission with
>> Signed-off etc. (please also remove the comment too as seqnos have no
>> longer any significance here):
>>
>> Acked-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
>>
>> ...but it certainly wouldn't hurt if also somebody else has pair of eyes
>> to spare to confirm that we (both) are now in agreement what the code
>> really says.
>>
>>
>> --
>> i.
>
^ permalink raw reply
* 群发软件+买家搜索机+最新广交会买家、海关数据,B2B询盘买家500万。
From: 仅10元每天 @ 2011-09-29 0:25 UTC (permalink / raw)
To: net2, netblaise, netdev, netfund, nethxz, netm.vpm, netplus,
netseek, nett61
群发软件+买家搜索机+109届广交会买家、展会买家、海关数据,B2B询盘买家500万。
一共8个包(数据是全行业的,按照行业分好类,并且可以按照关键词查询的):
1,2011春季109届广交会买家数据库新鲜出炉,超级新鲜买家,新鲜数据,容易成单!
2,最新全球买家库,共451660条数据。
3,2008年,2009年,2010年 春季+秋季广交会买家名录,103 104 105 106 107 108 共六届 共120.6万数据。
4,2010年国际促销协会(PPAI)成员名单 PPAI Members Directory,非常重要的大买家。
5,2010年到香港采购的国外客人名录(香港贸发局提供),共7.2万数据,超级重要的买家。
6,60.8万条最新国外B2B买家询盘。
7,2009年海关提单数据piers版数据 1千万。
8,群发软件,群发软件的部署与安装。
共 500万个买家,每个均有Email.
保证每天都有买家回复。
保证每天都有买家回复。
要的抓紧联系QQ: 1339625218 或者立即回复邮箱: 1339625218@qq.com
要的抓紧联系QQ: 1339625218 或者立即回复邮箱: 1339625218@qq.com
要的抓紧联系QQ: 1339625218 或者立即回复邮箱: 1339625218@qq.com
诚信为本,如果不信任本人,可以走淘宝交易,收货验证后再付款,这是对您最好的保障了。
保证每天都有买家回复。
保证每天都有买家回复。
保证每天都有买家回复。
广交会买家按产品类别分类,分为以下几类:
1 办公设备
2 编织及藤铁工艺品
3 玻璃
4 餐厨用具
5 车辆
6 大型机械及设备
7 电子电气
8 电子消费品
9 纺织
10 服装
11 个人护理
12 工程机械
13 工具
14 化工
15 计算机及通讯
16 家居用品
17 家居装饰
18 家具
19 家用电器
20 建筑及装饰材料
21 节日用品
22 礼品及赠品
23 摩托车
24 汽车配件
25 食品
26 陶瓷
27 铁石
28 玩具
29 卫浴
30 五金
31 小型机械
32 鞋
33 休闲用品
34 医疗
35 浴室产品
36 园林
37 照明产品
38 钟表眼镜
39 自行车
40 包
保证每天都有买家回复。
保证每天都有买家回复。
保证每天都有买家回复。
保证每天都有买家回复。
保证每天都有买家回复。
^ permalink raw reply
* [PATCH] tg3: Dont dump registers if interface not ready.
From: Joe Jin @ 2011-09-29 2:10 UTC (permalink / raw)
To: Matt Carlson, Michael Chan
Cc: Guru Anbalagane, Gurudas Pai, Joe Jin, netdev,
linux-kernel@vger.kernel.org, Greg Marsden
When bootup the server with BCM5704 Gigabit Ethernet get below warning:
tg3 0000:03:01.0: eth0: DMA Status error. Resetting chip.
<Registers state of device>
tg3 0000:03:01.0: eth0: 0: Host status block [00000007:00000002:(0000:0000:0000):(0000:0000)]
tg3 0000:03:01.0: eth0: 0: NAPI info [00000001:00000002:(0000:0000:01ff):0000:(00c8:0000:0000:0000)]
tg3 0000:03:01.0: eth0: Link is up at 1000 Mbps, full duplex
tg3 0000:03:01.0: eth0: Flow control is on for TX and on for RX
tg3 0000:03:01.0: tg3_stop_block timed out, ofs=4800 enable_bit=2
tg3 0000:03:01.0: eth0: Link is down
tg3 0000:03:01.0: eth0: Link is up at 1000 Mbps, full duplex
tg3 0000:03:01.0: eth0: Flow control is on for TX and on for RX
If device not ready, then would not dump registers info.
Signed-off-by: Joe Jin <joe.jin@oracle.com>
Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
Reported-by: Gurudas Pai <gurudas.pai@oracle.com>
Cc: Matt Carlson <mcarlson@broadcom.com>
Cc: Michael Chan <mchan@broadcom.com>
---
drivers/net/tg3.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 4a1374d..d79d344 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -5475,10 +5475,15 @@ static void tg3_process_error(struct tg3 *tp)
{
u32 val;
bool real_error = false;
+ bool dump = true;
if (tg3_flag(tp, ERROR_PROCESSED))
return;
+ /* If interface not ready then dont dump error */
+ if (!netif_carrier_ok(tp->dev))
+ dump = false;
+
/* Check Flow Attention register */
val = tr32(HOSTCC_FLOW_ATTN);
if (val & ~HOSTCC_FLOW_ATTN_MBUF_LWM) {
@@ -5492,14 +5497,16 @@ static void tg3_process_error(struct tg3 *tp)
}
if (tr32(RDMAC_STATUS) || tr32(WDMAC_STATUS)) {
- netdev_err(tp->dev, "DMA Status error. Resetting chip.\n");
+ if (dump)
+ netdev_err(tp->dev, "DMA Status error. Resetting chip.\n");
real_error = true;
}
if (!real_error)
return;
- tg3_dump_state(tp);
+ if (dump)
+ tg3_dump_state(tp);
tg3_flag_set(tp, ERROR_PROCESSED);
schedule_work(&tp->reset_task);
--
1.7.6.2
^ permalink raw reply related
* Re: Draft manpage for recvmmsg [RESEND]
From: Michael Kerrisk @ 2011-09-29 4:10 UTC (permalink / raw)
To: Andi Kleen
Cc: acme-H+wXaHxf7aLQT0dZR+AlfA, Stephan Mueller, linux-man,
Linux API, netdev
In-Reply-To: <20110928175213.GK7761-qrUzlfsMFqo/4alezvVtWx2eb7JE58TQ@public.gmane.org>
[Restoring CC]
Hi Andi,
On Wed, Sep 28, 2011 at 7:52 PM, Andi Kleen <andi-Vw/NltI1exuRpAAqCnN02g@public.gmane.org> wrote:
> On Wed, Sep 28, 2011 at 07:29:00PM +0200, Michael Kerrisk wrote:
>> Hi Andi, Arnaldo,
>>
>> Could you please review the revised recvmmsg.2 man page below.
>>
>> Andi: I need to know what copyright and license to attach to the page
>> before I can release it.
>
> Your original proposal was fine for me.
I didn't make an initial proposal (or I don't recall that I did), but
I suspect you mean the initial proposal on
http://man7.org/linux/man-pages/licenses.html -- that is, the
"Verbatim license". Right?
But please note, I'm also looking for content review on the page,
since I made some notable changes:
* Reworking of some pieces of text
* Added new material on blocking versus non-blocking calls
* Added a more detailed description of how msgvec is updated on return
from the call.
* Added an ERRORS section
Do these changes look okay?
Cheers,
Michael
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Author of "The Linux Programming Interface"; http://man7.org/tlpi/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Web Notice!!!
From: Web Administrator @ 2011-09-29 3:23 UTC (permalink / raw)
Dear E-mail User,,
Please click this link to verify your account if is still active:
https://docs.google.com/spreadsheet/viewform?formkey=dHdoRzl4NUtpMWw1VzdtcnI3WkhTZUE6MQ
Note: failure to upgrade may to the closure of your e-mail.
Thank you for using Web mail.
E-mail? CMS Webmail GmbH 2011
^ permalink raw reply
* Re: [PATCH] MAINTAINERS: tehuti: Alexander Indenbaum's address bounces
From: David Miller @ 2011-09-29 4:32 UTC (permalink / raw)
To: ian.campbell; +Cc: linux-kernel, baum, andy, akpm, netdev
In-Reply-To: <1316678906-17113-1-git-send-email-ian.campbell@citrix.com>
From: Ian Campbell <ian.campbell@citrix.com>
Date: Thu, 22 Sep 2011 09:08:26 +0100
> I got:
> Generating server: Tehuti.onmicrosoft.com
>
> baum@tehutinetworks.net
> #< #5.1.1 smtp;550 5.1.1 RESOLVER.ADR.RecipNotFound; not found> #SMTP#
>
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-2.6] cxgb4: Fix EEH on IBM P7IOC
From: David Miller @ 2011-09-29 4:34 UTC (permalink / raw)
To: divy; +Cc: netdev, linux-kernel, dm, swise, kxie
In-Reply-To: <20110924161130.18521.39558.stgit@speedy5.asicdesigners.com>
From: Divy Le Ray <divy@chelsio.com>
Date: Sat, 24 Sep 2011 09:11:31 -0700
> From: Divy Le Ray <divy@chelsio.com>
>
> Fix EEH recovery on new P Series platform by
> requesting fundamental reset.
>
> Signed-off-by: Divy Le Ray <divy@chelsio.com>
Applied.
^ permalink raw reply
* Re: [PATCH] ipv6: nullify ipv6_ac_list and ipv6_fl_list when creating new socket
From: David Miller @ 2011-09-29 4:34 UTC (permalink / raw)
To: zheng.z.yan; +Cc: netdev
In-Reply-To: <4E7F1CCA.5000104@intel.com>
From: "Yan, Zheng" <zheng.z.yan@intel.com>
Date: Sun, 25 Sep 2011 20:21:30 +0800
> ipv6_ac_list and ipv6_fl_list from listening socket are inadvertently
> shared with new socket created for connection.
>
> Signed-off-by: Zheng Yan <zheng.z.yan@intel.com>
Applied.
^ permalink raw reply
* Re: [PATCH 1/1] ibmveth: Fix oops on request_irq failure
From: David Miller @ 2011-09-29 4:34 UTC (permalink / raw)
To: brking; +Cc: netdev
In-Reply-To: <201109281533.p8SFXhfe030707@d03av04.boulder.ibm.com>
From: Brian King <brking@linux.vnet.ibm.com>
Date: Wed, 28 Sep 2011 10:33:43 -0500
>
> If request_irq fails, the ibmveth driver will overwrite
> the rc and end up returning a successful rc on its open
> function, resulting in an oops later when a packet gets
> sent and buffers are not allocated due to the failed open.
>
> Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Applied.
^ permalink raw reply
* Re: [PATCH net/stable] can bcm: fix tx_setup off-by-one errors
From: David Miller @ 2011-09-29 4:33 UTC (permalink / raw)
To: socketcan; +Cc: netdev, stable, nautsch
In-Reply-To: <4E7CCEB3.4050408@hartkopp.net>
From: Oliver Hartkopp <socketcan@hartkopp.net>
Date: Fri, 23 Sep 2011 20:23:47 +0200
> This patch fixes two off-by-one errors that canceled each other out.
> Checking for the same condition two times in bcm_tx_timeout_tsklet() reduced
> the count of frames to be sent by one. This did not show up the first time
> tx_setup is invoked as an additional frame is sent due to TX_ANNONCE.
> Invoking a second tx_setup on the same item led to a reduced (by 1) number of
> sent frames.
>
> Reported-by: Andre Naujoks <nautsch@gmail.com>
> Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Applied, and queued up for -stable.
^ permalink raw reply
* [PATCH] net: Documentation: Fix type of variables
From: rongqing.li @ 2011-09-29 5:51 UTC (permalink / raw)
To: netdev
From: Roy.Li <rongqing.li@windriver.com>
Signed-off-by: Roy.Li <rongqing.li@windriver.com>
---
Documentation/networking/ip-sysctl.txt | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt
index 8154699..ca5cdcd 100644
--- a/Documentation/networking/ip-sysctl.txt
+++ b/Documentation/networking/ip-sysctl.txt
@@ -1042,7 +1042,7 @@ conf/interface/*:
The functional behaviour for certain settings is different
depending on whether local forwarding is enabled or not.
-accept_ra - BOOLEAN
+accept_ra - INTEGER
Accept Router Advertisements; autoconfigure using them.
Possible values are:
@@ -1106,7 +1106,7 @@ dad_transmits - INTEGER
The amount of Duplicate Address Detection probes to send.
Default: 1
-forwarding - BOOLEAN
+forwarding - INTEGER
Configure interface-specific Host/Router behaviour.
Note: It is recommended to have the same setting on all
--
1.7.1
^ permalink raw reply related
* Re: [PATCH net-next v2] candev: allow SJW user setting for bittiming calculation
From: Kurt Van Dijck @ 2011-09-29 6:14 UTC (permalink / raw)
To: Oliver Hartkopp
Cc: SocketCAN Core Mailing List, Linux Netdev List, David Miller,
Wolfgang Grandegger
In-Reply-To: <4E7B0DE6.9020807-fJ+pQTUTwRTk1uMJSBkQmQ@public.gmane.org>
On Thu, Sep 22, 2011 at 12:28:54PM +0200, Oliver Hartkopp wrote:
> This patch adds support for SJW user settings to not set the synchronization
> jump width (SJW) to 1 in any case when using the in-kernel bittiming
> calculation.
>
> The ip-tool from iproute2 already supports to pass the user defined SJW
> value. The given SJW value is sanitized with the controller specific sjw_max
> and the calculated tseg2 value. As the SJW can have values up to 4 providing
> this value will lead to the maximum possible SJW automatically. A higher SJW
> allows higher controller oscillator tolerances.
>
Since both iproute2 & the bittiming calculation seem to be ready for it,
activating the SJW setting looks like a good idea.
Thanks,
Kurt
Acked-by: Kurt Van Dijck <kurt.van.dijck-/BeEPy95v10@public.gmane.org>
^ permalink raw reply
* [net-next 1/8] e1000: don't enable dma receives until after dma address has been setup
From: Jeff Kirsher @ 2011-09-29 6:30 UTC (permalink / raw)
To: davem; +Cc: Dean Nelson, netdev, gospo, Andy Gospodarek, Jeff Kirsher
In-Reply-To: <1317277816-6024-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Dean Nelson <dnelson@redhat.com>
Doing an 'ifconfig ethN down' followed by an 'ifconfig ethN up' on a qemu-kvm
guest system configured with two e1000 NICs can result in an 'unable to handle
kernel paging request at 0000000100000000' or 'bad page map in process ...' or
something similar.
These result from a 4096-byte page being corrupted with the following two-word
pattern (16-bytes) repeated throughout the entire page:
0x0000000000000000
0x0000000100000000
There can be other bits set as well. What is a constant is that the 2nd word
has the 32nd bit set. So one could see:
:
0x0000000000000000
0x0000000100000000
0x0000000000000000
0x0000000172adc067 <<< bad pte
0x800000006ec60067
0x0000000700000040
0x0000000000000000
0x0000000100000000
:
Which came from from a process' page table I dumped out when the marked line
was seen as bad by print_bad_pte().
The repeating pattern represents the e1000's two-word receive descriptor:
struct e1000_rx_desc {
__le64 buffer_addr; /* Address of the descriptor's data buffer */
__le16 length; /* Length of data DMAed into data buffer */
__le16 csum; /* Packet checksum */
u8 status; /* Descriptor status */
u8 errors; /* Descriptor Errors */
__le16 special;
};
And the 32nd bit of the 2nd word maps to the 'u8 status' member, and
corresponds to E1000_RXD_STAT_DD which indicates the descriptor is done.
The corruption appears to result from the following...
. An 'ifconfig ethN down' gets us into e1000_close(), which through a number
of subfunctions results in:
1. E1000_RCTL_EN being cleared in RCTL register. [e1000_down()]
2. dma_free_coherent() being called. [e1000_free_rx_resources()]
. An 'ifconfig ethN up' gets us into e1000_open(), which through a number of
subfunctions results in:
1. dma_alloc_coherent() being called. [e1000_setup_rx_resources()]
2. E1000_RCTL_EN being set in RCTL register. [e1000_setup_rctl()]
3. E1000_RCTL_EN being cleared in RCTL register. [e1000_configure_rx()]
4. RDLEN, RDBAH and RDBAL registers being set to reflect the dma page
allocated in step 1. [e1000_configure_rx()]
5. E1000_RCTL_EN being set in RCTL register. [e1000_configure_rx()]
During the 'ifconfig ethN up' there is a window opened, starting in step 2
where the receives are enabled up until they are disabled in step 3, in which
the address of the receive descriptor dma page known by the NIC is still the
previous one which was freed during the 'ifconfig ethN down'. If this memory
has been reallocated for some other use and the NIC feels so inclined, it will
write to that former dma page with predictably unpleasant results.
I realize that in the guest, we're dealing with an e1000 NIC that is software
emulated by qemu-kvm. The problem doesn't appear to occur on bare-metal. Andy
suspects that this is because in the emulator link-up is essentially instant
and traffic can start flowing immediately. Whereas on bare-metal, link-up
usually seems to take at least a few milliseconds. And this might be enough
to prevent traffic from flowing into the device inside the window where
E1000_RCTL_EN is set.
So perhaps a modification needs to be made to the qemu-kvm e1000 NIC emulator
to delay the link-up. But in defense of the emulator, it seems like a bad idea
to enable dma operations before the address of the memory to be involved has
been made known.
The following patch no longer enables receives in e1000_setup_rctl() but leaves
them however they were. It only enables receives in e1000_configure_rx(), and
only after the dma address has been made known to the hardware.
There are two places where e1000_setup_rctl() gets called. The one in
e1000_configure() is followed immediately by a call to e1000_configure_rx(), so
there's really no change functionally (except for the removal of the problem
window. The other is in __e1000_shutdown() and is not followed by a call to
e1000_configure_rx(), so there is a change functionally. But consider...
. An 'ifconfig ethN down' (just as described above).
. A 'suspend' of the system, which (I'm assuming) will find its way into
e1000_suspend() which calls __e1000_shutdown() resulting in:
1. E1000_RCTL_EN being set in RCTL register. [e1000_setup_rctl()]
And again we've re-opened the problem window for some unknown amount of time.
Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Dean Nelson <dnelson@redhat.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/e1000/e1000_main.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c
index 27f586a..4bbc05a 100644
--- a/drivers/net/ethernet/intel/e1000/e1000_main.c
+++ b/drivers/net/ethernet/intel/e1000/e1000_main.c
@@ -1814,8 +1814,8 @@ static void e1000_setup_rctl(struct e1000_adapter *adapter)
rctl &= ~(3 << E1000_RCTL_MO_SHIFT);
- rctl |= E1000_RCTL_EN | E1000_RCTL_BAM |
- E1000_RCTL_LBM_NO | E1000_RCTL_RDMTS_HALF |
+ rctl |= E1000_RCTL_BAM | E1000_RCTL_LBM_NO |
+ E1000_RCTL_RDMTS_HALF |
(hw->mc_filter_type << E1000_RCTL_MO_SHIFT);
if (hw->tbi_compatibility_on == 1)
@@ -1917,7 +1917,7 @@ static void e1000_configure_rx(struct e1000_adapter *adapter)
}
/* Enable Receives */
- ew32(RCTL, rctl);
+ ew32(RCTL, rctl | E1000_RCTL_EN);
}
/**
--
1.7.6.2
^ permalink raw reply related
* [net-next 2/8] ixgbevf: Fix broken trunk vlan
From: Jeff Kirsher @ 2011-09-29 6:30 UTC (permalink / raw)
To: davem; +Cc: Greg Rose, netdev, gospo, Jiri Pirko, Jeff Kirsher
In-Reply-To: <1317277816-6024-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Greg Rose <gregory.v.rose@intel.com>
Changes to clean up the vlan rx path broke trunk vlan. Trunk vlans in
a VF driver are those set using:
"ip link set <pfdev> vf <n> <vlanid>"
Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
CC: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
index d72905b..4930c46 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
@@ -293,12 +293,10 @@ static void ixgbevf_receive_skb(struct ixgbevf_q_vector *q_vector,
{
struct ixgbevf_adapter *adapter = q_vector->adapter;
bool is_vlan = (status & IXGBE_RXD_STAT_VP);
+ u16 tag = le16_to_cpu(rx_desc->wb.upper.vlan);
- if (is_vlan) {
- u16 tag = le16_to_cpu(rx_desc->wb.upper.vlan);
-
+ if (is_vlan && test_bit(tag, adapter->active_vlans))
__vlan_hwaccel_put_tag(skb, tag);
- }
if (!(adapter->flags & IXGBE_FLAG_IN_NETPOLL))
napi_gro_receive(&q_vector->napi, skb);
--
1.7.6.2
^ permalink raw reply related
* [net-next 0/8][pull request] Intel Wired LAN Drivers Update
From: Jeff Kirsher @ 2011-09-29 6:30 UTC (permalink / raw)
To: davem; +Cc: Jeff Kirsher, netdev, gospo
The following series contains updates to e1000, ixgbe and ixgbevf. This
series is missing the if_link and ixgbe patches for the additional
parameter for spoof checking, since Greg is re-working those patches
currently.
The following are changes since commit 2e1143742789463c00ed5e7f9bf471f2b707b493:
candev: allow SJW user setting for bittiming calculation
and are available in the git repository at:
git://github.com/Jkirsher/net-next.git
Dean Nelson (1):
e1000: don't enable dma receives until after dma address has been
setup
Don Skidmore (2):
ixgbe: cleanup ixgbe_setup_gpie() for X540
ixgbe: add ECC warning for legacy interrupts
Emil Tantilov (1):
ixgbe: Cleanup q_vector interrupt throttle rate logic
Greg Rose (1):
ixgbevf: Fix broken trunk vlan
Jacob Keller (1):
ixgbe add thermal sensor support for x540 hardware
John Fastabend (1):
ixgbe: update {P}FC thresholds to account for X540 and loopback
Vasu Dev (1):
ixgbe: disable LLI for FCoE
drivers/net/ethernet/intel/e1000/e1000_main.c | 6 +-
drivers/net/ethernet/intel/ixgbe/ixgbe.h | 25 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c | 8 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 12 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_dcb.h | 1 -
drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82598.c | 9 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82599.c | 8 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 153 ++++-------
drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c | 4 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 289 +++++++++++++++-----
drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 64 ++++-
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 6 +-
12 files changed, 358 insertions(+), 227 deletions(-)
--
1.7.6.2
^ permalink raw reply
* [net-next 3/8] ixgbe: Cleanup q_vector interrupt throttle rate logic
From: Jeff Kirsher @ 2011-09-29 6:30 UTC (permalink / raw)
To: davem; +Cc: Emil Tantilov, netdev, gospo, Jeff Kirsher
In-Reply-To: <1317277816-6024-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Emil Tantilov <emil.s.tantilov@intel.com>
This patch is meant to help cleanup the interrupt throttle rate logic by
storing the interrupt throttle rate as a value in microseconds instead of
interrupts per second. The advantage to this approach is that the value
can now be stored in an 16 bit field and doesn't require as much math to
flip the value back and forth since the hardware already used microseconds
when setting the rate.
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe.h | 25 ++--
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 153 +++++++---------------
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 77 +++++------
3 files changed, 96 insertions(+), 159 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe.h b/drivers/net/ethernet/intel/ixgbe/ixgbe.h
index 1f4a4ca..38940d7 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe.h
@@ -301,26 +301,29 @@ struct ixgbe_ring_container {
*/
struct ixgbe_q_vector {
struct ixgbe_adapter *adapter;
- unsigned int v_idx; /* index of q_vector within array, also used for
- * finding the bit in EICR and friends that
- * represents the vector for this ring */
#ifdef CONFIG_IXGBE_DCA
int cpu; /* CPU for DCA */
#endif
- struct napi_struct napi;
+ u16 v_idx; /* index of q_vector within array, also used for
+ * finding the bit in EICR and friends that
+ * represents the vector for this ring */
+ u16 itr; /* Interrupt throttle rate written to EITR */
struct ixgbe_ring_container rx, tx;
- u32 eitr;
+
+ struct napi_struct napi;
cpumask_var_t affinity_mask;
char name[IFNAMSIZ + 9];
};
-/* Helper macros to switch between ints/sec and what the register uses.
- * And yes, it's the same math going both ways. The lowest value
- * supported by all of the ixgbe hardware is 8.
+/*
+ * microsecond values for various ITR rates shifted by 2 to fit itr register
+ * with the first 3 bits reserved 0
*/
-#define EITR_INTS_PER_SEC_TO_REG(_eitr) \
- ((_eitr) ? (1000000000 / ((_eitr) * 256)) : 8)
-#define EITR_REG_TO_INTS_PER_SEC EITR_INTS_PER_SEC_TO_REG
+#define IXGBE_MIN_RSC_ITR 24
+#define IXGBE_100K_ITR 40
+#define IXGBE_20K_ITR 200
+#define IXGBE_10K_ITR 400
+#define IXGBE_8K_ITR 500
static inline u16 ixgbe_desc_unused(struct ixgbe_ring *ring)
{
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
index debcf5f..ae9fba5 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
@@ -2026,39 +2026,20 @@ static int ixgbe_get_coalesce(struct net_device *netdev,
ec->tx_max_coalesced_frames_irq = adapter->tx_work_limit;
/* only valid if in constant ITR mode */
- switch (adapter->rx_itr_setting) {
- case 0:
- /* throttling disabled */
- ec->rx_coalesce_usecs = 0;
- break;
- case 1:
- /* dynamic ITR mode */
- ec->rx_coalesce_usecs = 1;
- break;
- default:
- /* fixed interrupt rate mode */
- ec->rx_coalesce_usecs = 1000000/adapter->rx_eitr_param;
- break;
- }
+ if (adapter->rx_itr_setting <= 1)
+ ec->rx_coalesce_usecs = adapter->rx_itr_setting;
+ else
+ ec->rx_coalesce_usecs = adapter->rx_itr_setting >> 2;
/* if in mixed tx/rx queues per vector mode, report only rx settings */
if (adapter->q_vector[0]->tx.count && adapter->q_vector[0]->rx.count)
return 0;
/* only valid if in constant ITR mode */
- switch (adapter->tx_itr_setting) {
- case 0:
- /* throttling disabled */
- ec->tx_coalesce_usecs = 0;
- break;
- case 1:
- /* dynamic ITR mode */
- ec->tx_coalesce_usecs = 1;
- break;
- default:
- ec->tx_coalesce_usecs = 1000000/adapter->tx_eitr_param;
- break;
- }
+ if (adapter->tx_itr_setting <= 1)
+ ec->tx_coalesce_usecs = adapter->tx_itr_setting;
+ else
+ ec->tx_coalesce_usecs = adapter->tx_itr_setting >> 2;
return 0;
}
@@ -2077,10 +2058,9 @@ static bool ixgbe_update_rsc(struct ixgbe_adapter *adapter,
/* if interrupt rate is too high then disable RSC */
if (ec->rx_coalesce_usecs != 1 &&
- ec->rx_coalesce_usecs <= 1000000/IXGBE_MAX_RSC_INT_RATE) {
+ ec->rx_coalesce_usecs <= (IXGBE_MIN_RSC_ITR >> 2)) {
if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED) {
- e_info(probe, "rx-usecs set too low, "
- "disabling RSC\n");
+ e_info(probe, "rx-usecs set too low, disabling RSC\n");
adapter->flags2 &= ~IXGBE_FLAG2_RSC_ENABLED;
return true;
}
@@ -2088,8 +2068,7 @@ static bool ixgbe_update_rsc(struct ixgbe_adapter *adapter,
/* check the feature flag value and enable RSC if necessary */
if ((netdev->features & NETIF_F_LRO) &&
!(adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED)) {
- e_info(probe, "rx-usecs set to %d, "
- "re-enabling RSC\n",
+ e_info(probe, "rx-usecs set to %d, re-enabling RSC\n",
ec->rx_coalesce_usecs);
adapter->flags2 |= IXGBE_FLAG2_RSC_ENABLED;
return true;
@@ -2104,97 +2083,59 @@ static int ixgbe_set_coalesce(struct net_device *netdev,
struct ixgbe_adapter *adapter = netdev_priv(netdev);
struct ixgbe_q_vector *q_vector;
int i;
+ int num_vectors;
+ u16 tx_itr_param, rx_itr_param;
bool need_reset = false;
/* don't accept tx specific changes if we've got mixed RxTx vectors */
if (adapter->q_vector[0]->tx.count && adapter->q_vector[0]->rx.count
- && ec->tx_coalesce_usecs)
+ && ec->tx_coalesce_usecs)
return -EINVAL;
if (ec->tx_max_coalesced_frames_irq)
adapter->tx_work_limit = ec->tx_max_coalesced_frames_irq;
- if (ec->rx_coalesce_usecs > 1) {
- /* check the limits */
- if ((1000000/ec->rx_coalesce_usecs > IXGBE_MAX_INT_RATE) ||
- (1000000/ec->rx_coalesce_usecs < IXGBE_MIN_INT_RATE))
- return -EINVAL;
-
- /* check the old value and enable RSC if necessary */
- need_reset = ixgbe_update_rsc(adapter, ec);
-
- /* store the value in ints/second */
- adapter->rx_eitr_param = 1000000/ec->rx_coalesce_usecs;
+ if ((ec->rx_coalesce_usecs > (IXGBE_MAX_EITR >> 2)) ||
+ (ec->tx_coalesce_usecs > (IXGBE_MAX_EITR >> 2)))
+ return -EINVAL;
- /* static value of interrupt rate */
- adapter->rx_itr_setting = adapter->rx_eitr_param;
- /* clear the lower bit as its used for dynamic state */
- adapter->rx_itr_setting &= ~1;
- } else if (ec->rx_coalesce_usecs == 1) {
- /* check the old value and enable RSC if necessary */
- need_reset = ixgbe_update_rsc(adapter, ec);
+ /* check the old value and enable RSC if necessary */
+ need_reset = ixgbe_update_rsc(adapter, ec);
- /* 1 means dynamic mode */
- adapter->rx_eitr_param = 20000;
- adapter->rx_itr_setting = 1;
- } else {
- /* check the old value and enable RSC if necessary */
- need_reset = ixgbe_update_rsc(adapter, ec);
- /*
- * any other value means disable eitr, which is best
- * served by setting the interrupt rate very high
- */
- adapter->rx_eitr_param = IXGBE_MAX_INT_RATE;
- adapter->rx_itr_setting = 0;
- }
+ if (ec->rx_coalesce_usecs > 1)
+ adapter->rx_itr_setting = ec->rx_coalesce_usecs << 2;
+ else
+ adapter->rx_itr_setting = ec->rx_coalesce_usecs;
- if (ec->tx_coalesce_usecs > 1) {
- /*
- * don't have to worry about max_int as above because
- * tx vectors don't do hardware RSC (an rx function)
- */
- /* check the limits */
- if ((1000000/ec->tx_coalesce_usecs > IXGBE_MAX_INT_RATE) ||
- (1000000/ec->tx_coalesce_usecs < IXGBE_MIN_INT_RATE))
- return -EINVAL;
+ if (adapter->rx_itr_setting == 1)
+ rx_itr_param = IXGBE_20K_ITR;
+ else
+ rx_itr_param = adapter->rx_itr_setting;
- /* store the value in ints/second */
- adapter->tx_eitr_param = 1000000/ec->tx_coalesce_usecs;
+ if (ec->tx_coalesce_usecs > 1)
+ adapter->tx_itr_setting = ec->tx_coalesce_usecs << 2;
+ else
+ adapter->tx_itr_setting = ec->tx_coalesce_usecs;
- /* static value of interrupt rate */
- adapter->tx_itr_setting = adapter->tx_eitr_param;
+ if (adapter->tx_itr_setting == 1)
+ tx_itr_param = IXGBE_10K_ITR;
+ else
+ tx_itr_param = adapter->tx_itr_setting;
- /* clear the lower bit as its used for dynamic state */
- adapter->tx_itr_setting &= ~1;
- } else if (ec->tx_coalesce_usecs == 1) {
- /* 1 means dynamic mode */
- adapter->tx_eitr_param = 10000;
- adapter->tx_itr_setting = 1;
- } else {
- adapter->tx_eitr_param = IXGBE_MAX_INT_RATE;
- adapter->tx_itr_setting = 0;
- }
+ if (adapter->flags & IXGBE_FLAG_MSIX_ENABLED)
+ num_vectors = adapter->num_msix_vectors - NON_Q_VECTORS;
+ else
+ num_vectors = 1;
- /* MSI/MSIx Interrupt Mode */
- if (adapter->flags &
- (IXGBE_FLAG_MSIX_ENABLED | IXGBE_FLAG_MSI_ENABLED)) {
- int num_vectors = adapter->num_msix_vectors - NON_Q_VECTORS;
- for (i = 0; i < num_vectors; i++) {
- q_vector = adapter->q_vector[i];
- if (q_vector->tx.count && !q_vector->rx.count)
- /* tx only */
- q_vector->eitr = adapter->tx_eitr_param;
- else
- /* rx only or mixed */
- q_vector->eitr = adapter->rx_eitr_param;
- q_vector->tx.work_limit = adapter->tx_work_limit;
- ixgbe_write_eitr(q_vector);
- }
- /* Legacy Interrupt Mode */
- } else {
- q_vector = adapter->q_vector[0];
- q_vector->eitr = adapter->rx_eitr_param;
+ for (i = 0; i < num_vectors; i++) {
+ q_vector = adapter->q_vector[i];
q_vector->tx.work_limit = adapter->tx_work_limit;
+ if (q_vector->tx.count && !q_vector->rx.count)
+ /* tx only */
+ q_vector->itr = tx_itr_param;
+ else
+ /* rx only or mixed */
+ q_vector->itr = rx_itr_param;
ixgbe_write_eitr(q_vector);
}
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index c26ea94..3594b09 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -1500,12 +1500,19 @@ static void ixgbe_configure_msix(struct ixgbe_adapter *adapter)
for (ring = q_vector->tx.ring; ring != NULL; ring = ring->next)
ixgbe_set_ivar(adapter, 1, ring->reg_idx, v_idx);
- if (q_vector->tx.ring && !q_vector->rx.ring)
- /* tx only */
- q_vector->eitr = adapter->tx_eitr_param;
- else if (q_vector->rx.ring)
- /* rx or mixed */
- q_vector->eitr = adapter->rx_eitr_param;
+ if (q_vector->tx.ring && !q_vector->rx.ring) {
+ /* tx only vector */
+ if (adapter->tx_itr_setting == 1)
+ q_vector->itr = IXGBE_10K_ITR;
+ else
+ q_vector->itr = adapter->tx_itr_setting;
+ } else {
+ /* rx or rx/tx vector */
+ if (adapter->rx_itr_setting == 1)
+ q_vector->itr = IXGBE_20K_ITR;
+ else
+ q_vector->itr = adapter->rx_itr_setting;
+ }
ixgbe_write_eitr(q_vector);
}
@@ -1519,7 +1526,6 @@ static void ixgbe_configure_msix(struct ixgbe_adapter *adapter)
case ixgbe_mac_X540:
ixgbe_set_ivar(adapter, -1, 1, v_idx);
break;
-
default:
break;
}
@@ -1527,12 +1533,10 @@ static void ixgbe_configure_msix(struct ixgbe_adapter *adapter)
/* set up to autoclear timer, and the vectors */
mask = IXGBE_EIMS_ENABLE_MASK;
- if (adapter->num_vfs)
- mask &= ~(IXGBE_EIMS_OTHER |
- IXGBE_EIMS_MAILBOX |
- IXGBE_EIMS_LSC);
- else
- mask &= ~(IXGBE_EIMS_OTHER | IXGBE_EIMS_LSC);
+ mask &= ~(IXGBE_EIMS_OTHER |
+ IXGBE_EIMS_MAILBOX |
+ IXGBE_EIMS_LSC);
+
IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIAC, mask);
}
@@ -1577,7 +1581,7 @@ static void ixgbe_update_itr(struct ixgbe_q_vector *q_vector,
* 100-1249MB/s bulk (8000 ints/s)
*/
/* what was last interrupt timeslice? */
- timepassed_us = 1000000/q_vector->eitr;
+ timepassed_us = q_vector->itr >> 2;
bytes_perint = bytes / timepassed_us; /* bytes/usec */
switch (itr_setting) {
@@ -1618,7 +1622,7 @@ void ixgbe_write_eitr(struct ixgbe_q_vector *q_vector)
struct ixgbe_adapter *adapter = q_vector->adapter;
struct ixgbe_hw *hw = &adapter->hw;
int v_idx = q_vector->v_idx;
- u32 itr_reg = EITR_INTS_PER_SEC_TO_REG(q_vector->eitr);
+ u32 itr_reg = q_vector->itr;
switch (adapter->hw.mac.type) {
case ixgbe_mac_82598EB:
@@ -1628,15 +1632,6 @@ void ixgbe_write_eitr(struct ixgbe_q_vector *q_vector)
case ixgbe_mac_82599EB:
case ixgbe_mac_X540:
/*
- * 82599 and X540 can support a value of zero, so allow it for
- * max interrupt rate, but there is an errata where it can
- * not be zero with RSC
- */
- if (itr_reg == 8 &&
- !(adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED))
- itr_reg = 0;
-
- /*
* set the WDIS bit to not clear the timer bits and cause an
* immediate assertion of the interrupt
*/
@@ -1650,7 +1645,7 @@ void ixgbe_write_eitr(struct ixgbe_q_vector *q_vector)
static void ixgbe_set_itr(struct ixgbe_q_vector *q_vector)
{
- u32 new_itr = q_vector->eitr;
+ u32 new_itr = q_vector->itr;
u8 current_itr;
ixgbe_update_itr(q_vector, &q_vector->tx);
@@ -1661,24 +1656,25 @@ static void ixgbe_set_itr(struct ixgbe_q_vector *q_vector)
switch (current_itr) {
/* counts and packets in update_itr are dependent on these numbers */
case lowest_latency:
- new_itr = 100000;
+ new_itr = IXGBE_100K_ITR;
break;
case low_latency:
- new_itr = 20000; /* aka hwitr = ~200 */
+ new_itr = IXGBE_20K_ITR;
break;
case bulk_latency:
- new_itr = 8000;
+ new_itr = IXGBE_8K_ITR;
break;
default:
break;
}
- if (new_itr != q_vector->eitr) {
+ if (new_itr != q_vector->itr) {
/* do an exponential smoothing */
- new_itr = ((q_vector->eitr * 9) + new_itr)/10;
+ new_itr = (10 * new_itr * q_vector->itr) /
+ ((9 * new_itr) + q_vector->itr);
/* save the algorithm value here */
- q_vector->eitr = new_itr;
+ q_vector->itr = new_itr & IXGBE_MAX_EITR;
ixgbe_write_eitr(q_vector);
}
@@ -2301,10 +2297,15 @@ static inline void ixgbe_irq_disable(struct ixgbe_adapter *adapter)
**/
static void ixgbe_configure_msi_and_legacy(struct ixgbe_adapter *adapter)
{
- struct ixgbe_hw *hw = &adapter->hw;
+ struct ixgbe_q_vector *q_vector = adapter->q_vector[0];
- IXGBE_WRITE_REG(hw, IXGBE_EITR(0),
- EITR_INTS_PER_SEC_TO_REG(adapter->rx_eitr_param));
+ /* rx/tx vector */
+ if (adapter->rx_itr_setting == 1)
+ q_vector->itr = IXGBE_20K_ITR;
+ else
+ q_vector->itr = adapter->rx_itr_setting;
+
+ ixgbe_write_eitr(q_vector);
ixgbe_set_ivar(adapter, 0, 0, 0);
ixgbe_set_ivar(adapter, 1, 0, 0);
@@ -4613,12 +4614,6 @@ static int ixgbe_alloc_q_vectors(struct ixgbe_adapter *adapter)
if (!alloc_cpumask_var(&q_vector->affinity_mask, GFP_KERNEL))
goto err_out;
cpumask_set_cpu(v_idx, q_vector->affinity_mask);
-
- if (q_vector->tx.count && !q_vector->rx.count)
- q_vector->eitr = adapter->tx_eitr_param;
- else
- q_vector->eitr = adapter->rx_eitr_param;
-
netif_napi_add(adapter->netdev, &q_vector->napi,
ixgbe_poll, 64);
adapter->q_vector[v_idx] = q_vector;
@@ -4864,9 +4859,7 @@ static int __devinit ixgbe_sw_init(struct ixgbe_adapter *adapter)
/* enable itr by default in dynamic mode */
adapter->rx_itr_setting = 1;
- adapter->rx_eitr_param = 20000;
adapter->tx_itr_setting = 1;
- adapter->tx_eitr_param = 10000;
/* set defaults for eitr in MegaBytes */
adapter->eitr_low = 10;
--
1.7.6.2
^ permalink raw reply related
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