netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Li,Rongqing" <lirongqing@baidu.com>
To: Magnus Karlsson <magnus.karlsson@gmail.com>
Cc: intel-wired-lan <intel-wired-lan@lists.osuosl.org>,
	"Björn Töpel" <bjorn.topel@intel.com>,
	"Karlsson, Magnus" <magnus.karlsson@intel.com>,
	Netdev <netdev@vger.kernel.org>
Subject: 答复: [Intel-wired-lan] [bug ?] i40e_rx_buffer_flip should not be called for redirected xsk copy mode
Date: Mon, 6 Jul 2020 06:38:25 +0000	[thread overview]
Message-ID: <3a12136e75a04b98b736c14da4044506@baidu.com> (raw)
In-Reply-To: <CAJ8uoz08pyWR43K_zhp6PsDLi0KE=y_4QTs-a7kBA-jkRQksaw@mail.gmail.com>



> -----邮件原件-----
> 发件人: Magnus Karlsson [mailto:magnus.karlsson@gmail.com]
> 发送时间: 2020年7月6日 14:13
> 收件人: Li,Rongqing <lirongqing@baidu.com>
> 抄送: intel-wired-lan <intel-wired-lan@lists.osuosl.org>; Björn Töpel
> <bjorn.topel@intel.com>; Karlsson, Magnus <magnus.karlsson@intel.com>;
> Netdev <netdev@vger.kernel.org>
> 主题: Re: [Intel-wired-lan] [bug ?] i40e_rx_buffer_flip should not be called for
> redirected xsk copy mode
> 
> Thank you RongQing for reporting this. I will take a look at it and produce a
> patch.
> 
> /Magnus

Thanks, and ixgbevf/ixgbe have same issue.

drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
drivers/net/ethernet/intel/i40e/i40e_txrx.c
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c

I have a RFC, it maybe not better due to adding a new variable 
http://patchwork.ozlabs.org/project/netdev/patch/1593763926-24292-1-git-send-email-lirongqing@baidu.com/

or check memory type

diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
index b3836092c327..f41664e0c84e 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
@@ -2394,7 +2394,9 @@ static int i40e_clean_rx_irq(struct i40e_ring *rx_ring, int budget)
 
                        if (xdp_res & (I40E_XDP_TX | I40E_XDP_REDIR)) {
                                xdp_xmit |= xdp_res;
-                               i40e_rx_buffer_flip(rx_ring, rx_buffer, size);
+
+                               if (xdp->rxq->mem.type != MEM_TYPE_XSK_BUFF_POOL)
+                                       i40e_rx_buffer_flip(rx_ring, rx_buffer, size);
                        } else {
                                rx_buffer->pagecnt_bias++;
                        }
Whether,  like to see your patch

-Li RongQing

  reply	other threads:[~2020-07-06  6:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <2863b548da1d4c369bbd9d6ceb337a24@baidu.com>
2020-07-06  6:13 ` [Intel-wired-lan] [bug ?] i40e_rx_buffer_flip should not be called for redirected xsk copy mode Magnus Karlsson
2020-07-06  6:38   ` Li,Rongqing [this message]
2020-07-14 11:05   ` 答复: " Li,Rongqing
2020-07-16  4:39     ` Magnus Karlsson
2020-07-16  5:33       ` 答复: " 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=3a12136e75a04b98b736c14da4044506@baidu.com \
    --to=lirongqing@baidu.com \
    --cc=bjorn.topel@intel.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=magnus.karlsson@gmail.com \
    --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: 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).