Message ID | 1644014745-22261-2-git-send-email-haiyangz@microsoft.com (mailing list archive) |
---|---|
State | Accepted |
Commit | e4b7621982d29f26ff4d39af389e5e675a4ffed4 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | net: mana: Add handling of CQE_RX_TRUNCATED and a cleanup | expand |
> From: LKML haiyangz <lkmlhyz@microsoft.com> On Behalf Of Haiyang Zhang > Sent: Friday, February 4, 2022 2:46 PM > .. > The proper way to drop this kind of CQE is advancing rxq tail > without indicating the packet to the upper network layer. > > Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Reviewed-by: Dexuan Cui <decui@microsoft.com>
> -----Original Message----- > From: LKML haiyangz <lkmlhyz@microsoft.com> On Behalf Of Haiyang Zhang > Sent: Friday, February 4, 2022 5:46 PM > To: linux-hyperv@vger.kernel.org; netdev@vger.kernel.org > Cc: Haiyang Zhang <haiyangz@microsoft.com>; Dexuan Cui <decui@microsoft.com>; KY > Srinivasan <kys@microsoft.com>; Stephen Hemminger <sthemmin@microsoft.com>; Paul Rosswurm > <paulros@microsoft.com>; Shachar Raindel <shacharr@microsoft.com>; olaf@aepfle.de; > vkuznets <vkuznets@redhat.com>; davem@davemloft.net; linux-kernel@vger.kernel.org > Subject: [PATCH net-next, 1/2] net: mana: Add handling of CQE_RX_TRUNCATED > > The proper way to drop this kind of CQE is advancing rxq tail > without indicating the packet to the upper network layer. > > Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> > --- > drivers/net/ethernet/microsoft/mana/mana_en.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/ethernet/microsoft/mana/mana_en.c > b/drivers/net/ethernet/microsoft/mana/mana_en.c > index 69e791e6abc4..d2481a500654 100644 > --- a/drivers/net/ethernet/microsoft/mana/mana_en.c > +++ b/drivers/net/ethernet/microsoft/mana/mana_en.c > @@ -1085,8 +1085,10 @@ static void mana_process_rx_cqe(struct mana_rxq *rxq, struct > mana_cq *cq, > break; > > case CQE_RX_TRUNCATED: > - netdev_err(ndev, "Dropped a truncated packet\n"); > - return; > + ++ndev->stats.rx_dropped; > + rxbuf_oob = &rxq->rx_oobs[rxq->buf_index]; > + netdev_warn_once(ndev, "Dropped a truncated packet\n"); > + goto drop; > > case CQE_RX_COALESCED_4: > netdev_err(ndev, "RX coalescing is unsupported\n"); > @@ -1154,6 +1156,7 @@ static void mana_process_rx_cqe(struct mana_rxq *rxq, struct mana_cq > *cq, > > mana_rx_skb(old_buf, oob, rxq); > > +drop: > mana_move_wq_tail(rxq->gdma_rq, rxbuf_oob->wqe_inf.wqe_size_in_bu); > > mana_post_pkt_rxq(rxq); > -- To netdev maintainers: Since the proper handling of CQE_RX_TRUNCATED type is important, could any of you backport this patch to the stable branches: 5.16 & 5.15? Thanks, - Haiyang
On Sat, 5 Feb 2022 22:32:41 +0000 Haiyang Zhang wrote: > Since the proper handling of CQE_RX_TRUNCATED type is important, could any > of you backport this patch to the stable branches: 5.16 & 5.15? Only patches which are in Linus's tree can be backported to stable. You sent this change for -next so no, it can't be backported now. You need to wait until 5.17 final is released and then ask Greg KH to backport it.
> -----Original Message----- > From: Jakub Kicinski <kuba@kernel.org> > Sent: Monday, February 7, 2022 12:12 PM > To: Haiyang Zhang <haiyangz@microsoft.com> > Cc: linux-hyperv@vger.kernel.org; netdev@vger.kernel.org; Dexuan Cui <decui@microsoft.com>; > KY Srinivasan <kys@microsoft.com>; Stephen Hemminger <sthemmin@microsoft.com>; Paul > Rosswurm <paulros@microsoft.com>; Shachar Raindel <shacharr@microsoft.com>; olaf@aepfle.de; > vkuznets <vkuznets@redhat.com>; davem@davemloft.net; linux-kernel@vger.kernel.org > Subject: Re: [PATCH net-next, 1/2] net: mana: Add handling of CQE_RX_TRUNCATED > > On Sat, 5 Feb 2022 22:32:41 +0000 Haiyang Zhang wrote: > > Since the proper handling of CQE_RX_TRUNCATED type is important, could any > > of you backport this patch to the stable branches: 5.16 & 5.15? > > Only patches which are in Linus's tree can be backported to stable. > You sent this change for -next so no, it can't be backported now. > You need to wait until 5.17 final is released and then ask Greg KH > to backport it. Will do. Thanks!
> -----Original Message----- > From: Jakub Kicinski <kuba@kernel.org> > Sent: Monday, February 7, 2022 12:12 PM > To: Haiyang Zhang <haiyangz@microsoft.com> > Cc: linux-hyperv@vger.kernel.org; netdev@vger.kernel.org; Dexuan Cui > <decui@microsoft.com>; KY Srinivasan <kys@microsoft.com>; Stephen > Hemminger <sthemmin@microsoft.com>; Paul Rosswurm > <paulros@microsoft.com>; Shachar Raindel <shacharr@microsoft.com>; > olaf@aepfle.de; vkuznets <vkuznets@redhat.com>; davem@davemloft.net; > linux-kernel@vger.kernel.org > Subject: Re: [PATCH net-next, 1/2] net: mana: Add handling of > CQE_RX_TRUNCATED > > On Sat, 5 Feb 2022 22:32:41 +0000 Haiyang Zhang wrote: > > Since the proper handling of CQE_RX_TRUNCATED type is important, could > any > > of you backport this patch to the stable branches: 5.16 & 5.15? > > Only patches which are in Linus's tree can be backported to stable. > You sent this change for -next so no, it can't be backported now. > You need to wait until 5.17 final is released and then ask Greg KH > to backport it. @Greg KH <gregkh@linuxfoundation.org> Hi Greg, This patch is on 5.18 now: net: mana: Add handling of CQE_RX_TRUNCATED https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.18.5&id=e4b7621982d29f26ff4d39af389e5e675a4ffed4 Could you backport it to 5.15? Thanks, - Haiyang
On Tue, Jun 21, 2022 at 07:55:26PM +0000, Haiyang Zhang wrote: > > > > -----Original Message----- > > From: Jakub Kicinski <kuba@kernel.org> > > Sent: Monday, February 7, 2022 12:12 PM > > To: Haiyang Zhang <haiyangz@microsoft.com> > > Cc: linux-hyperv@vger.kernel.org; netdev@vger.kernel.org; Dexuan Cui > > <decui@microsoft.com>; KY Srinivasan <kys@microsoft.com>; Stephen > > Hemminger <sthemmin@microsoft.com>; Paul Rosswurm > > <paulros@microsoft.com>; Shachar Raindel <shacharr@microsoft.com>; > > olaf@aepfle.de; vkuznets <vkuznets@redhat.com>; davem@davemloft.net; > > linux-kernel@vger.kernel.org > > Subject: Re: [PATCH net-next, 1/2] net: mana: Add handling of > > CQE_RX_TRUNCATED > > > > On Sat, 5 Feb 2022 22:32:41 +0000 Haiyang Zhang wrote: > > > Since the proper handling of CQE_RX_TRUNCATED type is important, could > > any > > > of you backport this patch to the stable branches: 5.16 & 5.15? > > > > Only patches which are in Linus's tree can be backported to stable. > > You sent this change for -next so no, it can't be backported now. > > You need to wait until 5.17 final is released and then ask Greg KH > > to backport it. > > @Greg KH <gregkh@linuxfoundation.org> > > Hi Greg, > > This patch is on 5.18 now: > net: mana: Add handling of CQE_RX_TRUNCATED > https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.18.5&id=e4b7621982d29f26ff4d39af389e5e675a4ffed4 > > Could you backport it to 5.15? <formletter> This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read: https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html for how to do this properly. </formletter>
> -----Original Message----- > From: Greg KH <gregkh@linuxfoundation.org> > Sent: Tuesday, June 21, 2022 4:27 PM > To: Haiyang Zhang <haiyangz@microsoft.com> > Cc: Jakub Kicinski <kuba@kernel.org>; linux-hyperv@vger.kernel.org; > netdev@vger.kernel.org; Dexuan Cui <decui@microsoft.com>; KY Srinivasan > <kys@microsoft.com>; Stephen Hemminger <sthemmin@microsoft.com>; Paul > Rosswurm <paulros@microsoft.com>; Shachar Raindel > <shacharr@microsoft.com>; olaf@aepfle.de; vkuznets <vkuznets@redhat.com>; > davem@davemloft.net; linux-kernel@vger.kernel.org > Subject: Re: [PATCH net-next, 1/2] net: mana: Add handling of > CQE_RX_TRUNCATED > > <formletter> > > This is not the correct way to submit patches for inclusion in the > stable kernel tree. Please read: > > https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ker > nel.org%2Fdoc%2Fhtml%2Flatest%2Fprocess%2Fstable-kernel- > rules.html&data=05%7C01%7Chaiyangz%40microsoft.com%7C9ecaef20f4 > c04a77741e08da53c45e7d%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0 > %7C637914400166157108%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAw > MDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7 > C&sdata=Lgg0cEUxQf3uhKHqAF0pTFcQvHj4NKkUCEuQ9elePvw%3D& > reserved=0 > for how to do this properly. > > </formletter> Thanks. I will do. - Haiyang
diff --git a/drivers/net/ethernet/microsoft/mana/mana_en.c b/drivers/net/ethernet/microsoft/mana/mana_en.c index 69e791e6abc4..d2481a500654 100644 --- a/drivers/net/ethernet/microsoft/mana/mana_en.c +++ b/drivers/net/ethernet/microsoft/mana/mana_en.c @@ -1085,8 +1085,10 @@ static void mana_process_rx_cqe(struct mana_rxq *rxq, struct mana_cq *cq, break; case CQE_RX_TRUNCATED: - netdev_err(ndev, "Dropped a truncated packet\n"); - return; + ++ndev->stats.rx_dropped; + rxbuf_oob = &rxq->rx_oobs[rxq->buf_index]; + netdev_warn_once(ndev, "Dropped a truncated packet\n"); + goto drop; case CQE_RX_COALESCED_4: netdev_err(ndev, "RX coalescing is unsupported\n"); @@ -1154,6 +1156,7 @@ static void mana_process_rx_cqe(struct mana_rxq *rxq, struct mana_cq *cq, mana_rx_skb(old_buf, oob, rxq); +drop: mana_move_wq_tail(rxq->gdma_rq, rxbuf_oob->wqe_inf.wqe_size_in_bu); mana_post_pkt_rxq(rxq);
The proper way to drop this kind of CQE is advancing rxq tail without indicating the packet to the upper network layer. Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> --- drivers/net/ethernet/microsoft/mana/mana_en.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)