Re: Re: newbie question on enabling vlan feature in the driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



kmk wrote:
Ben,

Here is ifconfig -a output from the arm board (modifying the eth driver for
this board to add vlan feature). I used ping -c -s 1496 192.168.55.1 <http://192.168.55.1> from
the remote pc.

It looks like the ARM system is receiving VLAN tags..possibly correctly.

Do you see vlan tags when you sniff the physical ethernet interface?

Intel's NIC strips the vlan headers (it does hw-accel), so you won't
see tags there.

As Ard previously said...don't bother to set that vlan register in your
NIC and see if it works.

Use smaller packet sizes at first to make sure it's not an MTU issue.

Ben



=========================================================================
ifconfig -a

eth0 Link encap:Ethernet HWaddr 00:60:CE:12:00:00 inet addr:169.254.100.2 <http://169.254.100.2> Bcast:169.254.255.255 <http://169.254.255.255> Mask:255.255.0.0 <http://255.255.0.0>
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:32 errors:10 dropped:0 overruns:0 frame:0
          TX packets:145 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2612 (2.5 KiB)  TX bytes:16494 (16.1 KiB)
          Interrupt:29

eth0.2 Link encap:Ethernet HWaddr 00:60:CE:12:00:00 inet addr:192.168.55.1 <http://192.168.55.1> Bcast:192.168.55.255 <http://192.168.55.255> Mask:255.255.255.0 <http://255.255.255.0>
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:32 errors:0 dropped:0 overruns:0 frame:0
          TX packets:145 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2164 (2.1 KiB)  TX bytes:16494 ( 16.1 KiB)

lo Link encap:Local Loopback inet addr:127.0.0.1 <http://127.0.0.1> Mask:255.0.0.0 <http://255.0.0.0>
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:81 errors:0 dropped:0 overruns:0 frame:0
          TX packets:81 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:33090 (32.3 KiB)  TX bytes:33090 ( 32.3 KiB)

# cat /proc/n# cat /proc/net/vl# cat /proc/net/vlan/e# cat /proc/net/vlan/eth0.2
eth0.2  VID: 2     REORDER_HDR: 1  dev->priv_flags: 1
         total frames received           32
          total bytes received         2164
      Broadcast/Multicast Rcvd            0

      total frames transmitted          145
       total bytes transmitted        16494
            total headroom inc            0
           total encap on xmit          145
Device: eth0
INGRESS priority mappings: 0:0  1:0  2:0  3:0  4:0  5:0  6:0 7:0
EGRESSS priority Mappings:
#
==========================================================================


Here is the ifconfig -a output from the remote pc (e1000 with vlan enabled)

eth0 Link encap:Ethernet HWaddr 00:0B:DB:5C:55:B8 inet addr:169.254.100.1 <http://169.254.100.1> Bcast:169.254.255.255 <http://169.254.255.255> Mask: 255.255.0.0 <http://255.255.0.0>
          inet6 addr: fe80::20b:dbff:fe5c:55b8/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:0 (0.0 b)  TX bytes:1008 (1008.0 b)
          Base address:0xdcc0 Memory:ff6e0000-ff700000

eth0.2 Link encap:Ethernet HWaddr 00:0B:DB:5C:55:B8 inet addr:192.168.55.2 <http://192.168.55.2> Bcast:192.168.55.255 <http://192.168.55.255> Mask:255.255.255.0 <http://255.255.255.0>
          inet6 addr: fe80::20b:dbff:fe5c:55b8/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:468 (468.0 b)

lo Link encap:Local Loopback inet addr:127.0.0.1 <http://127.0.0.1> Mask:255.0.0.0 <http://255.0.0.0>
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

eth0.2  VID: 2     REORDER_HDR: 1  dev->priv_flags: 1
         total frames received            2
          total bytes received           84
      Broadcast/Multicast Rcvd            0

      total frames transmitted           12
       total bytes transmitted         3696
            total headroom inc            0
           total encap on xmit            0
Device: eth0
INGRESS priority mappings: 0:0  1:0  2:0  3:0  4:0  5:0  6:0 7:0
EGRESSS priority Mappings:





On 3/14/07, *kmk* <km7kumar@xxxxxxxxx <mailto:km7kumar@xxxxxxxxx>> wrote:

    Ben, I enabled vlan in the eth mac by writing to vlan1tag and adjust
    mtu to handle
    vlan. Now, when I ping from a remote pc which also has vlan enabled
    interface,
    I don't see vlan tags in the frames. Same issue if I ping the remote
    PC. Basically,
    I don't see vlan tag in tx/rx directions.


    /kmk

    On 3/13/07, *Muthu Kumar* < km7kumar@xxxxxxxxx
    <mailto:km7kumar@xxxxxxxxx>> wrote:

        Ben,

        Thanks for your response. The mac data sheet says, when 0x8100
        is written to the
        van1_tag register, the mac compares 13th & 14th bytes of
        incoming frame and, if it
        finds a match, it sets vlan1 bit in rx status register. However,
        this particular status
        bit is not actually exposed to driver access. The documentation
        could be wrong.

        Other than the above, no behaviour changes. In this case, I just
        simply ensure
        that the driver/chip can handle MTU + 4 bytes? No need to enable
        NETIF_VLAN_HW_TX/RX
        and related callbacks?

        By the way, I don't see my postings @
        http://ns2.lanforge.com/pipermail/vlan/2007-March/thread.html
        <http://ns2.lanforge.com/pipermail/vlan/2007-March/thread.html>.

        Thanks
        /kmk


        On 3/13/07, *Muthu Kumar* < km7kumar@xxxxxxxxx
        <mailto:km7kumar@xxxxxxxxx>> wrote:

            'm trying to enable VLAN in my eth driver. The eth mac supports
            vlan processing and has a register (vlantag1) that should be
            written
            with 0x8100 to enable VLAN processing. Other than this, the
            mac does
            not have any other vlan related registers or anything else.
            It does not give
            any indication during rx if VLAN pkts received.

            How do I enable VLAN in my driver for such a MAC? I'm basically
            confused with all the callbacks such as vlan_rx_register etc
            most
            drivers support.

            Currently, in my driver I've enabled the features
            NETIF_VLAN_HW_TX/RX
            and providing the above callbacks. But I'm not sure whether
            these flags
            are applicable to my driver.

            what else I need to do? I'm kinda stuck here. Any help would
            be highly
            appreciated.

            thx
/kmk




------------------------------------------------------------------------

_______________________________________________
Vlan mailing list
Vlan@xxxxxxxxxxxxxxx
http://www.candelatech.com/mailman/listinfo/vlan


--
Ben Greear <greearb@xxxxxxxxxxxxxxx>
Candela Technologies Inc  http://www.candelatech.com

_______________________________________________
Vlan mailing list
Vlan@xxxxxxxxxxxxxxx
http://www.candelatech.com/mailman/listinfo/vlan

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux