From: "Li,Rongqing" <lirongqing@baidu.com> To: "Björn Töpel" <bjorn.topel@gmail.com>, intel-wired-lan <intel-wired-lan@lists.osuosl.org>, Netdev <netdev@vger.kernel.org> Cc: bpf <bpf@vger.kernel.org>, "Karlsson, Magnus" <magnus.karlsson@intel.com> Subject: 答复: [PATCH] i40e: fix wrong index in i40e_xsk_umem_dma_map Date: Tue, 2 Jun 2020 12:10:18 +0000 [thread overview] Message-ID: <562a0ea8fe694d5c82dba6f446d1b518@baidu.com> (raw) In-Reply-To: <CAJ+HfNjXh882Dc2N9qpYDGhEuTed9Vp36RuHSXnBMmWXfV9iHg@mail.gmail.com> > -----邮件原件----- > 发件人: Björn Töpel [mailto:bjorn.topel@gmail.com] > 发送时间: 2020年6月2日 19:27 > 收件人: Li,Rongqing <lirongqing@baidu.com>; intel-wired-lan > <intel-wired-lan@lists.osuosl.org>; Netdev <netdev@vger.kernel.org> > 抄送: bpf <bpf@vger.kernel.org>; Karlsson, Magnus > <magnus.karlsson@intel.com> > 主题: Re: [PATCH] i40e: fix wrong index in i40e_xsk_umem_dma_map > > On Tue, 2 Jun 2020 at 11:20, Li RongQing <lirongqing@baidu.com> wrote: > > > > Li, thanks for the patch! Good catch! > > Please add a proper description for the patch. The fix should be added to the > stable branches (5.7 and earlier). Note that this code was recently removed in > favor of the new AF_XDP buffer allocation scheme. > > Ok -LiRongQing > Björn > > > Fixes: 0a714186d3c0 "(i40e: add AF_XDP zero-copy Rx support)" > > Signed-off-by: Li RongQing <lirongqing@baidu.com> > > --- > > drivers/net/ethernet/intel/i40e/i40e_xsk.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/net/ethernet/intel/i40e/i40e_xsk.c > > b/drivers/net/ethernet/intel/i40e/i40e_xsk.c > > index 0b7d29192b2c..c926438118ea 100644 > > --- a/drivers/net/ethernet/intel/i40e/i40e_xsk.c > > +++ b/drivers/net/ethernet/intel/i40e/i40e_xsk.c > > @@ -37,9 +37,9 @@ static int i40e_xsk_umem_dma_map(struct i40e_vsi > > *vsi, struct xdp_umem *umem) > > > > out_unmap: > > for (j = 0; j < i; j++) { > > - dma_unmap_page_attrs(dev, umem->pages[i].dma, > PAGE_SIZE, > > + dma_unmap_page_attrs(dev, umem->pages[j].dma, > > + PAGE_SIZE, > > DMA_BIDIRECTIONAL, > I40E_RX_DMA_ATTR); > > - umem->pages[i].dma = 0; > > + umem->pages[j].dma = 0; > > } > > > > return -1; > > -- > > 2.16.2 > >
WARNING: multiple messages have this Message-ID (diff)
From: Li,Rongqing <lirongqing@baidu.com> To: intel-wired-lan@osuosl.org Subject: [Intel-wired-lan] 答复: [PATCH] i40e: fix wrong index in i40e_xsk_umem_dma_map Date: Tue, 2 Jun 2020 12:10:18 +0000 [thread overview] Message-ID: <562a0ea8fe694d5c82dba6f446d1b518@baidu.com> (raw) In-Reply-To: <CAJ+HfNjXh882Dc2N9qpYDGhEuTed9Vp36RuHSXnBMmWXfV9iHg@mail.gmail.com> > -----????----- > ???: Bj?rn T?pel [mailto:bjorn.topel at gmail.com] > ????: 2020?6?2? 19:27 > ???: Li,Rongqing <lirongqing@baidu.com>; intel-wired-lan > <intel-wired-lan@lists.osuosl.org>; Netdev <netdev@vger.kernel.org> > ??: bpf <bpf@vger.kernel.org>; Karlsson, Magnus > <magnus.karlsson@intel.com> > ??: Re: [PATCH] i40e: fix wrong index in i40e_xsk_umem_dma_map > > On Tue, 2 Jun 2020 at 11:20, Li RongQing <lirongqing@baidu.com> wrote: > > > > Li, thanks for the patch! Good catch! > > Please add a proper description for the patch. The fix should be added to the > stable branches (5.7 and earlier). Note that this code was recently removed in > favor of the new AF_XDP buffer allocation scheme. > > Ok -LiRongQing > Bj?rn > > > Fixes: 0a714186d3c0 "(i40e: add AF_XDP zero-copy Rx support)" > > Signed-off-by: Li RongQing <lirongqing@baidu.com> > > --- > > drivers/net/ethernet/intel/i40e/i40e_xsk.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/net/ethernet/intel/i40e/i40e_xsk.c > > b/drivers/net/ethernet/intel/i40e/i40e_xsk.c > > index 0b7d29192b2c..c926438118ea 100644 > > --- a/drivers/net/ethernet/intel/i40e/i40e_xsk.c > > +++ b/drivers/net/ethernet/intel/i40e/i40e_xsk.c > > @@ -37,9 +37,9 @@ static int i40e_xsk_umem_dma_map(struct i40e_vsi > > *vsi, struct xdp_umem *umem) > > > > out_unmap: > > for (j = 0; j < i; j++) { > > - dma_unmap_page_attrs(dev, umem->pages[i].dma, > PAGE_SIZE, > > + dma_unmap_page_attrs(dev, umem->pages[j].dma, > > + PAGE_SIZE, > > DMA_BIDIRECTIONAL, > I40E_RX_DMA_ATTR); > > - umem->pages[i].dma = 0; > > + umem->pages[j].dma = 0; > > } > > > > return -1; > > -- > > 2.16.2 > >
next prev parent reply other threads:[~2020-06-02 12:26 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-06-02 9:12 [PATCH] i40e: fix wrong index in i40e_xsk_umem_dma_map Li RongQing 2020-06-02 11:26 ` Björn Töpel 2020-06-02 11:26 ` [Intel-wired-lan] " =?unknown-8bit?q?Bj=C3=B6rn_T=C3=B6pel?= 2020-06-02 12:10 ` Li,Rongqing [this message] 2020-06-02 12:10 ` [Intel-wired-lan] 答复: " Li, Rongqing
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=562a0ea8fe694d5c82dba6f446d1b518@baidu.com \ --to=lirongqing@baidu.com \ --cc=bjorn.topel@gmail.com \ --cc=bpf@vger.kernel.org \ --cc=intel-wired-lan@lists.osuosl.org \ --cc=magnus.karlsson@intel.com \ --cc=netdev@vger.kernel.org \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.