[ewg] [PATCH 6/6] include linux/ip.h for ip_hdr()

Shawn Bohrer sbohrer at rgmadvisors.com
Wed Dec 7 16:56:55 PST 2011


Signed-off-by: Shawn Bohrer <sbohrer at rgmadvisors.com>
---
 .../fixes/mlx4_en_0060_multiqueue_support.patch    |   64 +++++++++++---------
 1 files changed, 35 insertions(+), 29 deletions(-)

diff --git a/kernel_patches/fixes/mlx4_en_0060_multiqueue_support.patch b/kernel_patches/fixes/mlx4_en_0060_multiqueue_support.patch
index 49a2a31..c3f1223 100644
--- a/kernel_patches/fixes/mlx4_en_0060_multiqueue_support.patch
+++ b/kernel_patches/fixes/mlx4_en_0060_multiqueue_support.patch
@@ -11,11 +11,11 @@ Signed-off-by: Yevgeny Petrilin <yevgenyp at mellanox.co.il>
  drivers/net/mlx4/mlx4_en.h   |   17 ++++++++-
  4 files changed, 70 insertions(+), 35 deletions(-)
 
-diff --git a/drivers/net/mlx4/en_main.c b/drivers/net/mlx4/en_main.c
-index 58896ee..597378e 100644
---- a/drivers/net/mlx4/en_main.c
-+++ b/drivers/net/mlx4/en_main.c
-@@ -97,13 +97,8 @@ static int mlx4_en_get_profile(struct mlx4_en_dev *mdev)
+Index: ofed_kernel/drivers/net/mlx4/en_main.c
+===================================================================
+--- ofed_kernel.orig/drivers/net/mlx4/en_main.c
++++ ofed_kernel/drivers/net/mlx4/en_main.c
+@@ -97,13 +97,8 @@ static int mlx4_en_get_profile(struct ml
  		params->prof[i].tx_ppp = pfctx;
  		params->prof[i].tx_ring_size = MLX4_EN_DEF_TX_RING_SIZE;
  		params->prof[i].rx_ring_size = MLX4_EN_DEF_RX_RING_SIZE;
@@ -31,11 +31,11 @@ index 58896ee..597378e 100644
  	}
  
  	return 0;
