All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-wired-lan] [PATCH 0/3] igb/fm10k/ixgbevf: Drop XXX_pull_tail and pull header in XXX_add_rx_frag
@ 2015-04-23  4:49 Alexander Duyck
  2015-04-23  4:49 ` [Intel-wired-lan] [PATCH 1/3] igb: Pull timestamp from fragment before adding it to skb Alexander Duyck
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Alexander Duyck @ 2015-04-23  4:49 UTC (permalink / raw)
  To: intel-wired-lan

These three patches remove the _pull_tail functions for the drivers igb,
fm10k, and ixgbevf in favor of simply pulling the header in all cases at
the start of _add_rx_frag.

For igb this might be considered a driver fix, but the issue would be a
corner case in which timestamping is enabled, a packet is received that is 
between 241 and 255 bytes in size, and the header contains bad data which 
places its size something greater than the actual size.

The ixgbe driver is excluded from this set as it cannot support this due to
RSC overwriting the header data until the EOP and DD bit are written in the
last descriptor.

---

Alexander Duyck (3):
      igb: Pull timestamp from fragment before adding it to skb
      fm10k: fold fm10k_pull_tail into fm10k_add_rx_frag
      ixgbevf: fold ixgbevf_pull_tail into ixgbevf_add_rx_frag


 drivers/net/ethernet/intel/fm10k/fm10k_main.c     |   66 ++++-----------
 drivers/net/ethernet/intel/igb/igb_main.c         |   94 ++++++---------------
 drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c |   66 ++++-----------
 3 files changed, 64 insertions(+), 162 deletions(-)

--

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Intel-wired-lan] [PATCH 1/3] igb: Pull timestamp from fragment before adding it to skb
  2015-04-23  4:49 [Intel-wired-lan] [PATCH 0/3] igb/fm10k/ixgbevf: Drop XXX_pull_tail and pull header in XXX_add_rx_frag Alexander Duyck
@ 2015-04-23  4:49 ` Alexander Duyck
  2015-05-05 18:34   ` Brown, Aaron F
  2015-04-23  4:49 ` [Intel-wired-lan] [PATCH 2/3] fm10k: fold fm10k_pull_tail into fm10k_add_rx_frag Alexander Duyck
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Alexander Duyck @ 2015-04-23  4:49 UTC (permalink / raw)
  To: intel-wired-lan

This change makes it so that we pull the timestamp from the fragment before
we add it to the skb.  By doing this we can avoid a possible issue in which
the fragment can possibly be less than IGB_RX_HDR_LEN due to the timestamp
being pulled after the copybreak check.

While making this change I realized we could also pull the rest of the
igb_pull_tail function into igb_add_rx_frag since in the case of igb,
unlike ixgbe, we are able to unmap the entire buffer before calling
add_rx_frag so merging the two allows for sharing of code between the two
merged functions.

Reported-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
---
 drivers/net/ethernet/intel/igb/igb_main.c |   94 ++++++++---------------------
 1 file changed, 25 insertions(+), 69 deletions(-)

diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 8457d0306e3a..cab50593c315 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -6637,22 +6637,25 @@ static bool igb_add_rx_frag(struct igb_ring *rx_ring,
 			    struct sk_buff *skb)
 {
 	struct page *page = rx_buffer->page;
+	unsigned char *va = page_address(page) + rx_buffer->page_offset;
 	unsigned int size = le16_to_cpu(rx_desc->wb.upper.length);
 #if (PAGE_SIZE < 8192)
 	unsigned int truesize = IGB_RX_BUFSZ;
 #else
-	unsigned int truesize = ALIGN(size, L1_CACHE_BYTES);
+	unsigned int truesize = SKB_DATA_ALIGN(size);
 #endif
+	unsigned int pull_len;
 
-	if ((size <= IGB_RX_HDR_LEN) && !skb_is_nonlinear(skb)) {
-		unsigned char *va = page_address(page) + rx_buffer->page_offset;
+	if (unlikely(skb_is_nonlinear(skb)))
+		goto add_tail_frag;
 
-		if (igb_test_staterr(rx_desc, E1000_RXDADV_STAT_TSIP)) {
-			igb_ptp_rx_pktstamp(rx_ring->q_vector, va, skb);
-			va += IGB_TS_HDR_LEN;
-			size -= IGB_TS_HDR_LEN;
-		}
+	if (unlikely(igb_test_staterr(rx_desc, E1000_RXDADV_STAT_TSIP))) {
+		igb_ptp_rx_pktstamp(rx_ring->q_vector, va, skb);
+		va += IGB_TS_HDR_LEN;
+		size -= IGB_TS_HDR_LEN;
+	}
 
+	if (likely(size <= IGB_RX_HDR_LEN)) {
 		memcpy(__skb_put(skb, size), va, ALIGN(size, sizeof(long)));
 
 		/* page is not reserved, we can reuse buffer as-is */
@@ -6664,8 +6667,21 @@ static bool igb_add_rx_frag(struct igb_ring *rx_ring,
 		return false;
 	}
 
+	/* we need the header to contain the greater of either ETH_HLEN or
+	 * 60 bytes if the skb->len is less than 60 for skb_pad.
+	 */
+	pull_len = eth_get_headlen(va, IGB_RX_HDR_LEN);
+
+	/* align pull length to size of long to optimize memcpy performance */
+	memcpy(__skb_put(skb, pull_len), va, ALIGN(pull_len, sizeof(long)));
+
+	/* update all of the pointers */
+	va += pull_len;
+	size -= pull_len;
+
+add_tail_frag:
 	skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags, page,
-			rx_buffer->page_offset, size, truesize);
+			(unsigned long)va & ~PAGE_MASK, size, truesize);
 
 	return igb_can_reuse_rx_page(rx_buffer, page, truesize);
 }
