netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/14] mlx4_en: Fixed incorrect unmapping on RX flow.
@ 2010-08-24 13:45 Yevgeny Petrilin
  2010-08-24 22:07 ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Yevgeny Petrilin @ 2010-08-24 13:45 UTC (permalink / raw)
  To: davem; +Cc: netdev, yevgenyp, eugenia

When allocating new fragments to replace the ones that would be passed to the stack,
The fragments that should be replaced, are the ones that were already used.

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
---
 drivers/net/mlx4/en_rx.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/mlx4/en_rx.c b/drivers/net/mlx4/en_rx.c
index 8e2fcb7..1ee4fd5 100644
--- a/drivers/net/mlx4/en_rx.c
+++ b/drivers/net/mlx4/en_rx.c
@@ -459,7 +459,7 @@ static int mlx4_en_complete_rx_desc(struct mlx4_en_priv *priv,
 			goto fail;
 
 		/* Unmap buffer */
-		pci_unmap_single(mdev->pdev, dma, skb_frags[nr].size,
+		pci_unmap_single(mdev->pdev, dma, skb_frags_rx[nr].size,
 				 PCI_DMA_FROMDEVICE);
 	}
 	/* Adjust size of last fragment to match actual length */
-- 
1.6.1.3


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

* Re: [PATCH 01/14] mlx4_en: Fixed incorrect unmapping on RX flow.
  2010-08-24 13:45 [PATCH 01/14] mlx4_en: Fixed incorrect unmapping on RX flow Yevgeny Petrilin
@ 2010-08-24 22:07 ` David Miller
  2010-08-25  8:55   ` Yevgeny Petrilin
  0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2010-08-24 22:07 UTC (permalink / raw)
  To: yevgenyp; +Cc: netdev, eugenia


All 14 patches applied, but patches #12 and #13 had a lot of conflicts
because the LRO options were already deleted by the patch I applied
last week from Amerigo Wang:

commit f3c58aceaa3f237ba43735805f4677950327b8ee
Author: Amerigo Wang <amwang@redhat.com>
Date:   Tue Aug 17 21:51:18 2010 +0000

    mlx4: remove num_lro parameter
    
    As suggested by David, this parameter can die, we can use ethtool
    to turn LRO on/off. Compile tests only.
    
    Signed-off-by: WANG Cong <amwang@redhat.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

I fixed up the conflicts but please generate your patches against
the correct tree in the future.

I also had to add the following build warning fix after applying your
patches, do you look at the build output at allwhen you make changes
to this driver?

--------------------
mlx4_en: Fix build warning in mlx4_en_create_rx_ring.

drivers/net/mlx4/en_rx.c: In function ‘mlx4_en_create_rx_ring’:
drivers/net/mlx4/en_rx.c:305: warning: label ‘err_map’ defined but not used

Signed-off-by: David S. Miller <davem@davemloft.net>
---
 drivers/net/mlx4/en_rx.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx4/en_rx.c b/drivers/net/mlx4/en_rx.c
index cb7ff00..c4aad7f 100644
--- a/drivers/net/mlx4/en_rx.c
+++ b/drivers/net/mlx4/en_rx.c
@@ -302,8 +302,6 @@ int mlx4_en_create_rx_ring(struct mlx4_en_priv *priv,
 
 	return 0;
 
-err_map:
-	mlx4_en_unmap_buffer(&ring->wqres.buf);
 err_hwq:
 	mlx4_free_hwq_res(mdev->dev, &ring->wqres, ring->buf_size);
 err_ring:
-- 
1.7.2.2


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

* RE: [PATCH 01/14] mlx4_en: Fixed incorrect unmapping on RX flow.
  2010-08-24 22:07 ` David Miller
@ 2010-08-25  8:55   ` Yevgeny Petrilin
  2010-08-25  9:28     ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Yevgeny Petrilin @ 2010-08-25  8:55 UTC (permalink / raw)
  To: David Miller; +Cc: netdev@vger.kernel.org, Eugenia Emantayev

> All 14 patches applied, but patches #12 and #13 had a lot of conflicts because the LRO options were already deleted by the patch I applied last week from Amerigo Wang:

> I fixed up the conflicts but please generate your patches against
> the correct tree in the future.

Apologize for this, I generated the patches against tree that was pulled a week ago.

> 
> I also had to add the following build warning fix after applying your
> patches, do you look at the build output at allwhen you make changes
> to this driver?

I suspect that these warnings were caused by the merge with the patch you mentioned,
The patches I sent remove this label:

@@ -312,28 +300,8 @@ int mlx4_en_create_rx_ring(struct mlx4_en_priv *priv,
        }
        ring->buf = ring->wqres.buf.direct.buf;

-       /* Configure lro mngr */
-       memset(&ring->lro, 0, sizeof(struct net_lro_mgr));
-       ring->lro.dev = priv->dev;
-       ring->lro.features = LRO_F_NAPI;
-       ring->lro.frag_align_pad = NET_IP_ALIGN;
-       ring->lro.ip_summed = CHECKSUM_UNNECESSARY;
-       ring->lro.ip_summed_aggr = CHECKSUM_UNNECESSARY;
-       ring->lro.max_desc = mdev->profile.num_lro;
-       ring->lro.max_aggr = MAX_SKB_FRAGS;
-       ring->lro.lro_arr = kzalloc(mdev->profile.num_lro *
-                                   sizeof(struct net_lro_desc),
-                                   GFP_KERNEL);
-       if (!ring->lro.lro_arr) {
-               en_err(priv, "Failed to allocate lro array\n");
-               goto err_map;
-       }
-       ring->lro.get_frag_header = mlx4_en_get_frag_header;
-
        return 0;

-err_map:
-       mlx4_en_unmap_buffer(&ring->wqres.buf);
 err_hwq:
        mlx4_free_hwq_res(mdev->dev, &ring->wqres, ring->buf_size);
 err_ring:


Thanks,
Yevgeny

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

* Re: [PATCH 01/14] mlx4_en: Fixed incorrect unmapping on RX flow.
  2010-08-25  8:55   ` Yevgeny Petrilin
@ 2010-08-25  9:28     ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2010-08-25  9:28 UTC (permalink / raw)
  To: yevgenyp; +Cc: netdev, eugenia

From: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Date: Wed, 25 Aug 2010 11:55:55 +0300

> I suspect that these warnings were caused by the merge with the patch you mentioned,
> The patches I sent remove this label:

Yes that seems to be the case, my bad :-)

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

end of thread, other threads:[~2010-08-25  9:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-24 13:45 [PATCH 01/14] mlx4_en: Fixed incorrect unmapping on RX flow Yevgeny Petrilin
2010-08-24 22:07 ` David Miller
2010-08-25  8:55   ` Yevgeny Petrilin
2010-08-25  9:28     ` David Miller

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).