* Re: Just one more byte, it is wafer thin...
From: Rick Jones @ 2011-07-21 0:52 UTC (permalink / raw)
To: netdev
In-Reply-To: <4E2764A0.90003@hp.com>
On 07/20/2011 04:28 PM, Rick Jones wrote:
> and got a somewhat unexpected result - I've no idea why then they both
> went up - perhaps it was sensing "high" occasionally even in the 4344
> byte request case.
That would seem to be the case? Back to defaults, ./configure'd netperf
with --enable-demo and have it print-out interim results every 250
milliseconds (or so)
root@use111814x:~/netperf-2.5.0# HDR="-P 1";for r in 4344 4345; do
netperf -D 0.25 -H mumble.3.21 -t TCP_RR $HDR -- -r ${r},1; HDR="-P 0"; done
MIGRATED TCP REQUEST/RESPONSE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET
to mumble.3.21 (mumble.3.21) port 0 AF_INET : histogram : demo : first
burst 0
Interim result: 5332.90 Trans/s over 0.28 seconds ending at 1311209347.312
Interim result: 6867.20 Trans/s over 0.25 seconds ending at 1311209347.562
Interim result: 14475.52 Trans/s over 0.25 seconds ending at 1311209347.813
Interim result: 14513.50 Trans/s over 0.25 seconds ending at 1311209348.063
Interim result: 14528.00 Trans/s over 0.25 seconds ending at 1311209348.313
Interim result: 8245.53 Trans/s over 0.44 seconds ending at 1311209348.753
Interim result: 13523.73 Trans/s over 0.25 seconds ending at 1311209349.003
Interim result: 13310.17 Trans/s over 0.26 seconds ending at 1311209349.259
Interim result: 8303.74 Trans/s over 0.40 seconds ending at 1311209349.660
Interim result: 14202.24 Trans/s over 0.25 seconds ending at 1311209349.910
Interim result: 8124.76 Trans/s over 0.44 seconds ending at 1311209350.347
Interim result: 14495.59 Trans/s over 0.25 seconds ending at 1311209350.597
Interim result: 14505.91 Trans/s over 0.25 seconds ending at 1311209350.847
Interim result: 13338.19 Trans/s over 0.27 seconds ending at 1311209351.119
Interim result: 7280.44 Trans/s over 0.46 seconds ending at 1311209351.577
Interim result: 14002.71 Trans/s over 0.25 seconds ending at 1311209351.827
Interim result: 6661.47 Trans/s over 0.53 seconds ending at 1311209352.353
Interim result: 4069.30 Trans/s over 0.41 seconds ending at 1311209352.762
Interim result: 10444.77 Trans/s over 0.35 seconds ending at 1311209353.110
Interim result: 9013.21 Trans/s over 0.29 seconds ending at 1311209353.399
Interim result: 6480.59 Trans/s over 0.35 seconds ending at 1311209353.747
Interim result: 13245.09 Trans/s over 0.25 seconds ending at 1311209353.997
Interim result: 12205.48 Trans/s over 0.30 seconds ending at 1311209354.294
Interim result: 5592.64 Trans/s over 0.55 seconds ending at 1311209354.840
Interim result: 6142.67 Trans/s over 0.59 seconds ending at 1311209355.430
Interim result: 11084.00 Trans/s over 0.25 seconds ending at 1311209355.680
Interim result: 14511.18 Trans/s over 0.25 seconds ending at 1311209355.930
Interim result: 14475.35 Trans/s over 0.25 seconds ending at 1311209356.181
Interim result: 7893.58 Trans/s over 0.46 seconds ending at 1311209356.639
Interim result: 14176.00 Trans/s over 0.25 seconds ending at 1311209356.889
Local /Remote
Socket Size Request Resp. Elapsed Trans.
Send Recv Size Size Time Rate
bytes Bytes bytes bytes secs. per sec
16384 87380 4344 1 10.00 9907.27
16384 87380
now the 4345 byte request:
Interim result: 8712.99 Trans/s over 0.37 seconds ending at 1311209357.406
Interim result: 3344.24 Trans/s over 0.65 seconds ending at 1311209358.057
Interim result: 3495.28 Trans/s over 0.25 seconds ending at 1311209358.308
Interim result: 3457.05 Trans/s over 0.25 seconds ending at 1311209358.561
Interim result: 3315.55 Trans/s over 0.26 seconds ending at 1311209358.821
Interim result: 3340.47 Trans/s over 0.25 seconds ending at 1311209359.072
Interim result: 3343.81 Trans/s over 0.25 seconds ending at 1311209359.322
Interim result: 3373.45 Trans/s over 0.25 seconds ending at 1311209359.572
Interim result: 3292.31 Trans/s over 0.26 seconds ending at 1311209359.828
Interim result: 3328.17 Trans/s over 0.25 seconds ending at 1311209360.079
Interim result: 3373.07 Trans/s over 0.25 seconds ending at 1311209360.329
Interim result: 3431.75 Trans/s over 0.25 seconds ending at 1311209360.579
Interim result: 3324.45 Trans/s over 0.26 seconds ending at 1311209360.837
Interim result: 3347.82 Trans/s over 0.25 seconds ending at 1311209361.087
Interim result: 3327.10 Trans/s over 0.25 seconds ending at 1311209361.338
Interim result: 3337.22 Trans/s over 0.25 seconds ending at 1311209361.589
Interim result: 3444.56 Trans/s over 0.25 seconds ending at 1311209361.839
Interim result: 3336.91 Trans/s over 0.26 seconds ending at 1311209362.097
Interim result: 3323.07 Trans/s over 0.25 seconds ending at 1311209362.348
Interim result: 3422.15 Trans/s over 0.25 seconds ending at 1311209362.598
Interim result: 3327.81 Trans/s over 0.26 seconds ending at 1311209362.855
Interim result: 3312.43 Trans/s over 0.25 seconds ending at 1311209363.106
Interim result: 3346.22 Trans/s over 0.25 seconds ending at 1311209363.356
Interim result: 3426.75 Trans/s over 0.25 seconds ending at 1311209363.606
Interim result: 3304.44 Trans/s over 0.26 seconds ending at 1311209363.866
Interim result: 3466.26 Trans/s over 0.25 seconds ending at 1311209364.116
Interim result: 3299.97 Trans/s over 0.26 seconds ending at 1311209364.379
Interim result: 3360.99 Trans/s over 0.25 seconds ending at 1311209364.629
Interim result: 3402.76 Trans/s over 0.25 seconds ending at 1311209364.879
Interim result: 3389.28 Trans/s over 0.25 seconds ending at 1311209365.130
Interim result: 3360.94 Trans/s over 0.25 seconds ending at 1311209365.382
Interim result: 3319.58 Trans/s over 0.25 seconds ending at 1311209365.635
Interim result: 3440.41 Trans/s over 0.25 seconds ending at 1311209365.886
Interim result: 3386.75 Trans/s over 0.25 seconds ending at 1311209366.140
Interim result: 3337.23 Trans/s over 0.25 seconds ending at 1311209366.393
Interim result: 3329.40 Trans/s over 0.25 seconds ending at 1311209366.644
Interim result: 3328.29 Trans/s over 0.25 seconds ending at 1311209366.894
16384 87380 4345 1 10.00 3560.55
16384 87380
Still, is this suggesting that perhaps the adaptive
> bits are being a bit to aggressive about sensing high? Over what
> interval is that measurement supposed to be happening?
>
> rick jones
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH 1/2] igb: Allow extra 4 bytes on RX for vlan tags.
From: Ben Greear @ 2011-07-21 0:27 UTC (permalink / raw)
To: Jesse Gross; +Cc: Jeff Kirsher, netdev, Duyck, Alexander H
In-Reply-To: <CAEP_g=_o7nP2FCnPufyT44JZZ+Z+jkcVpSa8Qj3mjPn+MwRhXA@mail.gmail.com>
On 07/20/2011 05:18 PM, Jesse Gross wrote:
> On Thu, Feb 17, 2011 at 9:28 AM, Ben Greear<greearb@candelatech.com> wrote:
>> On 02/17/2011 03:04 AM, Jeff Kirsher wrote:
>>>
>>> On Thu, Feb 10, 2011 at 13:59,<greearb@candelatech.com> wrote:
>>>>
>>>> From: Ben Greear<greearb@candelatech.com>
>>>>
>>>> This allows the NIC to receive 1518 byte (not counting
>>>> FCS) packets when MTU is 1500, thus allowing 1500 MTU
>>>> VLAN frames to be received. Please note that no VLANs
>>>> were actually configured on the NIC...it was just acting
>>>> as pass-through device.
>>>>
>>>> Signed-off-by: Ben Greear<greearb@candelatech.com>
>>>> ---
>>>> :100644 100644 58c665b... 30c9cc6... M drivers/net/igb/igb_main.c
>>>> drivers/net/igb/igb_main.c | 5 +++--
>>>> 1 files changed, 3 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
>>>> index 58c665b..30c9cc6 100644
>>>> --- a/drivers/net/igb/igb_main.c
>>>> +++ b/drivers/net/igb/igb_main.c
>>>> @@ -2281,7 +2281,8 @@ static int __devinit igb_sw_init(struct igb_adapter
>>>> *adapter)
>>>> adapter->rx_itr_setting = IGB_DEFAULT_ITR;
>>>> adapter->tx_itr_setting = IGB_DEFAULT_ITR;
>>>>
>>>> - adapter->max_frame_size = netdev->mtu + ETH_HLEN + ETH_FCS_LEN;
>>>> + adapter->max_frame_size = (netdev->mtu + ETH_HLEN + ETH_FCS_LEN
>>>> + + VLAN_HLEN);
>>>> adapter->min_frame_size = ETH_ZLEN + ETH_FCS_LEN;
>>>>
>>>> spin_lock_init(&adapter->stats64_lock);
>>>> @@ -4303,7 +4304,7 @@ static int igb_change_mtu(struct net_device
>>>> *netdev, int new_mtu)
>>>> {
>>>> struct igb_adapter *adapter = netdev_priv(netdev);
>>>> struct pci_dev *pdev = adapter->pdev;
>>>> - int max_frame = new_mtu + ETH_HLEN + ETH_FCS_LEN;
>>>> + int max_frame = new_mtu + ETH_HLEN + ETH_FCS_LEN + VLAN_HLEN;
>>>> u32 rx_buffer_len, i;
>>>>
>>>> if ((new_mtu< 68) || (max_frame> MAX_JUMBO_FRAME_SIZE)) {
>>>
>>> While testing this patch, validation found that the patch reduces the
>>> maximum mtu size
>>> by 4 bytes (reduces it from 9216 to 9212). This is not a desired side
>>> effect of this patch.
>>
>> You could add handling for that case and have it act as it used to when
>> new_mtu is greater than 9212?
>>
>> I tested e1000e and it worked w/out hacking at 1500 MTU, so maybe
>> check how it does it?
>
> I just wanted to bring this up again to see if any progress had been
> made. We were looking at this driver and trying to figure out the
> best way to convert it to use the new vlan model but I'm not familiar
I've been watching :)
> enough with the hardware to know. It seems that all of the other
> Intel drivers unconditionally add space for the vlan tag to the
> receive buffer (and would therefore have similar effects as this
> patch), is there something different about this card?
>
> I believe that Alex was working on something in this area (in the
> context of one of my patches from a long time ago) but I'm not sure
> what came of that.
Truth is, I don't really see why it's a problem to decrease the
maximum MTU slightly in order to make it work with VLANs.
I'm not sure if there is some way to make it work with VLANs
and not decrease the maximum MTU.
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply
* Re: [PATCH 1/2] igb: Allow extra 4 bytes on RX for vlan tags.
From: Jesse Gross @ 2011-07-21 0:18 UTC (permalink / raw)
To: Ben Greear; +Cc: Jeff Kirsher, netdev, Duyck, Alexander H
In-Reply-To: <4D5D5AD8.5000802@candelatech.com>
On Thu, Feb 17, 2011 at 9:28 AM, Ben Greear <greearb@candelatech.com> wrote:
> On 02/17/2011 03:04 AM, Jeff Kirsher wrote:
>>
>> On Thu, Feb 10, 2011 at 13:59,<greearb@candelatech.com> wrote:
>>>
>>> From: Ben Greear<greearb@candelatech.com>
>>>
>>> This allows the NIC to receive 1518 byte (not counting
>>> FCS) packets when MTU is 1500, thus allowing 1500 MTU
>>> VLAN frames to be received. Please note that no VLANs
>>> were actually configured on the NIC...it was just acting
>>> as pass-through device.
>>>
>>> Signed-off-by: Ben Greear<greearb@candelatech.com>
>>> ---
>>> :100644 100644 58c665b... 30c9cc6... M drivers/net/igb/igb_main.c
>>> drivers/net/igb/igb_main.c | 5 +++--
>>> 1 files changed, 3 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
>>> index 58c665b..30c9cc6 100644
>>> --- a/drivers/net/igb/igb_main.c
>>> +++ b/drivers/net/igb/igb_main.c
>>> @@ -2281,7 +2281,8 @@ static int __devinit igb_sw_init(struct igb_adapter
>>> *adapter)
>>> adapter->rx_itr_setting = IGB_DEFAULT_ITR;
>>> adapter->tx_itr_setting = IGB_DEFAULT_ITR;
>>>
>>> - adapter->max_frame_size = netdev->mtu + ETH_HLEN + ETH_FCS_LEN;
>>> + adapter->max_frame_size = (netdev->mtu + ETH_HLEN + ETH_FCS_LEN
>>> + + VLAN_HLEN);
>>> adapter->min_frame_size = ETH_ZLEN + ETH_FCS_LEN;
>>>
>>> spin_lock_init(&adapter->stats64_lock);
>>> @@ -4303,7 +4304,7 @@ static int igb_change_mtu(struct net_device
>>> *netdev, int new_mtu)
>>> {
>>> struct igb_adapter *adapter = netdev_priv(netdev);
>>> struct pci_dev *pdev = adapter->pdev;
>>> - int max_frame = new_mtu + ETH_HLEN + ETH_FCS_LEN;
>>> + int max_frame = new_mtu + ETH_HLEN + ETH_FCS_LEN + VLAN_HLEN;
>>> u32 rx_buffer_len, i;
>>>
>>> if ((new_mtu< 68) || (max_frame> MAX_JUMBO_FRAME_SIZE)) {
>>
>> While testing this patch, validation found that the patch reduces the
>> maximum mtu size
>> by 4 bytes (reduces it from 9216 to 9212). This is not a desired side
>> effect of this patch.
>
> You could add handling for that case and have it act as it used to when
> new_mtu is greater than 9212?
>
> I tested e1000e and it worked w/out hacking at 1500 MTU, so maybe
> check how it does it?
I just wanted to bring this up again to see if any progress had been
made. We were looking at this driver and trying to figure out the
best way to convert it to use the new vlan model but I'm not familiar
enough with the hardware to know. It seems that all of the other
Intel drivers unconditionally add space for the vlan tag to the
receive buffer (and would therefore have similar effects as this
patch), is there something different about this card?
I believe that Alex was working on something in this area (in the
context of one of my patches from a long time ago) but I'm not sure
what came of that.
^ permalink raw reply
* Re: [patch net-next-2.6 37/47] igb: do vlan cleanup
From: Jesse Gross @ 2011-07-20 23:58 UTC (permalink / raw)
To: Jiri Pirko
Cc: netdev, davem, shemminger, eric.dumazet, greearb, mirqus,
jeffrey.t.kirsher, jesse.brandeburg, peter.p.waskiewicz.jr,
bruce.w.allan, carolyn.wyborny, donald.c.skidmore, gregory.v.rose,
alexander.h.duyck, john.ronciak, e1000-devel
In-Reply-To: <20110720191045.GD2688@minipsycho.redhat.com>
On Wed, Jul 20, 2011 at 12:10 PM, Jiri Pirko <jpirko@redhat.com> wrote:
> Wed, Jul 20, 2011 at 07:35:33PM CEST, jesse@nicira.com wrote:
>>On Wed, Jul 20, 2011 at 7:54 AM, Jiri Pirko <jpirko@redhat.com> wrote:
>>> @@ -2943,7 +2944,7 @@ static void igb_rlpml_set(struct igb_adapter *adapter)
>>> struct e1000_hw *hw = &adapter->hw;
>>> u16 pf_id = adapter->vfs_allocated_count;
>>>
>>> - if (adapter->vlgrp)
>>> + if (igb_vlan_used(adapter))
>>> max_frame_size += VLAN_TAG_SIZE;
>>
>>There are similar issues here as with the VF driver. I think you're
>>also confusing vlan acceleration with vlan filtering. If no vlan
>>filters are in use but the card is in promiscuous mode, the buffer
>>will be undersized and we lose tagged packets.
>
> I'm certainly not confusing vlan accel and filtering. Here is the
> intension is the behaviour remains intact as well. I believe it's true.
I believe the underlying issue for all three of these threads is the
same, so I'll just respond to them all here.
I agree that this doesn't change the behavior of the driver but I
don't think that should be the goal. When I originally designed this
new vlan model my intention was to eliminate a whole class of driver
bugs that I was repeatedly hitting in various forms. In the example
above, if you run tcpdump on this device without configuring a vlan
group on it then you will see that MTU sized packets are missing
because the receive buffer was undersized.
The common theme for these problems is that they all occur in
situations where vlans are not configured on the device and the driver
does something different as a result of this. The solution was to
prevent drivers from changing their behavior in such situations by
completely removing the concept of a vlan group from them and letting
the networking core tell them when to make the changes instead of
doing it implicitly. That's why I don't see the fact that this change
essentially emulates the knowledge of configuring a group to be a
plus. By the way, plenty of your other patches change the behavior of
the drivers - on any of the NICs that always enable stripping, try
running tcpdump on the interface without configuring a vlan group.
Before the change you will see that tags have disappeared and
afterwards the tags are intact. So I think that changing the behavior
of drivers in this regard is a positive thing.
As an aside, thank you for taking the time to work on all of these
drivers. The only reason why I'm complaining about these few drivers
is because I'd like to close the door on this class of problems, which
is finally in reach thanks to your work.
^ permalink raw reply
* Just one more byte, it is wafer thin...
From: Rick Jones @ 2011-07-20 23:28 UTC (permalink / raw)
To: netdev
One of the netperf scripts I run from time to time is the
packet_byte_script (doc/examples/packet_byte_script in the netperf
source tree, though I tweaked it locally to use omni output selectors).
The goal of that script is to measure the incremental cost of sending
another byte and/or another TCP segment. Among other things, it runs RR
tests where the request or response size is incremented. It starts at 1
byte, doubles until it would exceed the MSS, then does 1MSS, 1MSS+1,
2MSS, 2MSS+1 and 3MSS, 3MSS+1.
I recently ran it between a pair of dual-processor X5650 based systems
with 10GbE NICs based on Mellanox MT26438 running as a 10GbE interface.
The kernel is 2.6.38-8-server (maverick) and the driver info is:
# ethtool -i eth2
driver: mlx4_en (HP_0200000003)
version: 1.5.1.6 (August 2010)
firmware-version: 2.7.9294
bus-info: 0000:05:00.0
(yes, that HP_mumble does broach the possibility of a local fubar. i'd
try a pure upstream myself but the systems at my disposal are somewhat
locked-down, i'm hoping someone with a "pure" environment can reproduce
the result, or not)
The full output can be seen at:
ftp://ftp.netperf.org/netperf/misc/sl390_NC543i_mlx4_en_1.5.1.6_Ubuntu_11.04_A5800_56C_to_same_pab_1500mtu_20110719.csv
I wasn't entirely sure what TSO and LRO/GRO would mean for the script,
at first I thought I wouldn't get the +1 trip down the stack, but the
transaction rates all looked reasonably "sane" until the 3MSS to 3MSS+1
transition, when the transaction rate dropped by something like 70%. And
stayed there as the request size was increased further in other testing.
I looked at a tcpdump trace on the sending and receiving side - LRO/GRO
had coalesced segments into the full request size. On the sending side
though, I was seeing one segment of 3MSS and one of one byte. At first
I thought that perhaps something was fubar with cwnd, but looking at
traces for 2MSS(+1) and 1MSS(+1) I saw that is just what TSO does - only
send integer multiples of the MSS as TSO. So, while that does
interesting things to the service demand for a given transaction size,
it probably wasn't the culprit.
It would seem that the adaptive-rx was. Previously, the coalescing
settings on the receiver (netserver side) were:
# ethtool -c eth2
Coalesce parameters for eth2:
Adaptive RX: on TX: off
stats-block-usecs: 0
sample-interval: 0
pkt-rate-low: 400000
pkt-rate-high: 450000
rx-usecs: 16
rx-frames: 44
rx-usecs-irq: 0
rx-frames-irq: 0
tx-usecs: 0
tx-frames: 0
tx-usecs-irq: 0
tx-frames-irq: 0
rx-usecs-low: 0
rx-frame-low: 0
tx-usecs-low: 0
tx-frame-low: 0
rx-usecs-high: 128
rx-frame-high: 0
tx-usecs-high: 0
tx-frame-high: 0
and netperf would look like:
# HDR="-P 1";for r in 4344 4345; do netperf -H mumble.3.21 -t TCP_RR
$HDR -- -r ${r},1; HDR="-P 0"; done
MIGRATED TCP REQUEST/RESPONSE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET
to mumble.3.21 (mumble.3.21) port 0 AF_INET : histogram : first burst 0
Local /Remote
Socket Size Request Resp. Elapsed Trans.
Send Recv Size Size Time Rate
bytes Bytes bytes bytes secs. per sec
16384 87380 4344 1 10.00 10030.37
16384 87380
16384 87380 4345 1 10.00 3406.62
16384 87380
when I switched adaptive rx off via ethtool, the drop largely went away:
# HDR="-P 1";for r in 4344 4345; do netperf -H mumble.3.21 -t TCP_RR
$HDR -- -r ${r},1; HDR="-P 0"; done
MIGRATED TCP REQUEST/RESPONSE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET
to mumble.3.21 (mumble.3.21) port 0 AF_INET : histogram : first burst 0
Local /Remote
Socket Size Request Resp. Elapsed Trans.
Send Recv Size Size Time Rate
bytes Bytes bytes bytes secs. per sec
16384 87380 4344 1 10.00 11167.48
16384 87380
16384 87380 4345 1 10.00 10460.02
16384 87380
Now, at 11000 transactions per second, even with the request being 4
packets, that is still < 55000 packets per second, so presumably
everything should have stayed at "_low" right? Just for grins, I put
adaptive coalescing on again and set rx-usecs-high to 64 and ran those
two points again:
# HDR="-P 1";for r in 4344 4345; do netperf -H mumble.3.21 -t TCP_RR
$HDR -- -r ${r},1; HDR="-P 0"; done
MIGRATED TCP REQUEST/RESPONSE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET
to mumble.3.21 (mumble.3.21) port 0 AF_INET : histogram : first burst 0
Local /Remote
Socket Size Request Resp. Elapsed Trans.
Send Recv Size Size Time Rate
bytes Bytes bytes bytes secs. per sec
16384 87380 4344 1 10.00 11143.07
16384 87380
16384 87380 4345 1 10.00 5790.48
16384 87380
and just to be completely pedantic about it, set rx-usecs-high to 0:
# HDR="-P 1";for r in 4344 4345; do netperf -H mumble.3.21 -t TCP_RR
$HDR -- -r ${r},1; HDR="-P 0"; done
MIGRATED TCP REQUEST/RESPONSE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET
to mumble.3.21 (mumble.3.21) port 0 AF_INET : histogram : first burst 0
Local /Remote
Socket Size Request Resp. Elapsed Trans.
Send Recv Size Size Time Rate
bytes Bytes bytes bytes secs. per sec
16384 87380 4344 1 10.00 14274.03
16384 87380
16384 87380 4345 1 10.00 13697.11
16384 87380
and got a somewhat unexpected result - I've no idea why then they both
went up - perhaps it was sensing "high" occasionally even in the 4344
byte request case. Still, is this suggesting that perhaps the adaptive
bits are being a bit to aggressive about sensing high? Over what
interval is that measurement supposed to be happening?
rick jones
^ permalink raw reply
* Re: [PATCH] iproute2: Remove "monitor" from "ip route help" output
From: Stephen Hemminger @ 2011-07-20 23:04 UTC (permalink / raw)
To: Andreas Henriksson; +Cc: netdev, martin f krafft, 537681
In-Reply-To: <20110720150814.GA12025@amd64.fatal.se>
On Wed, 20 Jul 2011 17:08:14 +0200
Andreas Henriksson <andreas@fatal.se> wrote:
> $ ip route help 2>&1 | grep monitor
> ip route { add | del | change | append | replace | monitor } ROUTE
> $ ip route monitor
> Command "monitor" is unknown, try "ip route help".
>
> (I guess what was really intended is "ip monitor route", so just remove
> the argument from the help output.)
>
> Originally reported by martin f krafft at http://bugs.debian.org/537681
>
> While at it, also drop all non-existant (route,link,netns) monitor
> arguments from the ip(8) man page.
>
> Signed-off-by: Andreas Henriksson <andreas@fatal.se>
Applied
^ permalink raw reply
* Re: [PATCH] Fix error decoding router advertisements netlink messages
From: Stephen Hemminger @ 2011-07-20 23:04 UTC (permalink / raw)
To: Andreas Henriksson; +Cc: netdev, Christoph Biedl
In-Reply-To: <1311151281-25479-1-git-send-email-andreas@fatal.se>
On Wed, 20 Jul 2011 10:41:21 +0200
Andreas Henriksson <andreas@fatal.se> wrote:
> From: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
>
> The "ip monitor" command does properly decode the "preferred" and
> "valid" lifetime records in router advertisements from netlink
> messages.
>
> For more details see http://bugs.debian.org/634170
>
> Signed-off-by: Andreas Henriksson <andreas@fatal.se>
Applied
^ permalink raw reply
* Re: [PATCH] rtlwifi: Convert printks to pr_<level>
From: Larry Finger @ 2011-07-20 22:45 UTC (permalink / raw)
To: Joe Perches
Cc: Chaoming Li, John W. Linville, linux-wireless, netdev,
linux-kernel
In-Reply-To: <b57f00fc1d0947443aa1830c11c288e78924af44.1311177059.git.joe@perches.com>
On 07/20/2011 10:51 AM, Joe Perches wrote:
> Use the current logging styles.
> Add pr_fmt where appropriate.
> Remove now unnecessary prefixes from printks.
> Convert hard coded prefix to __func__.
> Add a missing "\n" to a format.
>
> Signed-off-by: Joe Perches<joe@perches.com>
> ---
> drivers/net/wireless/rtlwifi/base.c | 9 ++-
> drivers/net/wireless/rtlwifi/cam.c | 4 +-
> drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c | 5 +-
> drivers/net/wireless/rtlwifi/rtl8192cu/hw.c | 69 ++++++++------------
> drivers/net/wireless/rtlwifi/rtl8192cu/mac.c | 11 ++-
> drivers/net/wireless/rtlwifi/rtl8192de/sw.c | 8 +-
> drivers/net/wireless/rtlwifi/rtl8192se/hw.c | 10 ++--
> drivers/net/wireless/rtlwifi/rtl8192se/phy.c | 5 +-
> drivers/net/wireless/rtlwifi/rtl8192se/rf.c | 4 +-
> drivers/net/wireless/rtlwifi/rtl8192se/sw.c | 6 +-
> drivers/net/wireless/rtlwifi/usb.c | 12 ++--
> 11 files changed, 72 insertions(+), 71 deletions(-)
>
> diff --git a/drivers/net/wireless/rtlwifi/base.c b/drivers/net/wireless/rtlwifi/base.c
> index bc13533..d88e405 100644
> --- a/drivers/net/wireless/rtlwifi/base.c
> +++ b/drivers/net/wireless/rtlwifi/base.c
> @@ -27,6 +27,8 @@
> *
> *****************************************************************************/
ACKed-by: Larry Finger <Larry.Finger@lwfinger.net>
^ permalink raw reply
* Re: [PATCH] iproute2: Auto-detect the presence of setns in libc
From: Stephen Hemminger @ 2011-07-20 22:16 UTC (permalink / raw)
To: Dan McGee; +Cc: Eric W. Biederman, netdev
In-Reply-To: <CAEik5nOO9KQoEdvPUGwLBDJqOP9OWgz=G-3KMyvwiu4nwoyb=g@mail.gmail.com>
On Fri, 15 Jul 2011 19:34:04 -0500
Dan McGee <dan@archlinux.org> wrote:
> On Fri, Jul 15, 2011 at 7:26 PM, Eric W. Biederman
> <ebiederm@xmission.com> wrote:
> >
> > If libc has setns present use that version instead of
> > rolling the syscall wrapper by hand.
> >
I am more inclined to get rid of the wrapper completely
and just not put setns support in if libc doesn't support it.
^ permalink raw reply
* Re: NIC driver r8168 with r8169 for RTL8111/8168B and DGE-528T together
From: Danie Wessels @ 2011-07-20 22:11 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: netdev
In-Reply-To: <20110720122206.73898673@nehalam.ftrdhcpuser.net>
On 07/20/2011 09:22 PM, Stephen Hemminger wrote:
> On Wed, 20 Jul 2011 12:44:40 +0200
> Danie Wessels<dawessels@telkomsa.net> wrote:
>
>> I would like to use my onboard NIC (eth0) with its r8168 driver from
>> RealTek together with my D-Link NIC (eth4=eth1) with its r8169 default
>> driver from the install.
>
> The kernel developers do not support the use of out of tree
> vendor drivers. If there is some reason the default kernel driver does
> not work for your hardware, that is a bug that should be reported and
> it will get fixed.
>
I understand from Ubuntu forum that this bug (#347711) with the r8169
driver for the RTL8111/8168B is in the Will-not-fix state due to
(hardware?) it not being supported any more.
That leaves a number of us with little options.
.> Remove the 8168 PCI IDs from the r8169 driver and you should be set.
gr8. I can give that a try...8^0 (some more hints....?)
.>It ought to be supported by the kernel r8169 driver.
See bugs listed on Ubuntu:
https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.22/+bug/141343
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/221499
https://bugs.launchpad.net/linux/+bug/347711
And 0n Bug #347711
linux-kernel-bugs #12411
Duplicates of this bug
Bug #76489
Bug #347670
.> Which problem(s) do you have with it ?
No communication to outside devices. I can not ping my router through it
but can ping its IP.
What can I do now or where should I report it or how can I help?
RTFM 4 rules.d = where?
--
Dankie
Danie Wessels
^ permalink raw reply
* Re: sch_generic warn_on (timed out)
From: Francois Romieu @ 2011-07-20 21:53 UTC (permalink / raw)
To: davej; +Cc: David Miller, netdev
In-Reply-To: <20110711.141701.1453197953333902027.davem@davemloft.net>
David Miller <davem@davemloft.net> :
[...]
> > duping all others against. It seems to be showing up on a variety of different
> > hardware (r8169, atl1c, ipheth, e1000e, 8139too). Do all these drivers need
> > fixing ? or is it just 'crap hardware' ?
The r8169 driver has seen driver bugs, poorly supported hardware,
"interesting" hardware, evolving hardware, false alarm reports, crappy
maintainership and almost anything one can think of (as long as you do
not think about public datasheets or errata).
[...]
> I would track this on a per-device basis if I were you, instead of
> combining them all into one super-bug.
+1 +1 +1
One could almost split the r8169 problems further by XID, then eventually
by platform.
--
Ueimor
^ permalink raw reply
* Re: [patch net-next-2.6 16/47] enic: do vlan cleanup
From: vkolluri @ 2011-07-20 21:59 UTC (permalink / raw)
To: Jiri Pirko, netdev
Cc: davem, shemminger, eric.dumazet, greearb, mirqus, benve, roprabhu,
David (dwang2)
In-Reply-To: <1311173689-17419-17-git-send-email-jpirko@redhat.com>
These changes look good. Thanks Jiri.
-Vasanthy
On 7/20/11 7:54 AM, "Jiri Pirko" <jpirko@redhat.com> wrote:
> - unify vlan and nonvlan rx path
> - kill enic->vlan_group and enic_vlan_rx_register
>
> Signed-off-by: Jiri Pirko <jpirko@redhat.com>
> ---
> drivers/net/enic/enic.h | 1 -
> drivers/net/enic/enic_main.c | 32 ++++++--------------------------
> 2 files changed, 6 insertions(+), 27 deletions(-)
>
> diff --git a/drivers/net/enic/enic.h b/drivers/net/enic/enic.h
> index f0b062b..ce76d9a 100644
> --- a/drivers/net/enic/enic.h
> +++ b/drivers/net/enic/enic.h
> @@ -94,7 +94,6 @@ struct enic {
> ____cacheline_aligned struct vnic_wq wq[ENIC_WQ_MAX];
> spinlock_t wq_lock[ENIC_WQ_MAX];
> unsigned int wq_count;
> - struct vlan_group *vlan_group;
> u16 loop_enable;
> u16 loop_tag;
>
> diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
> index e25800f..67a27cd 100644
> --- a/drivers/net/enic/enic_main.c
> +++ b/drivers/net/enic/enic_main.c
> @@ -1029,14 +1029,6 @@ static void enic_set_rx_mode(struct net_device *netdev)
> }
> }
>
> -/* rtnl lock is held */
> -static void enic_vlan_rx_register(struct net_device *netdev,
> - struct vlan_group *vlan_group)
> -{
> - struct enic *enic = netdev_priv(netdev);
> - enic->vlan_group = vlan_group;
> -}
> -
> /* netif_tx_lock held, BHs disabled */
> static void enic_tx_timeout(struct net_device *netdev)
> {
> @@ -1264,23 +1256,13 @@ static void enic_rq_indicate_buf(struct vnic_rq *rq,
>
> skb->dev = netdev;
>
> - if (vlan_stripped) {
> -
> - if (netdev->features & NETIF_F_GRO)
> - vlan_gro_receive(&enic->napi[q_number],
> - enic->vlan_group, vlan_tci, skb);
> - else
> - vlan_hwaccel_receive_skb(skb,
> - enic->vlan_group, vlan_tci);
> + if (vlan_stripped)
> + __vlan_hwaccel_put_tag(skb, vlan_tci);
>
> - } else {
> -
> - if (netdev->features & NETIF_F_GRO)
> - napi_gro_receive(&enic->napi[q_number], skb);
> - else
> - netif_receive_skb(skb);
> -
> - }
> + if (netdev->features & NETIF_F_GRO)
> + napi_gro_receive(&enic->napi[q_number], skb);
> + else
> + netif_receive_skb(skb);
> } else {
>
> /* Buffer overflow
> @@ -2124,7 +2106,6 @@ static const struct net_device_ops
> enic_netdev_dynamic_ops = {
> .ndo_set_multicast_list = enic_set_rx_mode,
> .ndo_set_mac_address = enic_set_mac_address_dynamic,
> .ndo_change_mtu = enic_change_mtu,
> - .ndo_vlan_rx_register = enic_vlan_rx_register,
> .ndo_vlan_rx_add_vid = enic_vlan_rx_add_vid,
> .ndo_vlan_rx_kill_vid = enic_vlan_rx_kill_vid,
> .ndo_tx_timeout = enic_tx_timeout,
> @@ -2146,7 +2127,6 @@ static const struct net_device_ops enic_netdev_ops = {
> .ndo_set_rx_mode = enic_set_rx_mode,
> .ndo_set_multicast_list = enic_set_rx_mode,
> .ndo_change_mtu = enic_change_mtu,
> - .ndo_vlan_rx_register = enic_vlan_rx_register,
> .ndo_vlan_rx_add_vid = enic_vlan_rx_add_vid,
> .ndo_vlan_rx_kill_vid = enic_vlan_rx_kill_vid,
> .ndo_tx_timeout = enic_tx_timeout,
^ permalink raw reply
* Re: [PATCH] rtlwifi: Convert printks to pr_<level>
From: Joe Perches @ 2011-07-20 22:04 UTC (permalink / raw)
To: Larry Finger
Cc: Chaoming Li, John W. Linville, linux-wireless, netdev,
linux-kernel
In-Reply-To: <4E27048F.9090004@lwfinger.net>
On Wed, 2011-07-20 at 11:38 -0500, Larry Finger wrote:
> On 07/20/2011 10:51 AM, Joe Perches wrote:
> > Use the current logging styles.
> > Add pr_fmt where appropriate.
> > Remove now unnecessary prefixes from printks.
> > Convert hard coded prefix to __func__.
> > Add a missing "\n" to a format.
[]
> In general these look good, but why not define pr_fmt in rtlwifi/wifi.h. That
> header is used by every source file, and you only need the define once.
Because that's not the first #include in every file.
The #define pr_fmt has to be before anything that
includes kernel.h so it's safest/best to have it
be the first thing in the file.
At some point in the next year or so, all of the
uses of:
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
should be removed and that should become the default.
cheers, Joe
^ permalink raw reply
* RE: [PATCH 3/3] wireless: mwifiex: print hw address via %pM
From: Bing Zhao @ 2011-07-20 21:46 UTC (permalink / raw)
To: Andy Shevchenko,
linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, "John W. Lin
In-Reply-To: <8f12d3ad71585e863084560b227534a4b9e4af54.1311162926.git.andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
Hi Andy,
Thanks for the patch.
> -----Original Message-----
> From: Andy Shevchenko [mailto:andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org]
> Sent: Wednesday, July 20, 2011 6:35 AM
> To: linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; John W. Linville; linux-
> kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Cc: Andy Shevchenko; Bing Zhao
> Subject: [PATCH 3/3] wireless: mwifiex: print hw address via %pM
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
> Cc: Bing Zhao <bzhao-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
Acked-by: Bing Zhao <bzhao-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
Thanks,
Bing
> ---
> drivers/net/wireless/mwifiex/debugfs.c | 33 +++++++------------------------
> 1 files changed, 8 insertions(+), 25 deletions(-)
>
> diff --git a/drivers/net/wireless/mwifiex/debugfs.c b/drivers/net/wireless/mwifiex/debugfs.c
> index 1bcf9ea..d26a78b 100644
> --- a/drivers/net/wireless/mwifiex/debugfs.c
> +++ b/drivers/net/wireless/mwifiex/debugfs.c
> @@ -216,28 +216,19 @@ mwifiex_info_read(struct file *file, char __user *ubuf,
> p += sprintf(p, "bss_mode=\"%s\"\n", bss_modes[info.bss_mode]);
> p += sprintf(p, "media_state=\"%s\"\n",
> (!priv->media_connected ? "Disconnected" : "Connected"));
> - p += sprintf(p, "mac_address=\"%02x:%02x:%02x:%02x:%02x:%02x\"\n",
> - netdev->dev_addr[0], netdev->dev_addr[1],
> - netdev->dev_addr[2], netdev->dev_addr[3],
> - netdev->dev_addr[4], netdev->dev_addr[5]);
> + p += sprintf(p, "mac_address=\"%pM\"\n", netdev->dev_addr);
>
> if (GET_BSS_ROLE(priv) == MWIFIEX_BSS_ROLE_STA) {
> p += sprintf(p, "multicast_count=\"%d\"\n",
> netdev_mc_count(netdev));
> p += sprintf(p, "essid=\"%s\"\n", info.ssid.ssid);
> - p += sprintf(p, "bssid=\"%02x:%02x:%02x:%02x:%02x:%02x\"\n",
> - info.bssid[0], info.bssid[1],
> - info.bssid[2], info.bssid[3],
> - info.bssid[4], info.bssid[5]);
> + p += sprintf(p, "bssid=\"%pM\"\n", info.bssid);
> p += sprintf(p, "channel=\"%d\"\n", (int) info.bss_chan);
> p += sprintf(p, "region_code = \"%02x\"\n", info.region_code);
>
> netdev_for_each_mc_addr(ha, netdev)
> - p += sprintf(p, "multicast_address[%d]="
> - "\"%02x:%02x:%02x:%02x:%02x:%02x\"\n", i++,
> - ha->addr[0], ha->addr[1],
> - ha->addr[2], ha->addr[3],
> - ha->addr[4], ha->addr[5]);
> + p += sprintf(p, "multicast_address[%d]=\"%pM\"\n",
> + i++, ha->addr);
> }
>
> p += sprintf(p, "num_tx_bytes = %lu\n", priv->stats.tx_bytes);
> @@ -451,26 +442,18 @@ mwifiex_debug_read(struct file *file, char __user *ubuf,
> if (info.tx_tbl_num) {
> p += sprintf(p, "Tx BA stream table:\n");
> for (i = 0; i < info.tx_tbl_num; i++)
> - p += sprintf(p, "tid = %d, "
> - "ra = %02x:%02x:%02x:%02x:%02x:%02x\n",
> - info.tx_tbl[i].tid, info.tx_tbl[i].ra[0],
> - info.tx_tbl[i].ra[1], info.tx_tbl[i].ra[2],
> - info.tx_tbl[i].ra[3], info.tx_tbl[i].ra[4],
> - info.tx_tbl[i].ra[5]);
> + p += sprintf(p, "tid = %d, ra = %pM\n",
> + info.tx_tbl[i].tid, info.tx_tbl[i].ra);
> }
>
> if (info.rx_tbl_num) {
> p += sprintf(p, "Rx reorder table:\n");
> for (i = 0; i < info.rx_tbl_num; i++) {
> -
> - p += sprintf(p, "tid = %d, "
> - "ta = %02x:%02x:%02x:%02x:%02x:%02x, "
> + p += sprintf(p, "tid = %d, ta = %pM, "
> "start_win = %d, "
> "win_size = %d, buffer: ",
> info.rx_tbl[i].tid,
> - info.rx_tbl[i].ta[0], info.rx_tbl[i].ta[1],
> - info.rx_tbl[i].ta[2], info.rx_tbl[i].ta[3],
> - info.rx_tbl[i].ta[4], info.rx_tbl[i].ta[5],
> + info.rx_tbl[i].ta,
> info.rx_tbl[i].start_win,
> info.rx_tbl[i].win_size);
>
> --
> 1.7.5.4
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" 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
* Re: [PATCH] net: vlan: fix compile breakage from 69ecca8
From: Randy Dunlap @ 2011-07-20 21:06 UTC (permalink / raw)
To: David Lamparter
Cc: Stephen Rothwell, netdev, linux-next, linux-kernel, linux-driver,
Anirban Chakraborty, David S. Miller
In-Reply-To: <1311191033-714631-1-git-send-email-equinox@diac24.net>
On Wed, 20 Jul 2011 21:43:53 +0200 David Lamparter wrote:
> well, there was too much wood to see the tree and I messed up the
> configuration dependencies. let's make it work with unset
> CONFIG_VLAN_8021Q and remove the second definition of vlan_find_dev.
>
> Signed-off-by: David Lamparter <equinox@diac24.net>
> Cc: linux-driver@qlogic.com
> Cc: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
> Cc: David S. Miller <davem@davemloft.net>
> Cc: Randy Dunlap <rdunlap@xenotime.net>
Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Thanks.
> ---
> sorry for the mess-up... compiled with CONFIG_VLAN_8021Q=n,m and y
> this time; don't have qlcnic hw to test.
>
> drivers/net/qlcnic/qlcnic_main.c | 4 +++-
> include/linux/if_vlan.h | 5 -----
> 2 files changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c
> index 3579229..a2c39e9 100644
> --- a/drivers/net/qlcnic/qlcnic_main.c
> +++ b/drivers/net/qlcnic/qlcnic_main.c
> @@ -4198,13 +4198,15 @@ static void
> qlcnic_restore_indev_addr(struct net_device *netdev, unsigned long event)
> {
> struct qlcnic_adapter *adapter = netdev_priv(netdev);
> - struct vlan_group *grp;
> + struct vlan_group *grp = NULL;
> struct net_device *dev;
> u16 vid;
>
> qlcnic_config_indev_addr(adapter, netdev, event);
>
> +#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
> grp = rcu_dereference_rtnl(netdev->vlgrp);
> +#endif
> if (!grp)
> return;
>
> diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h
> index bc03e40..dbe41dc 100644
> --- a/include/linux/if_vlan.h
> +++ b/include/linux/if_vlan.h
> @@ -135,11 +135,6 @@ vlan_gro_frags(struct napi_struct *napi, struct vlan_group *grp,
> unsigned int vlan_tci);
>
> #else
> -static inline struct net_device *vlan_find_dev(struct net_device *real_dev,
> - u16 vlan_id)
> -{
> - return NULL;
> -}
>
> static inline struct net_device *vlan_dev_real_dev(const struct net_device *dev)
> {
> --
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
^ permalink raw reply
* Re: [patch] skbuff: use kfree_skb() instead of kfree()
From: Julie Sullivan @ 2011-07-20 21:03 UTC (permalink / raw)
To: Julia Lawall
Cc: Eric Dumazet, Dan Carpenter, Shirley Ma, David S. Miller,
Michał Mirosław, open list:NETWORKING [GENERAL],
kernel-janitors
In-Reply-To: <Pine.LNX.4.64.1107201035270.24382@ask.diku.dk>
>> > > Also, dont forget to say its a patch for net-next-2.6
>> >
>> > If you're using linux-next, is there a way to tell which tree a
>> > patch came from? Obviously in this case it's core networking, but
>> > in other cases how does that work?
>>
>> In this particular case, David will know for sure since patch is very
>> recent, but I wanted to make a general advice.
>>
>> Keep in mind David has to review dozens of patches _per_ day, so netdev
>> related patches need some extra cooperation from submitters to help the
>> maintainer.
>>
>> This extra cooperation means to test the patch on either net-next-2.6 or
>> net-2.6 tree ;)
>
> Maybe there is some way to integrate such a suggestion in get_maintainers
> or checkpatch? Otherwise, those who work on the code in a more breadth
> first way don't have much chance of knowing or remembering this advice.
>
> julia
I think Julia's observation is really on the nail, I wish there were
some way of doing this? If new or random testers or reviewers out
there aren't tracking/following a particular tree/project already -
i.e. if they don't _know_ beforehand, aren't they going to just assume
using linux-next is correct (at least that's what I do)?
Knowing what branch to most productively test patches against
beforehand might encourage more testers and submissions and also could
make maintainer's jobs a bit easier.
Cheers
Julie
^ permalink raw reply
* Re: NIC driver r8168 with r8169 for RTL8111/8168B and DGE-528T together
From: Francois Romieu @ 2011-07-20 20:30 UTC (permalink / raw)
To: Danie Wessels; +Cc: netdev
In-Reply-To: <4E26B198.4020606@telkomsa.net>
Danie Wessels <dawessels@telkomsa.net> :
[...]
> I would like to use my onboard NIC (eth0) with its r8168 driver from
> RealTek together with my D-Link NIC (eth4=eth1) with its r8169
> default driver from the install. Sepatately they seem to work...but
> I would like a firewall set up with NAT and had it before I
> "upgraded". ;^)
Remove the 8168 PCI IDs from the r8169 driver and you should be set.
[...]
> [ 1.486546] r8169 0000:03:00.0: eth0: RTL8168b/8111b at
> 0xf8024000, 00:1c:c0:a7:03:49, XID 98500000 IRQ 43
It ought to be supported by the kernel r8169 driver.
Which problem(s) do you have with it ?
--
Ueimor
^ permalink raw reply
* [PATCH net-next 3/8] tg3: Fix link down notify failure when EEE disabled
From: Matt Carlson @ 2011-07-20 20:20 UTC (permalink / raw)
To: davem; +Cc: netdev, mcarlson
Occasionally, when the network cable is removed after a successful
autonegotiation, the device will not send a link down interrupt to the
driver. This happens because of a bad interaction of an EEE
workaround. The fix is to adjust the code so that the root cause
condition does not happen.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
---
drivers/net/tg3.c | 38 +++++++++++++++++++++++++-------------
1 files changed, 25 insertions(+), 13 deletions(-)
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 2a9ab99..e0413bc 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -1858,6 +1858,12 @@ static void tg3_phy_eee_adjust(struct tg3 *tp, u32 current_link_up)
}
if (!tp->setlpicnt) {
+ if (current_link_up == 1 &&
+ !TG3_PHY_AUXCTL_SMDSP_ENABLE(tp)) {
+ tg3_phydsp_write(tp, MII_TG3_DSP_TAP26, 0x0000);
+ TG3_PHY_AUXCTL_SMDSP_DISABLE(tp);
+ }
+
val = tr32(TG3_CPMU_EEE_MODE);
tw32(TG3_CPMU_EEE_MODE, val & ~TG3_CPMU_EEEMD_LPI_ENABLE);
}
@@ -1872,7 +1878,9 @@ static void tg3_phy_eee_enable(struct tg3 *tp)
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5719 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57765) &&
!TG3_PHY_AUXCTL_SMDSP_ENABLE(tp)) {
- tg3_phydsp_write(tp, MII_TG3_DSP_TAP26, 0x0003);
+ val = MII_TG3_DSP_TAP26_ALNOKO |
+ MII_TG3_DSP_TAP26_RMRXSTO;
+ tg3_phydsp_write(tp, MII_TG3_DSP_TAP26, val);
TG3_PHY_AUXCTL_SMDSP_DISABLE(tp);
}
@@ -3128,13 +3136,26 @@ static int tg3_phy_autoneg_cfg(struct tg3 *tp, u32 advertise, u32 flowctrl)
if (!err) {
u32 err2;
+ val = 0;
+ /* Advertise 100-BaseTX EEE ability */
+ if (advertise & ADVERTISED_100baseT_Full)
+ val |= MDIO_AN_EEE_ADV_100TX;
+ /* Advertise 1000-BaseT EEE ability */
+ if (advertise & ADVERTISED_1000baseT_Full)
+ val |= MDIO_AN_EEE_ADV_1000T;
+ err = tg3_phy_cl45_write(tp, MDIO_MMD_AN, MDIO_AN_EEE_ADV, val);
+ if (err)
+ val = 0;
+
switch (GET_ASIC_REV(tp->pci_chip_rev_id)) {
case ASIC_REV_5717:
case ASIC_REV_57765:
case ASIC_REV_5719:
- val = MII_TG3_DSP_TAP26_ALNOKO |
- MII_TG3_DSP_TAP26_RMRXSTO |
- MII_TG3_DSP_TAP26_OPCSINPT;
+ /* If we advertised any eee advertisements above... */
+ if (val)
+ val = MII_TG3_DSP_TAP26_ALNOKO |
+ MII_TG3_DSP_TAP26_RMRXSTO |
+ MII_TG3_DSP_TAP26_OPCSINPT;
tg3_phydsp_write(tp, MII_TG3_DSP_TAP26, val);
/* Fall through */
case ASIC_REV_5720:
@@ -3143,15 +3164,6 @@ static int tg3_phy_autoneg_cfg(struct tg3 *tp, u32 advertise, u32 flowctrl)
MII_TG3_DSP_CH34TP2_HIBW01);
}
- val = 0;
- /* Advertise 100-BaseTX EEE ability */
- if (advertise & ADVERTISED_100baseT_Full)
- val |= MDIO_AN_EEE_ADV_100TX;
- /* Advertise 1000-BaseT EEE ability */
- if (advertise & ADVERTISED_1000baseT_Full)
- val |= MDIO_AN_EEE_ADV_1000T;
- err = tg3_phy_cl45_write(tp, MDIO_MMD_AN, MDIO_AN_EEE_ADV, val);
-
err2 = TG3_PHY_AUXCTL_SMDSP_DISABLE(tp);
if (!err)
err = err2;
--
1.7.3.4
^ permalink raw reply related
* [PATCH net-next 2/8] tg3: Fix link flap at 100Mbps with EEE enabled
From: Matt Carlson @ 2011-07-20 20:20 UTC (permalink / raw)
To: davem; +Cc: netdev, mcarlson
This patch increases the scope of the EEE interoperability workaround
to include more asic revisions. The workarond value is tuned to
workaround a link flap issue at 100Mbps.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
---
drivers/net/tg3.c | 9 +++++----
drivers/net/tg3.h | 2 +-
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 5bf7671..2a9ab99 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -3131,15 +3131,16 @@ static int tg3_phy_autoneg_cfg(struct tg3 *tp, u32 advertise, u32 flowctrl)
switch (GET_ASIC_REV(tp->pci_chip_rev_id)) {
case ASIC_REV_5717:
case ASIC_REV_57765:
- if (!tg3_phydsp_read(tp, MII_TG3_DSP_CH34TP2, &val))
- tg3_phydsp_write(tp, MII_TG3_DSP_CH34TP2, val |
- MII_TG3_DSP_CH34TP2_HIBW01);
- /* Fall through */
case ASIC_REV_5719:
val = MII_TG3_DSP_TAP26_ALNOKO |
MII_TG3_DSP_TAP26_RMRXSTO |
MII_TG3_DSP_TAP26_OPCSINPT;
tg3_phydsp_write(tp, MII_TG3_DSP_TAP26, val);
+ /* Fall through */
+ case ASIC_REV_5720:
+ if (!tg3_phydsp_read(tp, MII_TG3_DSP_CH34TP2, &val))
+ tg3_phydsp_write(tp, MII_TG3_DSP_CH34TP2, val |
+ MII_TG3_DSP_CH34TP2_HIBW01);
}
val = 0;
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h
index 6a43fc5..691539b 100644
--- a/drivers/net/tg3.h
+++ b/drivers/net/tg3.h
@@ -2180,7 +2180,7 @@
#define MII_TG3_DSP_TAP26_OPCSINPT 0x0004
#define MII_TG3_DSP_AADJ1CH0 0x001f
#define MII_TG3_DSP_CH34TP2 0x4022
-#define MII_TG3_DSP_CH34TP2_HIBW01 0x017b
+#define MII_TG3_DSP_CH34TP2_HIBW01 0x01ff
#define MII_TG3_DSP_AADJ1CH3 0x601f
#define MII_TG3_DSP_AADJ1CH3_ADCCKADJ 0x0002
#define MII_TG3_DSP_EXP1_INT_STAT 0x0f01
--
1.7.3.4
^ permalink raw reply related
* [PATCH net-next 8/8] tg3: Fix NVRAM selftest failures for 5720 devs
From: Matt Carlson @ 2011-07-20 20:20 UTC (permalink / raw)
To: davem; +Cc: netdev, mcarlson
This patch fixes NVRAM selftest failures for 5720 devices by fixing the
checksum area size.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
---
drivers/net/tg3.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index bce0f226..8035765 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -10655,7 +10655,7 @@ error:
#define NVRAM_SELFBOOT_FORMAT1_3_SIZE 0x1c
#define NVRAM_SELFBOOT_FORMAT1_4_SIZE 0x20
#define NVRAM_SELFBOOT_FORMAT1_5_SIZE 0x24
-#define NVRAM_SELFBOOT_FORMAT1_6_SIZE 0x4c
+#define NVRAM_SELFBOOT_FORMAT1_6_SIZE 0x50
#define NVRAM_SELFBOOT_HW_SIZE 0x20
#define NVRAM_SELFBOOT_DATA_SIZE 0x1c
--
1.7.3.4
^ permalink raw reply related
* [PATCH net-next 7/8] tg3: Return size from tg3_vpd_readblock()
From: Matt Carlson @ 2011-07-20 20:20 UTC (permalink / raw)
To: davem; +Cc: netdev, mcarlson
Newer VPD datablocks can exceed the size the tg3 driver is traditionally
used to. This can cause some of the routines that operate on the VPD
data to fail when in-fact they could have succeeded had they known the
correct size. This patch fixes the problem.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
---
drivers/net/tg3.c | 25 +++++++++++++------------
1 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index f2b0839..bce0f226 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -10573,7 +10573,7 @@ static void tg3_get_ethtool_stats(struct net_device *dev,
memcpy(tmp_stats, tg3_get_estats(tp), sizeof(tp->estats));
}
-static __be32 * tg3_vpd_readblock(struct tg3 *tp)
+static __be32 *tg3_vpd_readblock(struct tg3 *tp, u32 *vpdlen)
{
int i;
__be32 *buf;
@@ -10640,6 +10640,8 @@ static __be32 * tg3_vpd_readblock(struct tg3 *tp)
goto error;
}
+ *vpdlen = len;
+
return buf;
error:
@@ -10659,7 +10661,7 @@ error:
static int tg3_test_nvram(struct tg3 *tp)
{
- u32 csum, magic;
+ u32 csum, magic, len;
__be32 *buf;
int i, j, k, err = 0, size;
@@ -10800,18 +10802,17 @@ static int tg3_test_nvram(struct tg3 *tp)
kfree(buf);
- buf = tg3_vpd_readblock(tp);
+ buf = tg3_vpd_readblock(tp, &len);
if (!buf)
return -ENOMEM;
- i = pci_vpd_find_tag((u8 *)buf, 0, TG3_NVM_VPD_LEN,
- PCI_VPD_LRDT_RO_DATA);
+ i = pci_vpd_find_tag((u8 *)buf, 0, len, PCI_VPD_LRDT_RO_DATA);
if (i > 0) {
j = pci_vpd_lrdt_size(&((u8 *)buf)[i]);
if (j < 0)
goto out;
- if (i + PCI_VPD_LRDT_TAG_SIZE + j > TG3_NVM_VPD_LEN)
+ if (i + PCI_VPD_LRDT_TAG_SIZE + j > len)
goto out;
i += PCI_VPD_LRDT_TAG_SIZE;
@@ -13209,14 +13210,14 @@ static void __devinit tg3_read_vpd(struct tg3 *tp)
{
u8 *vpd_data;
unsigned int block_end, rosize, len;
+ u32 vpdlen;
int j, i = 0;
- vpd_data = (u8 *)tg3_vpd_readblock(tp);
+ vpd_data = (u8 *)tg3_vpd_readblock(tp, &vpdlen);
if (!vpd_data)
goto out_no_vpd;
- i = pci_vpd_find_tag(vpd_data, 0, TG3_NVM_VPD_LEN,
- PCI_VPD_LRDT_RO_DATA);
+ i = pci_vpd_find_tag(vpd_data, 0, vpdlen, PCI_VPD_LRDT_RO_DATA);
if (i < 0)
goto out_not_found;
@@ -13224,7 +13225,7 @@ static void __devinit tg3_read_vpd(struct tg3 *tp)
block_end = i + PCI_VPD_LRDT_TAG_SIZE + rosize;
i += PCI_VPD_LRDT_TAG_SIZE;
- if (block_end > TG3_NVM_VPD_LEN)
+ if (block_end > vpdlen)
goto out_not_found;
j = pci_vpd_find_info_keyword(vpd_data, i, rosize,
@@ -13249,7 +13250,7 @@ static void __devinit tg3_read_vpd(struct tg3 *tp)
goto partno;
memcpy(tp->fw_ver, &vpd_data[j], len);
- strncat(tp->fw_ver, " bc ", TG3_NVM_VPD_LEN - len - 1);
+ strncat(tp->fw_ver, " bc ", vpdlen - len - 1);
}
partno:
@@ -13262,7 +13263,7 @@ partno:
i += PCI_VPD_INFO_FLD_HDR_SIZE;
if (len > TG3_BPN_SIZE ||
- (len + i) > TG3_NVM_VPD_LEN)
+ (len + i) > vpdlen)
goto out_not_found;
memcpy(tp->board_part_number, &vpd_data[i], len);
--
1.7.3.4
^ permalink raw reply related
* [PATCH net-next 1/8] tg3: Fix io failures after chip reset
From: Matt Carlson @ 2011-07-20 20:20 UTC (permalink / raw)
To: davem; +Cc: netdev, mcarlson
Commit f2096f94b514d88593355995d5dd276961e88af1, entitled
"tg3: Add 5720 H2BMC support", needed to add code to preserve some bits
set by firmware. Unfortunately the new code causes throughput to stop
after a chip reset because it enables state machines before they are
ready. This patch undoes the problematic code. The bits will be
restored later in the init sequence.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
---
drivers/net/tg3.c | 18 ++++++------------
1 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index a5ff82d..5bf7671 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -7412,16 +7412,11 @@ static int tg3_chip_reset(struct tg3 *tp)
tw32(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl);
}
- if (tg3_flag(tp, ENABLE_APE))
- tp->mac_mode = MAC_MODE_APE_TX_EN |
- MAC_MODE_APE_RX_EN |
- MAC_MODE_TDE_ENABLE;
-
if (tp->phy_flags & TG3_PHYFLG_PHY_SERDES) {
- tp->mac_mode |= MAC_MODE_PORT_MODE_TBI;
+ tp->mac_mode = MAC_MODE_PORT_MODE_TBI;
val = tp->mac_mode;
} else if (tp->phy_flags & TG3_PHYFLG_MII_SERDES) {
- tp->mac_mode |= MAC_MODE_PORT_MODE_GMII;
+ tp->mac_mode = MAC_MODE_PORT_MODE_GMII;
val = tp->mac_mode;
} else
val = 0;
@@ -8559,12 +8554,11 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy)
udelay(10);
}
- if (tg3_flag(tp, ENABLE_APE))
- tp->mac_mode = MAC_MODE_APE_TX_EN | MAC_MODE_APE_RX_EN;
- else
- tp->mac_mode = 0;
tp->mac_mode |= MAC_MODE_TXSTAT_ENABLE | MAC_MODE_RXSTAT_ENABLE |
- MAC_MODE_TDE_ENABLE | MAC_MODE_RDE_ENABLE | MAC_MODE_FHDE_ENABLE;
+ MAC_MODE_TDE_ENABLE | MAC_MODE_RDE_ENABLE |
+ MAC_MODE_FHDE_ENABLE;
+ if (tg3_flag(tp, ENABLE_APE))
+ tp->mac_mode |= MAC_MODE_APE_TX_EN | MAC_MODE_APE_RX_EN;
if (!tg3_flag(tp, 5705_PLUS) &&
!(tp->phy_flags & TG3_PHYFLG_PHY_SERDES) &&
GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5700)
--
1.7.3.4
^ permalink raw reply related
* [PATCH net-next 6/8] tg3: Fix int selftest for recent devices.
From: Matt Carlson @ 2011-07-20 20:20 UTC (permalink / raw)
To: davem; +Cc: netdev, mcarlson
This patch fixes interrupt selftest failures for recent devices (57765,
5717, 5718. 5719, 5720) by disabling MSI one-shot mode and applying the
status tag workaround to the selftest code.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
---
drivers/net/tg3.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index e5c1bc9..f2b0839 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -9183,7 +9183,7 @@ static int tg3_test_interrupt(struct tg3 *tp)
* Turn off MSI one shot mode. Otherwise this test has no
* observable way to know whether the interrupt was delivered.
*/
- if (tg3_flag(tp, 57765_PLUS) && tg3_flag(tp, USING_MSI)) {
+ if (tg3_flag(tp, 57765_PLUS)) {
val = tr32(MSGINT_MODE) | MSGINT_MODE_ONE_SHOT_DISABLE;
tw32(MSGINT_MODE, val);
}
@@ -9211,6 +9211,10 @@ static int tg3_test_interrupt(struct tg3 *tp)
break;
}
+ if (tg3_flag(tp, 57765_PLUS) &&
+ tnapi->hw_status->status_tag != tnapi->last_tag)
+ tw32_mailbox_f(tnapi->int_mbox, tnapi->last_tag << 24);
+
msleep(10);
}
@@ -9225,7 +9229,7 @@ static int tg3_test_interrupt(struct tg3 *tp)
if (intr_ok) {
/* Reenable MSI one shot mode. */
- if (tg3_flag(tp, 57765_PLUS) && tg3_flag(tp, USING_MSI)) {
+ if (tg3_flag(tp, 57765_PLUS)) {
val = tr32(MSGINT_MODE) & ~MSGINT_MODE_ONE_SHOT_DISABLE;
tw32(MSGINT_MODE, val);
}
--
1.7.3.4
^ permalink raw reply related
* [PATCH net-next 5/8] tg3: Fix RSS indirection table distribution
From: Matt Carlson @ 2011-07-20 20:20 UTC (permalink / raw)
To: davem; +Cc: netdev, mcarlson
The current RSS indirection table is populated such that more traffic
will hit the first RSS ring. This patch adjusts the indirection table
so that the load is more evenly distributed.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
---
drivers/net/tg3.c | 21 +++++++++++++++------
1 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 5110ea0..e5c1bc9 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -8723,15 +8723,24 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy)
udelay(100);
if (tg3_flag(tp, ENABLE_RSS)) {
+ int i = 0;
u32 reg = MAC_RSS_INDIR_TBL_0;
- u8 *ent = (u8 *)&val;
- /* Setup the indirection table */
- for (i = 0; i < TG3_RSS_INDIR_TBL_SIZE; i++) {
- int idx = i % sizeof(val);
+ if (tp->irq_cnt == 2) {
+ for (i = 0; i < TG3_RSS_INDIR_TBL_SIZE; i += 8) {
+ tw32(reg, 0x0);
+ reg += 4;
+ }
+ } else {
+ u32 val;
- ent[idx] = i % (tp->irq_cnt - 1);
- if (idx == sizeof(val) - 1) {
+ while (i < TG3_RSS_INDIR_TBL_SIZE) {
+ val = i % (tp->irq_cnt - 1);
+ i++;
+ for (; i % 8; i++) {
+ val <<= 4;
+ val |= (i % (tp->irq_cnt - 1));
+ }
tw32(reg, val);
reg += 4;
}
--
1.7.3.4
^ permalink raw reply related
* [PATCH net-next 4/8] tg3: Add 5719 and 5720 to EEE_CAP list
From: Matt Carlson @ 2011-07-20 20:20 UTC (permalink / raw)
To: davem; +Cc: netdev, mcarlson
This patch adds the 5719 and the 5720 to the list of devices that are
EEE capable.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
---
drivers/net/tg3.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index e0413bc..5110ea0 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -13142,7 +13142,9 @@ static int __devinit tg3_phy_probe(struct tg3 *tp)
}
if (!(tp->phy_flags & TG3_PHYFLG_ANY_SERDES) &&
- ((tp->pdev->device == TG3PCI_DEVICE_TIGON3_5718 &&
+ (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5719 ||
+ GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5720 ||
+ (tp->pdev->device == TG3PCI_DEVICE_TIGON3_5718 &&
tp->pci_chip_rev_id != CHIPREV_ID_5717_A0) ||
(GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57765 &&
tp->pci_chip_rev_id != CHIPREV_ID_57765_A0)))
--
1.7.3.4
^ 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