@@ -6807,62 +6823,6 @@ static bool igb_is_non_eop(struct igb_ring *rx_ring,
 }
 
 /**
- *  igb_pull_tail - igb specific version of skb_pull_tail
- *  @rx_ring: rx descriptor ring packet is being transacted on
- *  @rx_desc: pointer to the EOP Rx descriptor
- *  @skb: pointer to current skb being adjusted
- *
- *  This function is an igb specific version of __pskb_pull_tail.  The
- *  main difference between this version and the original function is that
- *  this function can make several assumptions about the state of things
- *  that allow for significant optimizations versus the standard function.
- *  As a result we can do things like drop a frag and maintain an accurate
- *  truesize for the skb.
- */
-static void igb_pull_tail(struct igb_ring *rx_ring,
-			  union e1000_adv_rx_desc *rx_desc,
-			  struct sk_buff *skb)
-{
-	struct skb_frag_struct *frag = &skb_shinfo(skb)->frags[0];
-	unsigned char *va;
-	unsigned int pull_len;
-
-	/* it is valid to use page_address instead of kmap since we are
-	 * working with pages allocated out of the lomem pool per
-	 * alloc_page(GFP_ATOMIC)
-	 */
-	va = skb_frag_address(frag);
-
-	if (igb_test_staterr(rx_desc, E1000_RXDADV_STAT_TSIP)) {
-		/* retrieve timestamp from buffer */
-		igb_ptp_rx_pktstamp(rx_ring->q_vector, va, skb);
-
-		/* update pointers to remove timestamp header */
-		skb_frag_size_sub(frag, IGB_TS_HDR_LEN);
-		frag->page_offset += IGB_TS_HDR_LEN;
-		skb->data_len -= IGB_TS_HDR_LEN;
-		skb->len -= IGB_TS_HDR_LEN;
-
-		/* move va to start of packet data */
-		va += IGB_TS_HDR_LEN;
-	}
-
-	/* we need the header to contain the greater of either ETH_HLEN or
-	 * 60 bytes if the skb->len is less than 60 for skb_pad.
-	 */
-	pull_len = eth_get_headlen(va, IGB_RX_HDR_LEN);
-
-	/* align pull length to size of long to optimize memcpy performance */
-	skb_copy_to_linear_data(skb, va, ALIGN(pull_len, sizeof(long)));
-
-	/* update all of the pointers */
-	skb_frag_size_sub(frag, pull_len);
-	frag->page_offset += pull_len;
-	skb->data_len -= pull_len;
-	skb->tail += pull_len;
-}
-
-/**
  *  igb_cleanup_headers - Correct corrupted or empty headers
  *  @rx_ring: rx descriptor ring packet is being transacted on
  *  @rx_desc: pointer to the EOP Rx descriptor
@@ -6889,10 +6849,6 @@ static bool igb_cleanup_headers(struct igb_ring *rx_ring,
 		}
 	}
 
-	/* place header in linear portion of buffer */
-	if (skb_is_nonlinear(skb))
-		igb_pull_tail(rx_ring, rx_desc, skb);
-
 	/* if eth_skb_pad returns an error the skb was freed */
 	if (eth_skb_pad(skb))
 		return true;


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Intel-wired-lan] [PATCH 2/3] fm10k: fold fm10k_pull_tail into fm10k_add_rx_frag
  2015-04-23  4:49 [Intel-wired-lan] [PATCH 0/3] igb/fm10k/ixgbevf: Drop XXX_pull_tail and pull header in XXX_add_rx_frag Alexander Duyck
  2015-04-23  4:49 ` [Intel-wired-lan] [PATCH 1/3] igb: Pull timestamp from fragment before adding it to skb Alexander Duyck
@ 2015-04-23  4:49 ` Alexander Duyck
  2015-05-14 17:23   ` Singh, Krishneil K
  2015-04-23  4:49 ` [Intel-wired-lan] [PATCH 3/3] ixgbevf: fold ixgbevf_pull_tail into ixgbevf_add_rx_frag Alexander Duyck
  2015-04-25  1:25 ` [Intel-wired-lan] [PATCH 0/3] igb/fm10k/ixgbevf: Drop XXX_pull_tail and pull header in XXX_add_rx_frag Jeff Kirsher
  3 siblings, 1 reply; 8+ messages in thread
From: Alexander Duyck @ 2015-04-23  4:49 UTC (permalink / raw)
  To: intel-wired-lan

This change folds the fm10k_pull_tail call into fm10k_add_rx_frag.  The
advantage to doing this is that the fragment doesn't have to be modified
after it is added to the skb.

Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
---
 drivers/net/ethernet/intel/fm10k/fm10k_main.c |   66 ++++++++-----------------
 1 file changed, 20 insertions(+), 46 deletions(-)

diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_main.c b/drivers/net/ethernet/intel/fm10k/fm10k_main.c
index 1b0661e3573b..4eafdad318b4 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_main.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_main.c
@@ -269,16 +269,19 @@ static bool fm10k_add_rx_frag(struct fm10k_rx_buffer *rx_buffer,
 			      struct sk_buff *skb)
 {
 	struct page *page = rx_buffer->page;
+	unsigned char *va = page_address(page) + rx_buffer->page_offset;
 	unsigned int size = le16_to_cpu(rx_desc->w.length);
 #if (PAGE_SIZE < 8192)
 	unsigned int truesize = FM10K_RX_BUFSZ;
 #else
-	unsigned int truesize = ALIGN(size, L1_CACHE_BYTES);
+	unsigned int truesize = SKB_DATA_ALIGN(size);
 #endif
+	unsigned int pull_len;
 
-	if ((size <= FM10K_RX_HDR_LEN) && !skb_is_nonlinear(skb)) {
-		unsigned char *va = page_address(page) + rx_buffer->page_offset;
+	if (unlikely(skb_is_nonlinear(skb)))
+		goto add_tail_frag;
 
+	if (likely(size <= FM10K_RX_HDR_LEN)) {
 		memcpy(__skb_put(skb, size), va, ALIGN(size, sizeof(long)));
 
 		/* page is not reserved, we can reuse buffer as-is */
@@ -290,8 +293,21 @@ static bool fm10k_add_rx_frag(struct fm10k_rx_buffer *rx_buffer,
 		return false;
 	}
 
+	/* we need the header to contain the greater of either ETH_HLEN or
+	 * 60 bytes if the skb->len is less than 60 for skb_pad.
+	 */
+	pull_len = eth_get_headlen(va, FM10K_RX_HDR_LEN);
+
+	/* align pull length to size of long to optimize memcpy performance */
+	memcpy(__skb_put(skb, pull_len), va, ALIGN(pull_len, sizeof(long)));
+
+	/* update all of the pointers */
+	va += pull_len;
+	size -= pull_len;
+
+add_tail_frag:
 	skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags, page,
-			rx_buffer->page_offset, size, truesize);
+			(unsigned long)va & ~PAGE_MASK, size, truesize);
 
 	return fm10k_can_reuse_rx_page(rx_buffer, page, truesize);
 }
@@ -518,44 +534,6 @@ static bool fm10k_is_non_eop(struct fm10k_ring *rx_ring,
 }
 
 /**
- * fm10k_pull_tail - fm10k specific version of skb_pull_tail
- * @skb: pointer to current skb being adjusted
- *
- * This function is an fm10k specific version of __pskb_pull_tail.  The
- * main difference between this version and the original function is that
- * this function can make several assumptions about the state of things
- * that allow for significant optimizations versus the standard function.
- * As a result we can do things like drop a frag and maintain an accurate
- * truesize for the skb.
- */
-static void fm10k_pull_tail(struct sk_buff *skb)
-{
-	struct skb_frag_struct *frag = &skb_shinfo(skb)->frags[0];
-	unsigned char *va;
-	unsigned int pull_len;
-
-	/* it is valid to use page_address instead of kmap since we are
-	 * working with pages allocated out of the lomem pool per
-	 * alloc_page(GFP_ATOMIC)
-	 */
-	va = skb_frag_address(frag);
-
-	/* we need the header to contain the greater of either ETH_HLEN or
-	 * 60 bytes if the skb->len is less than 60 for skb_pad.
-	 */
-	pull_len = eth_get_headlen(va, FM10K_RX_HDR_LEN);
-
-	/* align pull length to size of long to optimize memcpy performance */
-	skb_copy_to_linear_data(skb, va, ALIGN(pull_len, sizeof(long)));
-
-	/* update all of the pointers */
-	skb_frag_size_sub(frag, pull_len);
-	frag->page_offset += pull_len;
-	skb->data_len -= pull_len;
-	skb->tail += pull_len;
-}
-
-/**
  * fm10k_cleanup_headers - Correct corrupted or empty headers
  * @rx_ring: rx descriptor ring packet is being transacted on
  * @rx_desc: pointer to the EOP Rx descriptor
@@ -580,10 +558,6 @@ static bool fm10k_cleanup_headers(struct fm10k_ring *rx_ring,
 		return true;
 	}
 
-	/* place header in linear portion of buffer */
-	if (skb_is_nonlinear(skb))
-		fm10k_pull_tail(skb);
-
 	/* if eth_skb_pad returns an error the skb was freed */
 	if (eth_skb_pad(skb))
 		return true;


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Intel-wired-lan] [PATCH 3/3] ixgbevf: fold ixgbevf_pull_tail into ixgbevf_add_rx_frag
  2015-04-23  4:49 [Intel-wired-lan] [PATCH 0/3] igb/fm10k/ixgbevf: Drop XXX_pull_tail and pull header in XXX_add_rx_frag Alexander Duyck
  2015-04-23  4:49 ` [Intel-wired-lan] [PATCH 1/3] igb: Pull timestamp from fragment before adding it to skb Alexander Duyck
  2015-04-23  4:49 ` [Intel-wired-lan] [PATCH 2/3] fm10k: fold fm10k_pull_tail into fm10k_add_rx_frag Alexander Duyck
@ 2015-04-23  4:49 ` Alexander Duyck
  2015-05-06 16:47   ` Schmitt, Phillip J
  2015-04-25  1:25 ` [Intel-wired-lan] [PATCH 0/3] igb/fm10k/ixgbevf: Drop XXX_pull_tail and pull header in XXX_add_rx_frag Jeff Kirsher
  3 siblings, 1 reply; 8+ messages in thread
