netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Anand Raj Manickam <anandrm@gmail.com>
To: Francois Romieu <romieu@fr.zoreil.com>
Cc: netdev@vger.kernel.org, Hayes <hayeswang@realtek.com>
Subject: Re: Realtek r8168C / r8169 driver VLAN TAG stripping
Date: Fri, 28 Jan 2011 07:10:21 +0530	[thread overview]
Message-ID: <AANLkTin17BgJDdTbSMork8XEw4PVz_KrVBZvHdQwTRNH@mail.gmail.com> (raw)
In-Reply-To: <20110127165031.GA7966@electric-eye.fr.zoreil.com>

On Thu, Jan 27, 2011 at 10:20 PM, Francois Romieu <romieu@fr.zoreil.com> wrote:
> Anand Raj Manickam <anandrm@gmail.com> :
>> On Thu, Jan 27, 2011 at 8:37 PM, Francois Romieu <romieu@fr.zoreil.com> wrote:
>> > Anand Raj Manickam <anandrm@gmail.com> :
> [...]
>> > - ip addr show
>>
>> 3: eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000
>>     link/ether 00:17:54:00:f6:62 brd ff:ff:ff:ff:ff:ff
>>     inet 172.16.1.1/16 brd 172.16.255.255 scope global eth0
>>     inet6 fe80::217:54ff:fe00:f662/64 scope link
>>        valid_lft forever preferred_lft forever
>>
>> 8: eth0.50@eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc noqueue
>>     link/ether 00:17:54:00:f6:62 brd ff:ff:ff:ff:ff:ff
>>     inet 172.16.10.10/24 brd 172.16.10.255 scope global eth0.50
>>     inet6 fe80::217:54ff:fe00:f662/64 scope link
>>        valid_lft forever preferred_lft forever
>
> Could you try again after issuing :
>
> ip addr del 172.16.1.1/16 brd 172.16.255.255 dev eth0


I did try this NO luck ;-(



>
> then send the unabbreviated "ip addr show" and "ip route show all" if
> things do not perform better.
>

 ip addr show
1: lo: <LOOPBACK,UP,10000> mtu 16436 qdisc noqueue
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: sit0: <NOARP> mtu 1480 qdisc noop
    link/sit 0.0.0.0 brd 0.0.0.0
3: eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:17:54:00:f6:62 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::217:54ff:fe00:f662/64 scope link
       valid_lft forever preferred_lft forever
4: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:17:54:00:f6:63 brd ff:ff:ff:ff:ff:ff
5: eth2: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:30:67:09:2c:b9 brd ff:ff:ff:ff:ff:ff
    inet 10.1.1.2/24 brd 10.1.1.255 scope global eth2
    inet6 fe80::230:67ff:fe09:2cb9/64 scope link
       valid_lft forever preferred_lft forever
6: eth3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
    link/ether 00:17:54:00:65:6b brd ff:ff:ff:ff:ff:ff
7: eth4: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:17:54:00:65:6a brd ff:ff:ff:ff:ff:ff
    inet 192.168.138.155/24 brd 192.168.138.255 scope global eth4
    inet6 fe80::217:54ff:fe00:656a/64 scope link
       valid_lft forever preferred_lft forever
8: eth0.50@eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc noqueue
    link/ether 00:17:54:00:f6:62 brd ff:ff:ff:ff:ff:ff
    inet 172.16.10.10/24 brd 172.16.10.255 scope global eth0.50
    inet6 fe80::217:54ff:fe00:f662/64 scope link
       valid_lft forever preferred_lft forever


> (no iptables / ip rules wizardry, right ?)
>
> [...]
>> > - ethtool -k eth0
>>
>> Offload parameters for eth0:
>> rx-checksumming: on
>> tx-checksumming: off
>> scatter-gather: off
>> tcp segmentation offload: off
>> udp fragmentation offload: off
>> generic segmentation offload: off
>
> Ok.
>
> [...]
>> > I do not get the "VLAN tag gets stripped" concept, especially on Tx.
>> > Does it mean "no packet" or "a packet whose content is wrong" ?
>>
>> Sorry for not being clear ;-)
>>
>> When we transmit a packet with VLAN TAG , the TAG get stripped when
>> transmitted through the device , the other end trunk port / sniffer
>> does NOT see a TAG.
>> Similarly , when a VLAN Tagged packet is sent from the other end , The
>> TAG gets stripped by the device , We DONOT see the tag .
>
> But the data flows in both directions, right ?
>
>> I use tcpdump -i eth0 -n -nn -e vlan 50
>> to see if the packets are gettin tagged or NOT .
>>
>> The same config works on forcedeth
>
> What do you call "same config" ?

The Same setup below works on forcedeth driver
>
> I am mildly convinced that your config is simple enough to isolate a
> driver level vlan problem.

The reason why i m sure its on the Driver / Chipset is this ..

The 8021q module is loaded .
vconfig add eth0 50
ifconfig eth0.50 172.16.1.10 up

ping -I eth0.50 172.16.1.1 .

All packets on Tx & Rx have the VLAN tag stripped on Tx & Rx.

On debugging the Driver , we found that on Tx the VLAN tag is present.

static int rtl8169_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
.
.
tp->tx_skb[entry].len = len;
txd->addr = cpu_to_le64(mapping);
txd->opts2 = cpu_to_le32(rtl8169_tx_vlan_tag(tp, skb));
printk("The Vlan tag %x \n",txd->opts2);
.
.
}

The Vlan tag 23200

In the above value 23200
2 - TxVlanTag
32 - Vlan tag (50).

From the above we are clear that the Vlan tag reaches the driver .







>
> --
> Ueimor
>

  reply	other threads:[~2011-01-28  1:40 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-13 14:40 Realtek r8168C / r8169 driver VLAN TAG stripping Anand Raj Manickam
2011-01-13 15:09 ` Anand Raj Manickam
2011-01-16 19:20   ` Francois Romieu
     [not found]     ` <AANLkTi=uNKMj_gs_bKRQ1tQa0TMwdnyrtVcR5JPNpmJv@mail.gmail.com>
2011-01-17  7:34       ` Anand Raj Manickam
2011-01-18  1:21         ` Francois Romieu
2011-01-27 10:35           ` Anand Raj Manickam
2011-01-27 15:07             ` Francois Romieu
2011-01-27 15:31               ` Anand Raj Manickam
2011-01-27 16:50                 ` Francois Romieu
2011-01-28  1:40                   ` Anand Raj Manickam [this message]
2011-01-28 12:06                     ` Francois Romieu
2011-01-28 12:16                       ` Anand Raj Manickam
2011-01-31  5:45                       ` hayeswang
2011-01-31 13:14                       ` Ivan Vecera
2011-02-01 10:12                         ` Francois Romieu
2011-02-01 10:38                           ` Anand Raj Manickam
2011-02-09  9:51                             ` hayeswang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTin17BgJDdTbSMork8XEw4PVz_KrVBZvHdQwTRNH@mail.gmail.com \
    --to=anandrm@gmail.com \
    --cc=hayeswang@realtek.com \
    --cc=netdev@vger.kernel.org \
    --cc=romieu@fr.zoreil.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).