bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
To: intel-wired-lan@lists.osuosl.org
Cc: netdev@vger.kernel.org, bpf@vger.kernel.org,
	anthony.l.nguyen@intel.com, kuba@kernel.org,
	bjorn.topel@intel.com, magnus.karlsson@intel.com,
	Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Subject: [PATCH v3 net-next 02/11] i40e: drop misleading function comments
Date: Mon, 18 Jan 2021 16:13:09 +0100	[thread overview]
Message-ID: <20210118151318.12324-3-maciej.fijalkowski@intel.com> (raw)
In-Reply-To: <20210118151318.12324-1-maciej.fijalkowski@intel.com>

i40e_cleanup_headers has a statement about check against skb being
linear or not which is not relevant anymore, so let's remove it.

Same case for i40e_can_reuse_rx_page, it references things that are not
present there anymore.

Reviewed-by: Björn Töpel <bjorn.topel@intel.com>
Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_txrx.c | 33 ++++-----------------
 1 file changed, 6 insertions(+), 27 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
index 2574e78f7597..f8aa68f2a7fd 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
@@ -1809,9 +1809,6 @@ void i40e_process_skb_fields(struct i40e_ring *rx_ring,
  * @skb: pointer to current skb being fixed
  * @rx_desc: pointer to the EOP Rx descriptor
  *
- * Also address the case where we are pulling data in on pages only
- * and as such no data is present in the skb header.
- *
  * In addition if skb is not at least 60 bytes we need to pad it so that
  * it is large enough to qualify as a valid Ethernet frame.
  *
@@ -1857,33 +1854,15 @@ static inline bool i40e_page_is_reusable(struct page *page)
 }
 
 /**
- * i40e_can_reuse_rx_page - Determine if this page can be reused by
- * the adapter for another receive
- *
+ * i40e_can_reuse_rx_page - Determine if page can be reused for another Rx
  * @rx_buffer: buffer containing the page
  * @rx_buffer_pgcnt: buffer page refcount pre xdp_do_redirect() call
  *
- * If page is reusable, rx_buffer->page_offset is adjusted to point to
- * an unused region in the page.
- *
- * For small pages, @truesize will be a constant value, half the size
- * of the memory at page.  We'll attempt to alternate between high and
- * low halves of the page, with one half ready for use by the hardware
- * and the other half being consumed by the stack.  We use the page
- * ref count to determine whether the stack has finished consuming the
- * portion of this page that was passed up with a previous packet.  If
- * the page ref count is >1, we'll assume the "other" half page is
- * still busy, and this page cannot be reused.
- *
- * For larger pages, @truesize will be the actual space used by the
- * received packet (adjusted upward to an even multiple of the cache
- * line size).  This will advance through the page by the amount
- * actually consumed by the received packets while there is still
- * space for a buffer.  Each region of larger pages will be used at
- * most once, after which the page will not be reused.
- *
- * In either case, if the page is reusable its refcount is increased.
- **/
+ * If page is reusable, we have a green light for calling i40e_reuse_rx_page,
+ * which will assign the current buffer to the buffer that next_to_alloc is
+ * pointing to; otherwise, the DMA mapping needs to be destroyed and
+ * page freed
+ */
 static bool i40e_can_reuse_rx_page(struct i40e_rx_buffer *rx_buffer,
 				   int rx_buffer_pgcnt)
 {
-- 
2.20.1


  parent reply	other threads:[~2021-01-18 15:24 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-18 15:13 [PATCH v3 net-next 00/11] intel driver cleanups Maciej Fijalkowski
2021-01-18 15:13 ` [PATCH v3 net-next 01/11] i40e: drop redundant check when setting xdp prog Maciej Fijalkowski
2021-01-18 15:13 ` Maciej Fijalkowski [this message]
2021-01-18 15:13 ` [PATCH v3 net-next 03/11] i40e: adjust i40e_is_non_eop Maciej Fijalkowski
2021-01-18 15:13 ` [PATCH v3 net-next 04/11] ice: simplify ice_run_xdp Maciej Fijalkowski
2021-01-18 15:13 ` [PATCH v3 net-next 05/11] ice: move skb pointer from rx_buf to rx_ring Maciej Fijalkowski
2021-01-23  1:13   ` [Intel-wired-lan] " Brelinski, TonyX
2021-01-18 15:13 ` [PATCH v3 net-next 06/11] ice: remove redundant checks in ice_change_mtu Maciej Fijalkowski
2021-01-23  0:24   ` [Intel-wired-lan] " Brelinski, TonyX
2021-01-18 15:13 ` [PATCH v3 net-next 07/11] ice: skip NULL check against XDP prog in ZC path Maciej Fijalkowski
2021-01-18 15:13 ` [PATCH v3 net-next 08/11] i40e, xsk: Simplify the do-while allocation loop Maciej Fijalkowski
2021-01-18 15:13 ` [PATCH v3 net-next 09/11] i40e: store the result of i40e_rx_offset() onto i40e_ring Maciej Fijalkowski
2021-01-18 15:13 ` [PATCH v3 net-next 10/11] ice: store the result of ice_rx_offset() onto ice_ring Maciej Fijalkowski
2021-01-23  1:16   ` [Intel-wired-lan] " Brelinski, TonyX
2021-01-18 15:13 ` [PATCH v3 net-next 11/11] ixgbe: store the result of ixgbe_rx_offset() onto ixgbe_ring Maciej Fijalkowski

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=20210118151318.12324-3-maciej.fijalkowski@intel.com \
    --to=maciej.fijalkowski@intel.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=bjorn.topel@intel.com \
    --cc=bpf@vger.kernel.org \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=kuba@kernel.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: 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).