en_rx.c (297968) | en_rx.c (299179) |
---|---|
1/* 2 * Copyright (c) 2007, 2014 Mellanox Technologies. All rights reserved. 3 * 4 * This software is available to you under a choice of one of two 5 * licenses. You may choose to be licensed under the terms of the GNU 6 * General Public License (GPL) Version 2, available from the file 7 * COPYING in the main directory of this source tree, or the 8 * OpenIB.org BSD license below: --- 538 unchanged lines hidden (view full) --- 547 /* update total packet length in packet header */ 548 mb->m_len = mb->m_pkthdr.len = length; 549 return (mb); 550} 551 552/* For cpu arch with cache line of 64B the performance is better when cqe size==64B 553 * To enlarge cqe size from 32B to 64B --> 32B of garbage (i.e. 0xccccccc) 554 * was added in the beginning of each cqe (the real data is in the corresponding 32B). | 1/* 2 * Copyright (c) 2007, 2014 Mellanox Technologies. All rights reserved. 3 * 4 * This software is available to you under a choice of one of two 5 * licenses. You may choose to be licensed under the terms of the GNU 6 * General Public License (GPL) Version 2, available from the file 7 * COPYING in the main directory of this source tree, or the 8 * OpenIB.org BSD license below: --- 538 unchanged lines hidden (view full) --- 547 /* update total packet length in packet header */ 548 mb->m_len = mb->m_pkthdr.len = length; 549 return (mb); 550} 551 552/* For cpu arch with cache line of 64B the performance is better when cqe size==64B 553 * To enlarge cqe size from 32B to 64B --> 32B of garbage (i.e. 0xccccccc) 554 * was added in the beginning of each cqe (the real data is in the corresponding 32B). |
555 * The following calc ensures that when factor==1, it means we are alligned to 64B | 555 * The following calc ensures that when factor==1, it means we are aligned to 64B |
556 * and we get the real cqe data*/ 557#define CQE_FACTOR_INDEX(index, factor) ((index << factor) + factor) 558int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int budget) 559{ 560 struct mlx4_en_priv *priv = netdev_priv(dev); 561 struct mlx4_cqe *cqe; 562 struct mlx4_en_rx_ring *ring = priv->rx_ring[cq->ring]; 563 struct mlx4_en_rx_mbuf *mb_list; --- 359 unchanged lines hidden --- | 556 * and we get the real cqe data*/ 557#define CQE_FACTOR_INDEX(index, factor) ((index << factor) + factor) 558int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int budget) 559{ 560 struct mlx4_en_priv *priv = netdev_priv(dev); 561 struct mlx4_cqe *cqe; 562 struct mlx4_en_rx_ring *ring = priv->rx_ring[cq->ring]; 563 struct mlx4_en_rx_mbuf *mb_list; --- 359 unchanged lines hidden --- |