netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sean Anderson <sean.anderson@linux.dev>
To: "Pandey, Radhey Shyam" <radhey.shyam.pandey@amd.com>,
	"David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Cc: "Simek, Michal" <michal.simek@amd.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3] net: xilinx: axienet: Remove unused checksum variables
Date: Thu, 5 Sep 2024 10:09:51 -0400	[thread overview]
Message-ID: <e3cc6c1f-97f4-45f1-a909-00cf986cd465@linux.dev> (raw)
In-Reply-To: <MN0PR12MB595303AE2C49E45A0CF435A1B79C2@MN0PR12MB5953.namprd12.prod.outlook.com>

On 9/4/24 13:03, Pandey, Radhey Shyam wrote:
>> -----Original Message-----
>> From: Sean Anderson <sean.anderson@linux.dev>
>> Sent: Wednesday, September 4, 2024 12:14 AM
>> To: Pandey, Radhey Shyam <radhey.shyam.pandey@amd.com>; David S .
>> Miller <davem@davemloft.net>; Eric Dumazet <edumazet@google.com>;
>> Jakub Kicinski <kuba@kernel.org>; Paolo Abeni <pabeni@redhat.com>;
>> netdev@vger.kernel.org
>> Cc: Simek, Michal <michal.simek@amd.com>; linux-arm-
>> kernel@lists.infradead.org; linux-kernel@vger.kernel.org; Sean Anderson
>> <sean.anderson@linux.dev>
>> Subject: [PATCH 1/3] net: xilinx: axienet: Remove unused checksum variables
>> 
>> These variables are set but never used. Remove them
>> 
> 
> Nit - Missing "." at the end.

Will fix if I send a v2.

> Also, just curious how you found these unused vars ? 
> using some tool or in code walkthrough?

I read the code and noticed it :)

--Sean

>> Signed-off-by: Sean Anderson <sean.anderson@linux.dev>
> 
> Rest seems fine.
> Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
> 
> 
>> ---
>> 
>>  drivers/net/ethernet/xilinx/xilinx_axienet.h      |  5 -----
>>  drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 12 ------------
>>  2 files changed, 17 deletions(-)
>> 
>> diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet.h
>> b/drivers/net/ethernet/xilinx/xilinx_axienet.h
>> index c301dd2ee083..b9d2d7319220 100644
>> --- a/drivers/net/ethernet/xilinx/xilinx_axienet.h
>> +++ b/drivers/net/ethernet/xilinx/xilinx_axienet.h
>> @@ -527,8 +527,6 @@ struct skbuf_dma_descriptor {
>>   *		  supported, the maximum frame size would be 9k. Else it is
>>   *		  1522 bytes (assuming support for basic VLAN)
>>   * @rxmem:	Stores rx memory size for jumbo frame handling.
>> - * @csum_offload_on_tx_path:	Stores the checksum selection on TX
>> side.
>> - * @csum_offload_on_rx_path:	Stores the checksum selection on RX
>> side.
>>   * @coalesce_count_rx:	Store the irq coalesce on RX side.
>>   * @coalesce_usec_rx:	IRQ coalesce delay for RX
>>   * @coalesce_count_tx:	Store the irq coalesce on TX side.
>> @@ -606,9 +604,6 @@ struct axienet_local {
>>  	u32 max_frm_size;
>>  	u32 rxmem;
>> 
>> -	int csum_offload_on_tx_path;
>> -	int csum_offload_on_rx_path;
>> -
>>  	u32 coalesce_count_rx;
>>  	u32 coalesce_usec_rx;
>>  	u32 coalesce_count_tx;
>> diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
>> b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
>> index fe6a0e2e463f..60ec430f3eb0 100644
>> --- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
>> +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
>> @@ -2631,38 +2631,26 @@ static int axienet_probe(struct platform_device
>> *pdev)
>>  	if (!ret) {
>>  		switch (value) {
>>  		case 1:
>> -			lp->csum_offload_on_tx_path =
>> -				XAE_FEATURE_PARTIAL_TX_CSUM;
>>  			lp->features |= XAE_FEATURE_PARTIAL_TX_CSUM;
>>  			/* Can checksum TCP/UDP over IPv4. */
>>  			ndev->features |= NETIF_F_IP_CSUM;
>>  			break;
>>  		case 2:
>> -			lp->csum_offload_on_tx_path =
>> -				XAE_FEATURE_FULL_TX_CSUM;
>>  			lp->features |= XAE_FEATURE_FULL_TX_CSUM;
>>  			/* Can checksum TCP/UDP over IPv4. */
>>  			ndev->features |= NETIF_F_IP_CSUM;
>>  			break;
>> -		default:
>> -			lp->csum_offload_on_tx_path =
>> XAE_NO_CSUM_OFFLOAD;
>>  		}
>>  	}
>>  	ret = of_property_read_u32(pdev->dev.of_node, "xlnx,rxcsum",
>> &value);
>>  	if (!ret) {
>>  		switch (value) {
>>  		case 1:
>> -			lp->csum_offload_on_rx_path =
>> -				XAE_FEATURE_PARTIAL_RX_CSUM;
>>  			lp->features |= XAE_FEATURE_PARTIAL_RX_CSUM;
>>  			break;
>>  		case 2:
>> -			lp->csum_offload_on_rx_path =
>> -				XAE_FEATURE_FULL_RX_CSUM;
>>  			lp->features |= XAE_FEATURE_FULL_RX_CSUM;
>>  			break;
>> -		default:
>> -			lp->csum_offload_on_rx_path =
>> XAE_NO_CSUM_OFFLOAD;
>>  		}
>>  	}
>>  	/* For supporting jumbo frames, the Axi Ethernet hardware must
>> have
>> --
>> 2.35.1.1320.gc452695387.dirty
> 


  reply	other threads:[~2024-09-05 14:09 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-03 18:43 [PATCH 0/3] net: xilinx: axienet: Partial checksum offload improvements Sean Anderson
2024-09-03 18:43 ` [PATCH 1/3] net: xilinx: axienet: Remove unused checksum variables Sean Anderson
2024-09-04 16:19   ` Simon Horman
2024-09-04 17:03   ` Pandey, Radhey Shyam
2024-09-05 14:09     ` Sean Anderson [this message]
2024-09-03 18:43 ` [PATCH 2/3] net: xilinx: axienet: Enable NETIF_F_HW_CSUM for partial tx checksumming Sean Anderson
2024-09-04 16:20   ` Simon Horman
2024-09-03 18:43 ` [PATCH 3/3] net: xilinx: axienet: Relax partial rx checksum checks Sean Anderson
2024-09-04 16:20   ` Simon Horman
2024-09-04 16:30   ` Eric Dumazet
2024-09-05 14:24     ` Sean Anderson
2024-09-05 14:59       ` Eric Dumazet
2024-09-05 16:32         ` Sean Anderson
2024-09-06 21:37           ` Sean Anderson
2024-09-03 18:48 ` [PATCH 0/3] net: xilinx: axienet: Partial checksum offload improvements Sean Anderson

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=e3cc6c1f-97f4-45f1-a909-00cf986cd465@linux.dev \
    --to=sean.anderson@linux.dev \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.simek@amd.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=radhey.shyam.pandey@amd.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).