-diff --git a/drivers/net/mlx4/en_netdev.c b/drivers/net/mlx4/en_netdev.c
-index e0e5a62..a2d2f46 100644
---- a/drivers/net/mlx4/en_netdev.c
-+++ b/drivers/net/mlx4/en_netdev.c
-@@ -942,6 +942,7 @@ static const struct net_device_ops mlx4_netdev_ops = {
+Index: ofed_kernel/drivers/net/mlx4/en_netdev.c
+===================================================================
+--- ofed_kernel.orig/drivers/net/mlx4/en_netdev.c
++++ ofed_kernel/drivers/net/mlx4/en_netdev.c
+@@ -952,6 +952,7 @@ static const struct net_device_ops mlx4_
  	.ndo_open		= mlx4_en_open,
  	.ndo_stop		= mlx4_en_close,
  	.ndo_start_xmit		= mlx4_en_xmit,
@@ -43,7 +43,7 @@ index e0e5a62..a2d2f46 100644
  	.ndo_get_stats		= mlx4_en_get_stats,
  	.ndo_set_multicast_list	= mlx4_en_set_multicast,
  	.ndo_set_mac_address	= mlx4_en_set_mac,
-@@ -964,7 +965,7 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port,
+@@ -974,7 +975,7 @@ int mlx4_en_init_netdev(struct mlx4_en_d
  	int i;
  	int err;
  
@@ -52,11 +52,19 @@ index e0e5a62..a2d2f46 100644
  	if (dev == NULL) {
  		mlx4_err(mdev, "Net device allocation failed\n");
  		return -ENOMEM;
-diff --git a/drivers/net/mlx4/en_tx.c b/drivers/net/mlx4/en_tx.c
-index 30ef84f..d84e317 100644
---- a/drivers/net/mlx4/en_tx.c
-+++ b/drivers/net/mlx4/en_tx.c
-@@ -386,18 +386,8 @@ static void mlx4_en_process_tx_cq(struct net_device *dev, struct mlx4_en_cq *cq)
+Index: ofed_kernel/drivers/net/mlx4/en_tx.c
+===================================================================
+--- ofed_kernel.orig/drivers/net/mlx4/en_tx.c
++++ ofed_kernel/drivers/net/mlx4/en_tx.c
+@@ -36,6 +36,7 @@
+ #include <linux/mlx4/qp.h>
+ #include <linux/skbuff.h>
+ #include <linux/if_vlan.h>
++#include <linux/ip.h>
+ #include <linux/vmalloc.h>
+ 
+ #include "mlx4_en.h"
+@@ -386,18 +387,8 @@ static void mlx4_en_process_tx_cq(struct
  	if (unlikely(ring->blocked)) {
  		if ((u32) (ring->prod - ring->cons) <=
  		     ring->size - HEADROOM - MAX_DESC_TXBBS) {
@@ -76,7 +84,7 @@ index 30ef84f..d84e317 100644
  			priv->port_stats.wake_queue++;
  		}
  	}
-@@ -616,21 +606,56 @@ static void build_inline_wqe(struct mlx4_en_tx_desc *tx_desc, struct sk_buff *sk
+@@ -616,21 +607,56 @@ static void build_inline_wqe(struct mlx4
  	tx_desc->ctrl.fence_size = (real_size / 16) & 0x3f;
  }
  
@@ -102,6 +110,8 @@ index 30ef84f..d84e317 100644
 -	} else {
 -		*vlan_tag = 0;
 -		tx_ind = 0;
+-	}
+-	return tx_ind;
 +		tx_ind = priv->tx_prio_map[vlan_tag >> 13];
 +		if (tx_ind)
 +			return tx_ind;
@@ -130,8 +140,7 @@ index 30ef84f..d84e317 100644
 +			tx_ind += MLX4_EN_NUM_HASH_RINGS / 2;
 +		entry->small_pkts = entry->big_pkts = 0;
 +		entry->ring = tx_ind;
- 	}
--	return tx_ind;
++	}
 +
 +	entry->cnt++;
 +	if (skb->len > MLX4_EN_SMALL_PKT_SIZE)
@@ -142,7 +151,7 @@ index 30ef84f..d84e317 100644
  }
  
  int mlx4_en_xmit(struct sk_buff *skb, struct net_device *dev)
-@@ -650,7 +675,7 @@ int mlx4_en_xmit(struct sk_buff *skb, struct net_device *dev)
+@@ -650,7 +676,7 @@ int mlx4_en_xmit(struct sk_buff *skb, st
  	dma_addr_t dma;
  	u32 index;
  	__be32 op_own;
@@ -151,7 +160,7 @@ index 30ef84f..d84e317 100644
  	int i;
  	int lso_header_size;
  	void *fragptr;
-@@ -673,15 +698,16 @@ int mlx4_en_xmit(struct sk_buff *skb, struct net_device *dev)
+@@ -673,15 +699,16 @@ int mlx4_en_xmit(struct sk_buff *skb, st
  		return NETDEV_TX_OK;
  	}
  
@@ -172,10 +181,10 @@ index 30ef84f..d84e317 100644
  		ring->blocked = 1;
  		priv->port_stats.queue_stopped++;
  
-diff --git a/drivers/net/mlx4/mlx4_en.h b/drivers/net/mlx4/mlx4_en.h
-index 15de9e4..7f446e8 100644
---- a/drivers/net/mlx4/mlx4_en.h
-+++ b/drivers/net/mlx4/mlx4_en.h
+Index: ofed_kernel/drivers/net/mlx4/mlx4_en.h
+===================================================================
+--- ofed_kernel.orig/drivers/net/mlx4/mlx4_en.h
++++ ofed_kernel/drivers/net/mlx4/mlx4_en.h
 @@ -138,8 +138,12 @@ enum {
  #define MLX4_EN_MIN_RX_SIZE	(MLX4_EN_ALLOC_SIZE / SMP_CACHE_BYTES)
  #define MLX4_EN_MIN_TX_SIZE	(4096 / TXBB_SIZE)
@@ -213,7 +222,7 @@ index 15de9e4..7f446e8 100644
  	struct work_struct mcast_task;
  	struct work_struct mac_task;
  	struct delayed_work refill_task;
-@@ -544,6 +556,7 @@ int mlx4_en_arm_cq(struct mlx4_en_priv *priv, struct mlx4_en_cq *cq);
+@@ -545,6 +557,7 @@ int mlx4_en_arm_cq(struct mlx4_en_priv *
  
  void mlx4_en_poll_tx_cq(unsigned long data);
  void mlx4_en_tx_irq(struct mlx4_cq *mcq);
@@ -221,6 +230,3 @@ index 15de9e4..7f446e8 100644
  int mlx4_en_xmit(struct sk_buff *skb, struct net_device *dev);
  
  int mlx4_en_create_tx_ring(struct mlx4_en_priv *priv, struct mlx4_en_tx_ring *ring,
--- 
-1.6.3
-
-- 
1.7.6



---------------------------------------------------------------
This email, along with any attachments, is confidential. If you 
believe you received this message in error, please contact the 
sender immediately and delete all copies of the message.  
Thank you.




More information about the ewg mailing list