From: Alexander Duyck @ 2015-04-23  4:49 UTC (permalink / raw)
  To: intel-wired-lan

This change folds the ixgbevf_pull_tail call into ixgbevf_add_rx_frag.  The
advantage to doing this is that the fragment doesn't have to be modified
after it is added to the skb.

Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
---
 drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c |   66 ++++++---------------
 1 file changed, 19 insertions(+), 47 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
index a16d267fbce4..cca8936f2fc3 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
@@ -649,46 +649,6 @@ static void ixgbevf_alloc_rx_buffers(struct ixgbevf_ring *rx_ring,
 }
 
 /**
- * ixgbevf_pull_tail - ixgbevf specific version of skb_pull_tail
- * @rx_ring: rx descriptor ring packet is being transacted on
- * @skb: pointer to current skb being adjusted
- *
- * This function is an ixgbevf specific version of __pskb_pull_tail.  The
- * main difference between this version and the original function is that
- * this function can make several assumptions about the state of things
- * that allow for significant optimizations versus the standard function.
- * As a result we can do things like drop a frag and maintain an accurate
- * truesize for the skb.
- **/
-static void ixgbevf_pull_tail(struct ixgbevf_ring *rx_ring,
-			      struct sk_buff *skb)
-{
-	struct skb_frag_struct *frag = &skb_shinfo(skb)->frags[0];
-	unsigned char *va;
-	unsigned int pull_len;
-
-	/* it is valid to use page_address instead of kmap since we are
-	 * working with pages allocated out of the lomem pool per
-	 * alloc_page(GFP_ATOMIC)
-	 */
-	va = skb_frag_address(frag);
-
-	/* we need the header to contain the greater of either ETH_HLEN or
-	 * 60 bytes if the skb->len is less than 60 for skb_pad.
-	 */
-	pull_len = eth_get_headlen(va, IXGBEVF_RX_HDR_SIZE);
-
-	/* align pull length to size of long to optimize memcpy performance */
-	skb_copy_to_linear_data(skb, va, ALIGN(pull_len, sizeof(long)));
-
-	/* update all of the pointers */
-	skb_frag_size_sub(frag, pull_len);
-	frag->page_offset += pull_len;
-	skb->data_len -= pull_len;
-	skb->tail += pull_len;
-}
-
-/**
  * ixgbevf_cleanup_headers - Correct corrupted or empty headers
  * @rx_ring: rx descriptor ring packet is being transacted on
  * @rx_desc: pointer to the EOP Rx descriptor
@@ -721,10 +681,6 @@ static bool ixgbevf_cleanup_headers(struct ixgbevf_ring *rx_ring,
 		}
 	}
 
-	/* place header in linear portion of buffer */
-	if (skb_is_nonlinear(skb))
-		ixgbevf_pull_tail(rx_ring, skb);
-
 	/* if eth_skb_pad returns an error the skb was freed */
 	if (eth_skb_pad(skb))
 		return true;
