libbsd VLAN tagging
Chris Johns
chrisj at rtems.org
Thu Apr 23 00:48:36 UTC 2020
On 22/4/20 7:52 pm, Christian Mauderer wrote:
> On 22/04/2020 09:47, Matthew J Fletcher wrote:
>> Hi,
>>
>> How would an application using libbsd add VLAN tags to transmitted
>> frames so an external switch chip could process them ?
>>
>> Is there an application / libbsd interface for this or does it require
>> the driver to be modified.
>
> Hello Matthew,
>
> in theory it should be the same interface like on FreeBSD:
>
> https://www.freebsd.org/doc/handbook/network-vlan.html
>
> But as far as I know it needs driver support:
>
> https://www.freebsd.org/cgi/man.cgi?query=vlan&sektion=4&manpath=freebsd-release-ports
>
Running `ifconfig` on a board running libbsd reports what the driver
supports. For a Zynq I get ...
# ifconfig
cgem0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu
1500
options=68008b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
ether 70:b3:d5:c1:60:29
hwaddr 0e:b0:ba:5e:ba:11
inet6 fe80::72b3:d5ff:fec1:6029%cgem0 prefixlen 64 scopeid 0x1
inet 10.10.5.189 netmask 0xffffff00 broadcast 10.10.5.255
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
Note, `VLAN` is listed in the options so it is supported and enabled and
you can configure support using `rc.conf`. This documented in link
Christian provided above.
Chris
More information about the users
mailing list