mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: Ratheesh Kannoth <rkannoth@marvell.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: sgoutham@marvell.com, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org
Subject: Re: [PATCH net-next] octeontx2-pf: Add support for page pool
Date: Tue, 16 May 2023 11:01:12 +0200	[thread overview]
Message-ID: <cf5c8fe8e5b47766005c1f093153f630774f644b.camel@redhat.com> (raw)
In-Reply-To: <20230515055607.651799-1-rkannoth@marvell.com>

On Mon, 2023-05-15 at 11:26 +0530, Ratheesh Kannoth wrote:
> diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
> index 7045fedfd73a..df5f45aa6980 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
> @@ -217,9 +217,10 @@ static bool otx2_skb_add_frag(struct otx2_nic *pfvf, struct sk_buff *skb,
>  		skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags, page,
>  				va - page_address(page) + off,
>  				len - off, pfvf->rbsize);
> -
> +#ifndef CONFIG_PAGE_POOL
>  		otx2_dma_unmap_page(pfvf, iova - OTX2_HEAD_ROOM,
>  				    pfvf->rbsize, DMA_FROM_DEVICE);
> +#endif

Don't you need to do the same even when CONFIG_PAGE_POOL and !pool-
>page_pool ?

>  		return true;
>  	}
>  
> @@ -382,6 +383,8 @@ static void otx2_rcv_pkt_handler(struct otx2_nic *pfvf,
>  	if (pfvf->netdev->features & NETIF_F_RXCSUM)
>  		skb->ip_summed = CHECKSUM_UNNECESSARY;
>  
> +	skb_mark_for_recycle(skb);

Don't you need to set the recycle only when pool->page_pool?

Overall it looks like that having both the pool->page_pool and
CONFIG_PAGE_POOL checks in place add a few possible sources of bugs.

Cheers,

Paolo


  parent reply	other threads:[~2023-05-16  9:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-15  5:56 Ratheesh Kannoth
2023-05-16  1:14 ` Yunsheng Lin
2023-05-16  3:36   ` Ratheesh Kannoth
2023-05-16  8:51     ` Paolo Abeni
2023-05-16  9:21       ` Ratheesh Kannoth
2023-05-16  9:01 ` Paolo Abeni [this message]
2023-05-16  9:35   ` Ratheesh Kannoth

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=cf5c8fe8e5b47766005c1f093153f630774f644b.camel@redhat.com \
    --to=pabeni@redhat.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rkannoth@marvell.com \
    --cc=sgoutham@marvell.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

all inboxes | Powered by JetHome®