@@ -789,16 +745,19 @@ static bool ixgbevf_add_rx_frag(struct ixgbevf_ring *rx_ring,
 				struct sk_buff *skb)
 {
 	struct page *page = rx_buffer->page;
+	unsigned char *va = page_address(page) + rx_buffer->page_offset;
 	unsigned int size = le16_to_cpu(rx_desc->wb.upper.length);
 #if (PAGE_SIZE < 8192)
 	unsigned int truesize = IXGBEVF_RX_BUFSZ;
 #else
 	unsigned int truesize = ALIGN(size, L1_CACHE_BYTES);
 #endif
+	unsigned int pull_len;
 
-	if ((size <= IXGBEVF_RX_HDR_SIZE) && !skb_is_nonlinear(skb)) {
-		unsigned char *va = page_address(page) + rx_buffer->page_offset;
+	if (unlikely(skb_is_nonlinear(skb)))
+		goto add_tail_frag;
 
+	if (likely(size <= IXGBEVF_RX_HDR_SIZE)) {
 		memcpy(__skb_put(skb, size), va, ALIGN(size, sizeof(long)));
 
 		/* page is not reserved, we can reuse buffer as is */
@@ -810,8 +769,21 @@ static bool ixgbevf_add_rx_frag(struct ixgbevf_ring *rx_ring,
 		return false;
 	}
 
+	/* we need the header to contain the greater of either ETH_HLEN or
+	 * 60 bytes if the skb->len is less than 60 for skb_pad.
+	 */
+	pull_len = eth_get_headlen(va, IXGBEVF_RX_HDR_SIZE);
+
+	/* align pull length to size of long to optimize memcpy performance */
+	memcpy(__skb_put(skb, pull_len), va, ALIGN(pull_len, sizeof(long)));
+
+	/* update all of the pointers */
+	va += pull_len;
+	size -= pull_len;
+
+add_tail_frag:
 	skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags, page,
-			rx_buffer->page_offset, size, truesize);
+			(unsigned long)va & ~PAGE_MASK, size, truesize);
 
 	/* avoid re-using remote pages */
 	if (unlikely(ixgbevf_page_is_reserved(page)))


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Intel-wired-lan] [PATCH 0/3] igb/fm10k/ixgbevf: Drop XXX_pull_tail and pull header in XXX_add_rx_frag
  2015-04-23  4:49 [Intel-wired-lan] [PATCH 0/3] igb/fm10k/ixgbevf: Drop XXX_pull_tail and pull header in XXX_add_rx_frag Alexander Duyck
                   ` (2 preceding siblings ...)
  2015-04-23  4:49 ` [Intel-wired-lan] [PATCH 3/3] ixgbevf: fold ixgbevf_pull_tail into ixgbevf_add_rx_frag Alexander Duyck
