r8169: vlan hwaccel fixes
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 2 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | r8169: endian-swap return of rtl8169_tx_vlan_tag()drivers/ | +1 | 0 replies | |
| 2/2 | r8169: fix RxVlan bit manipulationdrivers/ | +4 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [patch netdev-2.6 0/2] r8169: vlan hwaccel fixes
After taking a little time to implement vlan hwaccl features for the r8169 driver, I discovered that someone had already beaten me to it! :-)
Anyway, at least the experience put me in an ideal position to review the changes that had already been made. I found a couple of places that need some work.
Patch 1:
The return value of rtl8169_tx_vlan_tag() is not being endian-swapped to little endian. The hardware registers are little endian, even though the vlan tag value in this register (16-bits only) is big endian -- confusing! Anyway, I'll be posting a follow-up patch to correct this.
Patch 2:
The RxVlan bit in the CPlusCmd register is being turned-on in rtl8169_vlan_rx_register() without regard to the value passed-in for grp. rtl8169_vlan_rx_register() is called w/ a non-NULL grp value when the first vlan interface is created, then w/ a NULL grp value when the last vlan interface is removed.
Similarly, the RxVlan bit in the CPlusCmd register is being turned-off in rtl8169_vlan_rx_kill_vid() without regard to anything. This function is called when vlan interfaces are removed, but there may still be other vlan interfaces still associated with the physical interface.
The net effect of the status quo is that vlan hwaccel is enabled after the first vlan interfaces is created, UNTIL a vlan interface is removed. After a single vlan interface is removed, no vlan hwaccel will occur (on receive) until another vlan interface is created. The second follow-up patch I post will correct this by turning-on the RxVlan bit when rtl8169_vlan_rx_register() is called w/ a non-NULL grp value and turning-off the RxVlan bit when it is called w/ a NULL grp value. Manipulation of the RxVlan bit will be removed from rtl8169_vlan_rx_kill_vid().
Patches to follow...
Thanks,
John
Signature · 2 lines
John W. Linville [email protected]