aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ehea
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2009-10-13 01:34:20 -0400
committerDavid S. Miller <davem@davemloft.net>2009-10-13 14:48:18 -0400
commit89d71a66c40d629e3b1285def543ab1425558cd5 (patch)
tree45159e85418170fe36e4e023d9617693625d1740 /drivers/net/ehea
parentbff1c09640b3006bca711e18ef08a5fb955ad9b5 (diff)
net: Use netdev_alloc_skb_ip_align()
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ehea')
-rw-r--r--drivers/net/ehea/ehea_main.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c
index 41bd7aeafd82..7f8fcc2fa748 100644
--- a/drivers/net/ehea/ehea_main.c
+++ b/drivers/net/ehea/ehea_main.c
@@ -447,7 +447,9 @@ static int ehea_refill_rq_def(struct ehea_port_res *pr,
447 max_index_mask = q_skba->len - 1; 447 max_index_mask = q_skba->len - 1;
448 for (i = 0; i < fill_wqes; i++) { 448 for (i = 0; i < fill_wqes; i++) {
449 u64 tmp_addr; 449 u64 tmp_addr;
450 struct sk_buff *skb = netdev_alloc_skb(dev, packet_size); 450 struct sk_buff *skb;
451
452 skb = netdev_alloc_skb_ip_align(dev, packet_size);
451 if (!skb) { 453 if (!skb) {
452 q_skba->os_skbs = fill_wqes - i; 454 q_skba->os_skbs = fill_wqes - i;
453 if (q_skba->os_skbs == q_skba->len - 2) { 455 if (q_skba->os_skbs == q_skba->len - 2) {
@@ -457,7 +459,6 @@ static int ehea_refill_rq_def(struct ehea_port_res *pr,
457 } 459 }
458 break; 460 break;
459 } 461 }
460 skb_reserve(skb, NET_IP_ALIGN);
461 462
462 skb_arr[index] = skb; 463 skb_arr[index] = skb;
463 tmp_addr = ehea_map_vaddr(skb->data); 464 tmp_addr = ehea_map_vaddr(skb->data);
@@ -500,7 +501,7 @@ static int ehea_refill_rq2(struct ehea_port_res *pr, int nr_of_wqes)
500{ 501{
501 return ehea_refill_rq_def(pr, &pr->rq2_skba, 2, 502 return ehea_refill_rq_def(pr, &pr->rq2_skba, 2,
502 nr_of_wqes, EHEA_RWQE2_TYPE, 503 nr_of_wqes, EHEA_RWQE2_TYPE,
503 EHEA_RQ2_PKT_SIZE + NET_IP_ALIGN); 504 EHEA_RQ2_PKT_SIZE);
504} 505}
505 506
506 507
@@ -508,7 +509,7 @@ static int ehea_refill_rq3(struct ehea_port_res *pr, int nr_of_wqes)
508{ 509{
509 return ehea_refill_rq_def(pr, &pr->rq3_skba, 3, 510 return ehea_refill_rq_def(pr, &pr->rq3_skba, 3,
510 nr_of_wqes, EHEA_RWQE3_TYPE, 511 nr_of_wqes, EHEA_RWQE3_TYPE,
511 EHEA_MAX_PACKET_SIZE + NET_IP_ALIGN); 512 EHEA_MAX_PACKET_SIZE);
512} 513}
513 514
514static inline int ehea_check_cqe(struct ehea_cqe *cqe, int *rq_num) 515static inline int ehea_check_cqe(struct ehea_cqe *cqe, int *rq_num)