@ 2015-04-25  1:25 ` Jeff Kirsher
  3 siblings, 0 replies; 8+ messages in thread
From: Jeff Kirsher @ 2015-04-25  1:25 UTC (permalink / raw)
  To: intel-wired-lan

On Wed, 2015-04-22 at 21:49 -0700, Alexander Duyck wrote:
> These three patches remove the _pull_tail functions for the drivers
> igb,
> fm10k, and ixgbevf in favor of simply pulling the header in all cases
> at
> the start of _add_rx_frag.
> 
> For igb this might be considered a driver fix, but the issue would be
> a
> corner case in which timestamping is enabled, a packet is received
> that is 
> between 241 and 255 bytes in size, and the header contains bad data
> which 
> places its size something greater than the actual size.
> 
> The ixgbe driver is excluded from this set as it cannot support this
> due to
> RSC overwriting the header data until the EOP and DD bit are written
> in the
> last descriptor.

Thanks Alex, applied.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20150424/c95f1b2d/attachment-0001.asc>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Intel-wired-lan] [PATCH 1/3] igb: Pull timestamp from fragment before adding it to skb
  2015-04-23  4:49 ` [Intel-wired-lan] [PATCH 1/3] igb: Pull timestamp from fragment before adding it to skb Alexander Duyck
@ 2015-05-05 18:34   ` Brown, Aaron F
  0 siblings, 0 replies; 8+ messages in thread
From: Brown, Aaron F @ 2015-05-05 18:34 UTC (permalink / raw)
  To: intel-wired-lan

> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Alexander Duyck
> Sent: Wednesday, April 22, 2015 9:49 PM
> To: intel-wired-lan at lists.osuosl.org
> Cc: Cong Wang
> Subject: [Intel-wired-lan] [PATCH 1/3] igb: Pull timestamp from fragment
> before adding it to skb
> 
> This change makes it so that we pull the timestamp from the fragment
> before
> we add it to the skb.  By doing this we can avoid a possible issue in
> which
> the fragment can possibly be less than IGB_RX_HDR_LEN due to the timestamp
> being pulled after the copybreak check.
> 
> While making this change I realized we could also pull the rest of the
> igb_pull_tail function into igb_add_rx_frag since in the case of igb,
> unlike ixgbe, we are able to unmap the entire buffer before calling
> add_rx_frag so merging the two allows for sharing of code between the two
> merged functions.
> 
> Reported-by: Cong Wang <xiyou.wangcong@gmail.com>
> Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
> ---
>  drivers/net/ethernet/intel/igb/igb_main.c |   94 ++++++++----------------
> -----
>  1 file changed, 25 insertions(+), 69 deletions(-)

Tested-by: Aaron Brown <aaron.f.brown@intel.com>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Intel-wired-lan] [PATCH 3/3] ixgbevf: fold ixgbevf_pull_tail into ixgbevf_add_rx_frag
  2015-04-23  4:49 ` [Intel-wired-lan] [PATCH 3/3] ixgbevf: fold ixgbevf_pull_tail into ixgbevf_add_rx_frag Alexander Duyck
