netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Pranavi Somisetty <pranavi.somisetty@amd.com>
Cc: <nicolas.ferre@microchip.com>, <claudiu.beznea@microchip.com>,
	<davem@davemloft.net>, <edumazet@google.com>, <pabeni@redhat.com>,
	<git@amd.com>, <netdev@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <michal.simek@amd.com>,
	<harini.katakam@amd.com>, <radhey.shyam.pandey@amd.com>
Subject: Re: [LINUX RFC PATCH] net: macb: Add support for partial store and forward
Date: Tue, 13 Dec 2022 17:35:12 -0800	[thread overview]
Message-ID: <20221213173512.7902e7df@kernel.org> (raw)
In-Reply-To: <20221213121245.13981-1-pranavi.somisetty@amd.com>

On Tue, 13 Dec 2022 05:12:45 -0700 Pranavi Somisetty wrote:
> From: Maulik Jodhani <maulik.jodhani@xilinx.com>
> 
> - Validate FCS in receive interrupt handler if Rx checksum offloading
>   is disabled
> - Get rx-watermark value from DT

Sounds like two separate changes, please split into two patches

> @@ -1375,6 +1385,16 @@ static int gem_rx(struct macb_queue *queue, struct napi_struct *napi,
>  				 bp->rx_buffer_size, DMA_FROM_DEVICE);
>  
>  		skb->protocol = eth_type_trans(skb, bp->dev);
> +
> +		/* Validate MAC fcs if RX checsum offload disabled */
> +		if (!(bp->dev->features & NETIF_F_RXCSUM)) {

RXCSUM is for L4 (TCP/UDP) checksums, FCS is simply assumed 
to be validated by HW.

> +			if (macb_validate_hw_csum(skb)) {
> +				netdev_err(bp->dev, "incorrect FCS\n");

This can flood logs, and is likely unnecessary since we have a
dedicated statistics for crc errors (rx_crc_errors).

> +				bp->dev->stats.rx_dropped++;

CRC errors are errors not drops see the comment above struct
rtnl_link_stats64 for more info.

> +				break;
> +			}
> +		}

> @@ -3812,10 +3862,29 @@ static void macb_configure_caps(struct macb *bp,
>  				const struct macb_config *dt_conf)
>  {
>  	u32 dcfg;
> +	int retval;
>  
>  	if (dt_conf)
>  		bp->caps = dt_conf->caps;
>  
> +	/* By default we set to partial store and forward mode for zynqmp.
> +	 * Disable if not set in devicetree.
> +	 */
> +	if (bp->caps & MACB_CAPS_PARTIAL_STORE_FORWARD) {
> +		retval = of_property_read_u16(bp->pdev->dev.of_node,
> +					      "rx-watermark",
> +					      &bp->rx_watermark);

is this property documented in the bindings?

  reply	other threads:[~2022-12-14  1:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-13 12:12 [LINUX RFC PATCH] net: macb: Add support for partial store and forward Pranavi Somisetty
2022-12-14  1:35 ` Jakub Kicinski [this message]
2022-12-14 10:09 ` Claudiu.Beznea
2022-12-14 10:24   ` Claudiu.Beznea

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=20221213173512.7902e7df@kernel.org \
    --to=kuba@kernel.org \
    --cc=claudiu.beznea@microchip.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=git@amd.com \
    --cc=harini.katakam@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.simek@amd.com \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.ferre@microchip.com \
    --cc=pabeni@redhat.com \
    --cc=pranavi.somisetty@amd.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).