linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: brking@linux.vnet.ibm.com
Cc: linuxppc-dev@ozlabs.org, rcjenn@linux.vnet.ibm.com,
	santil@linux.vnet.ibm.com, netdev@vger.kernel.org
Subject: Re: [PATCH 2/6] ibmveth: Implement ethtool hooks to enable/disable checksum offload
Date: Tue, 07 Aug 2007 18:16:34 -0400	[thread overview]
Message-ID: <46B8EF42.1010708@garzik.org> (raw)
In-Reply-To: <46B8ED10.1060701@linux.vnet.ibm.com>

Brian King wrote:
> Jeff Garzik wrote:
>> Brian King wrote:
>>> This patch adds the appropriate ethtool hooks to allow for enabling/disabling
>>> of hypervisor assisted checksum offload for TCP.
>>>
>>> Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
>>> ---
>>>
>>>  linux-2.6-bjking1/drivers/net/ibmveth.c |  118 +++++++++++++++++++++++++++++++-
>>>  linux-2.6-bjking1/drivers/net/ibmveth.h |    1 
>>>  2 files changed, 117 insertions(+), 2 deletions(-)
>>>
>>> diff -puN drivers/net/ibmveth.c~ibmveth_csum_offload_ethtool drivers/net/ibmveth.c
>>> --- linux-2.6/drivers/net/ibmveth.c~ibmveth_csum_offload_ethtool	2007-08-01 14:55:14.000000000 -0500
>>> +++ linux-2.6-bjking1/drivers/net/ibmveth.c	2007-08-01 14:55:14.000000000 -0500
>>> @@ -641,12 +641,125 @@ static u32 netdev_get_link(struct net_de
>>>  	return 1;
>>>  }
>>>  
>>> +static void ibmveth_set_rx_csum_flags(struct net_device *dev, u32 data)
>>> +{
>>> +	struct ibmveth_adapter *adapter = dev->priv;
>>> +
>>> +	if (data)
>>> +		adapter->rx_csum = 1;
>>> +	else {
>>> +		adapter->rx_csum = 0;
>>> +		dev->features &= ~NETIF_F_IP_CSUM;
>> why does this RX-related code clear a TX-related flag?
> 
> Its related to how the pSeries firmware works. The firmware provides an interface
> to enable "checksum offload", which means both tx and rx checksum offload from
> the firmware's point of view. The firmware does not support enabling checksum
> offload for only rx. If I disable it for rx I have to disable it for tx as
> well, otherwise the firmware will reject all future tx buffers I throw at it
> that are not checksummed.

ACK once you add a comment describing this :)

  reply	other threads:[~2007-08-07 22:16 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-06 19:42 [PATCH 1/6] ibmveth: Enable TCP checksum offload Brian King
2007-08-06 19:42 ` [PATCH 2/6] ibmveth: Implement ethtool hooks to enable/disable " Brian King
2007-08-07 21:48   ` Jeff Garzik
2007-08-07 22:07     ` Brian King
2007-08-07 22:16       ` Jeff Garzik [this message]
2007-08-06 19:42 ` [PATCH 3/6] ibmveth: Add ethtool TSO handlers Brian King
2007-08-07 21:50   ` Jeff Garzik
2007-08-06 19:42 ` [PATCH 4/6] ibmveth: Add ethtool driver stats hooks Brian King
2007-08-07 21:50   ` Jeff Garzik
2007-08-06 19:42 ` [PATCH 5/6] ibmveth: Remove dead frag processing code Brian King
2007-08-06 19:42 ` [PATCH 6/6] ibmveth: Remove use of bitfields Brian King
2007-08-07 21:56   ` Jeff Garzik
2007-08-07 21:46 ` [PATCH 1/6] ibmveth: Enable TCP checksum offload Jeff Garzik
  -- strict thread matches above, loose matches on Subject: below --
2007-08-10 19:28 Brian King
2007-08-10 19:29 ` [PATCH 2/6] ibmveth: Implement ethtool hooks to enable/disable " Brian King
2007-08-17 14:16 [PATCH 1/6] ibmveth: Enable TCP " Brian King
2007-08-17 14:16 ` [PATCH 2/6] ibmveth: Implement ethtool hooks to enable/disable " Brian King

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=46B8EF42.1010708@garzik.org \
    --to=jeff@garzik.org \
    --cc=brking@linux.vnet.ibm.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=netdev@vger.kernel.org \
    --cc=rcjenn@linux.vnet.ibm.com \
    --cc=santil@linux.vnet.ibm.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).