netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matheos Worku <Matheos.Worku@Sun.COM>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, Ariel.Hendel@Sun.COM,
	Greg.Onufer@Sun.COM, jeff@garzik.org, Ashley.Saulsbury@Sun.COM
Subject: Re: [PATCH]: Second preliminary release of Sun Neptune driver
Date: Fri, 28 Sep 2007 11:10:45 -0700	[thread overview]
Message-ID: <46FD43A5.6070007@sun.com> (raw)
In-Reply-To: <20070927.220027.31653674.davem@davemloft.net>

David Miller wrote:
> Ok, this is rev2, changes:
>
> 1) Jumbo MTU support is now present.  I got stuck on this for
>    a while because I didn't realize that resetting the RX
>    XMAC would reset the XMAC_MAX register.  I thought that
>    was a TX XMAC resource, ho hum...
>
>    Fix this by re-initializing the TX MAC after resetting
>    the RX MAC.
>
> 2) Implementing support for jumbograms required a re-examination of
>    how TX queue handling was done.
>
>    Neptune can report the TX Head at a location which is in the middle
>    of a packet's group of descriptors for a multi segment packet.
>    Working around this would just overly complicate the code.
>
>    We don't need to use the TX Head register.  Instead, track the
>    "pkt_cnt" field of the TX_CS register.  The difference since the
>    last reading is the number of full TX frames we can reclaim from
>    the ring.
>
>    This is not only simpler, it allows us to only need one MMIO
>    access (for TX_CS) during a reclaim run instead of two (TX_CS
>    and TX_RING_HDL).
>
>    A side note, I'm purposefully not using TX mailbox support.  It's
>    broken in Neptune.  If you get the registers in the DMA mailbox, MK
>    and MMK are always both set in the TX_CS register.  So even if you
>    write the MK and MB bits back to TX_CS to clear the interrupt, the
>    MMK propagates to MK and you thus get another interrupt.  This
>    basically makes TX DMA mailbox support useless.
>
> 4) All register write accessors are now of the form xxx(reg, val)
>    instead of xxx(val, reg)
>
> 5) Kill PCI_DEVICE_ID_SUN_NEPTUNE define, unneeded.
>
> Performance isn't the best, but the driver is reasonably solid.  After
> I flesh out the remaining features that need to be implemented I'll
> take a closer look at that.
>
> Enjoy.
>
> commit 684a7c25fff607dc647f065761bb381f28bddbdb
> Author: David S. Miller <davem@sunset.davemloft.net>
> Date:   Thu Sep 27 21:43:57 2007 -0700
>
>     [NIU]: Add Sun Neptune ethernet driver.
>     
>     Signed-off-by: David S. Miller <davem@davemloft.net>
>
> diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
> index 467532c..3c94c8f 100644
> --- a/drivers/net/Kconfig
> +++ b/drivers/net/Kconfig
> @@ -2601,6 +2601,13 @@ config NETXEN_NIC
>  	help
>  	  This enables the support for NetXen's Gigabit Ethernet card.
>  
> +config NIU
> +	tristate "Sun Neptune 10Gbit Ethernet support"
> +	depends on PCI
> +	help
> +	  This enables support for cards based upon Sun's
> +	  Neptune chipset.
> +
>  config PASEMI_MAC
>  	tristate "PA Semi 1/10Gbit MAC"
>  	depends on PPC64 && PCI
> diff --git a/drivers/net/Makefile b/drivers/net/Makefile
> index 6220c50..cce379b 100644
> --- a/drivers/net/Makefile
> +++ b/drivers/net/Makefile
> @@ -242,3 +242,4 @@ obj-$(CONFIG_NETCONSOLE) += netconsole.o
>  obj-$(CONFIG_FS_ENET) += fs_enet/
>  
>  obj-$(CONFIG_NETXEN_NIC) += netxen/
> +obj-$(CONFIG_NIU) += niu.o
> diff --git a/drivers/net/niu.c b/drivers/net/niu.c
> new file mode 100644
> index 0000000..5b89559
> --- /dev/null
> +++ b/drivers/net/niu.c
>   

Dave,
Couple of comments on Jumbo support

TX Side:
Can we rule of fragment size > MAX_TX_DESC_LEN? If that is not the case, 
then the frags my need the same tx post and reclaim logic as the skb->data

RX Side
    Since the MAC is set not to strip FCS bytes, the last page could 
contain just 1 - 4 bytes of FCS. Not only this wastes the page but may 
result on bug RX process where skb->len is wrong and a page with junk is 
passed to the stack. In our off-the-tree driver, we check this condition 
and repost the last page back to the rbr, if it contains just the FCS bytes.

Regards,
Matheos


      reply	other threads:[~2007-09-28 18:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-28  5:00 [PATCH]: Second preliminary release of Sun Neptune driver David Miller
2007-09-28 18:10 ` Matheos Worku [this message]

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=46FD43A5.6070007@sun.com \
    --to=matheos.worku@sun.com \
    --cc=Ariel.Hendel@Sun.COM \
    --cc=Ashley.Saulsbury@Sun.COM \
    --cc=Greg.Onufer@Sun.COM \
    --cc=davem@davemloft.net \
    --cc=jeff@garzik.org \
    --cc=netdev@vger.kernel.org \
    /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).