@ 2015-05-06 16:47   ` Schmitt, Phillip J
  0 siblings, 0 replies; 8+ messages in thread
From: Schmitt, Phillip J @ 2015-05-06 16:47 UTC (permalink / raw)
  To: intel-wired-lan



> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Alexander Duyck
> Sent: Wednesday, April 22, 2015 9:50 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [PATCH 3/3] ixgbevf: fold ixgbevf_pull_tail into
> ixgbevf_add_rx_frag
> 
> This change folds the ixgbevf_pull_tail call into ixgbevf_add_rx_frag.  The
> advantage to doing this is that the fragment doesn't have to be modified after it
> is added to the skb.
> 
> Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
> ---
>  drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c |   66 ++++++---------------
>  1 file changed, 19 insertions(+), 47 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
> b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
> index a16d267fbce4..cca8936f2fc3 100644
> --- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
> +++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c

Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Intel-wired-lan] [PATCH 2/3] fm10k: fold fm10k_pull_tail into fm10k_add_rx_frag
  2015-04-23  4:49 ` [Intel-wired-lan] [PATCH 2/3] fm10k: fold fm10k_pull_tail into fm10k_add_rx_frag Alexander Duyck
@ 2015-05-14 17:23   ` Singh, Krishneil K
  0 siblings, 0 replies; 8+ messages in thread
From: Singh, Krishneil K @ 2015-05-14 17:23 UTC (permalink / raw)
  To: intel-wired-lan


-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Alexander Duyck
Sent: Wednesday, April 22, 2015 9:49 PM
To: intel-wired-lan@lists.osuosl.org
Subject: [Intel-wired-lan] [PATCH 2/3] fm10k: fold fm10k_pull_tail into fm10k_add_rx_frag

This change folds the fm10k_pull_tail call into fm10k_add_rx_frag.  The advantage to doing this is that the fragment doesn't have to be modified after it is added to the skb.

Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
---
 drivers/net/ethernet/intel/fm10k/fm10k_main.c |   66 ++++++++-----------------
 1 file changed, 20 insertions(+), 46 deletions(-)

diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_main.c b/drivers/net/ethernet/intel/fm10k/fm10k_main.c
index 1b0661e3573b..4eafdad318b4 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_main.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_main.c

Tested-by: Krishneil Singh <Krishneil.k.singh@intel.com>

_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan at lists.osuosl.org
http://lists.osuosl.org/mailman/listinfo/intel-wired-lan

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-05-14 17:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-23  4:49 [Intel-wired-lan] [PATCH 0/3] igb/fm10k/ixgbevf: Drop XXX_pull_tail and pull header in XXX_add_rx_frag Alexander Duyck
2015-04-23  4:49 ` [Intel-wired-lan] [PATCH 1/3] igb: Pull timestamp from fragment before adding it to skb Alexander Duyck
2015-05-05 18:34   ` Brown, Aaron F
2015-04-23  4:49 ` [Intel-wired-lan] [PATCH 2/3] fm10k: fold fm10k_pull_tail into fm10k_add_rx_frag Alexander Duyck
2015-05-14 17:23   ` Singh, Krishneil K
2015-04-23  4:49 ` [Intel-wired-lan] [PATCH 3/3] ixgbevf: fold ixgbevf_pull_tail into ixgbevf_add_rx_frag Alexander Duyck
2015-05-06 16:47   ` Schmitt, Phillip J
2015-04-25  1:25 ` [Intel-wired-lan] [PATCH 0/3] igb/fm10k/ixgbevf: Drop XXX_pull_tail and pull header in XXX_add_rx_frag Jeff Kirsher

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.