[PATCH net-next v2 2/2] net: macb: Add support for partial store and forward
Somisetty, Pranavi
pranavi.somisetty at amd.com
Fri May 12 04:53:00 PDT 2023
> -----Original Message-----
> From: Claudiu.Beznea at microchip.com <Claudiu.Beznea at microchip.com>
> Sent: Friday, May 12, 2023 1:28 PM
> To: Somisetty, Pranavi <pranavi.somisetty at amd.com>;
> Nicolas.Ferre at microchip.com; davem at davemloft.net;
> edumazet at google.com; kuba at kernel.org; pabeni at redhat.com;
> richardcochran at gmail.com; linux at armlinux.org.uk; palmer at dabbelt.com
> Cc: git (AMD-Xilinx) <git at amd.com>; Simek, Michal
> <michal.simek at amd.com>; Katakam, Harini <harini.katakam at amd.com>;
> Pandey, Radhey Shyam <radhey.shyam.pandey at amd.com>;
> netdev at vger.kernel.org; linux-kernel at vger.kernel.org; linux-
> riscv at lists.infradead.org
> Subject: Re: [PATCH net-next v2 2/2] net: macb: Add support for partial store
> and forward
>
> On 11.05.2023 10:12, Pranavi Somisetty wrote:
> > EXTERNAL EMAIL: Do not click links or open attachments unless you know
> > the content is safe
> >
> > When the receive partial store and forward mode is activated, the
> > receiver will only begin to forward the packet to the external AHB or
> > AXI slave when enough packet data is stored in the packet buffer.
> > The amount of packet data required to activate the forwarding process
> > is programmable via watermark registers which are located at the same
> > address as the partial store and forward enable bits. Adding support
> > to read this rx-watermark value from device-tree, to program the
> > watermark registers and enable partial store and forwarding.
> >
> > Signed-off-by: Maulik Jodhani <maulik.jodhani at xilinx.com>
> > Signed-off-by: Michal Simek <michal.simek at xilinx.com>
> > Signed-off-by: Harini Katakam <harini.katakam at xilinx.com>
> > Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey at xilinx.com>
> > Signed-off-by: Pranavi Somisetty <pranavi.somisetty at amd.com>
> > ---
<snip>
> > + /* Disable RX partial store and forward and reset watermark value */
> > + if (bp->caps & MACB_CAPS_PARTIAL_STORE_FORWARD) {
> > + watermark_reset_value = (1 << (GEM_BFEXT(RX_PBUF_ADDR,
> > + gem_readl(bp, DCFG2)))) - 1;
>
> Is this block needed? Maybe all you need here is just to disable the rx partial
> store and forward?
Yes, the value doesn’t need to be written, disabling rx partial store and forward
is enough, will take care.
<snip>
>
> > + retval = of_property_read_u16(bp->pdev->dev.of_node,
> > + "rx-watermark",
> > +
> > + &bp->rx_watermark);
>
> E.g. SAMA7G5 has PBUFRXCUT.watermark on 10 bits. Is it the same on
> Xynqmp?
On ZynqMP its 12 bits.
> For compatibility with future implementations and stable DT interface it
> would be better to just keep rx-watermark DT property on 32 bits.
>
I don’t think it can extend beyond u16, considering, the maximum pbuf depth
field in DCFG2, is only 4 bits (22:25).
I'll do a re-spin addressing your and other reviewer's comments.
Thanks
Pranavi
More information about the linux-riscv
mailing list