netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "John W. Linville" <linville@tuxdriver.com>
To: netdev@oss.sgi.com, linux-kernel@vger.kernel.org
Cc: jgarzik@pobox.com, romieu@fr.zoreil.com
Subject: [patch netdev-2.6 0/2] r8169: vlan hwaccel fixes
Date: Thu, 21 Oct 2004 20:57:39 -0400	[thread overview]
Message-ID: <20041022005737.GA1945@tuxdriver.com> (raw)

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
-- 
John W. Linville
linville@tuxdriver.com

             reply	other threads:[~2004-10-22  0:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-22  0:57 John W. Linville [this message]
2004-10-22  1:00 ` [patch netdev-2.6 1/2] r8169: endian-swap return of rtl8169_tx_vlan_tag() John W. Linville
2004-10-22  1:02 ` [patch netdev-2.6 2/2] r8169: fix RxVlan bit manipulation John W. Linville
2004-10-22 20:28 ` [patch netdev-2.6 0/2] r8169: vlan hwaccel fixes Francois Romieu
2004-10-23  1:49   ` [patch netdev-2.6 3/3] r8169: simplify trick if() expression John W. Linville
2004-10-23  1:51   ` [patch netdev-2.6 0/2] r8169: vlan hwaccel fixes John W. Linville

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=20041022005737.GA1945@tuxdriver.com \
    --to=linville@tuxdriver.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@oss.sgi.com \
    --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).