multicast filtering doesn't work for ODROID C1+ with if_dwc even after r301693

Guy Yur guyyur at gmail.com
Sat Jun 11 15:48:16 UTC 2016


Hi,

Multicast filtering doesn't work on my ODROID C1+.
IPv6 connections to the board fail unless the card is put
in promiscuous mode.

Posting again since I see some changes to if_dwc were done in r301693.
My previous post:
https://lists.freebsd.org/pipermail/freebsd-arm/2016-March/013528.html

The board uses if_dwc and I am using a newer build than r301693
which added hashing fixes for DWC_GMAC_ALT_DESC.
Filtering didn't work for me with builds before r301693 either.

I don't have the dwc manual so I looked at the NetBSD and Linux drivers.
NetBSD only supports the Allwinner configuration with 64 hash entries.
Linux uses snps,multicast-filter-bins dts property when the interface
has more than 64 entries, for example socfpga.dtsi (on FreeBSD it doesn't
have the property, probably older version of the file).

Both use the upper 6-bits and not the upper 8-bits when the hash table
has only 64 entries.
Linux uses the upper 8-bits when the hash table has 256 entries.

They also program registers 0x08 and 0x0c instead of
HASH_TABLE_REG(n) 0x500 + (0x4 * n) for 64 entries.
AWIN_GMAC_MAC_HTHIGH and AWIN_GMAC_MAC_HTLOW in NetBSD driver.

Attached crude patch that uses 6-lower bits (when reversed) instead
of 8-lower bits for DWC_GMAC_ALT_DESC and also uses registers 0x08
and 0x0c instead.

With the patch changes I can connect to the board using IPv6.

Thanks,
Guy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: if_dwc_64entry_multicast.patch
Type: application/octet-stream
Size: 2165 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-arm/attachments/20160611/0c65e259/attachment.obj>


More information about the freebsd-arm mailing list