30
30
#include <linux/skbuff.h>
31
31
32
32
#include <linux/ip.h>
33
- #include <linux/tcp.h>
34
33
#include <net/checksum.h>
35
- #include <linux/inet_lro.h>
36
34
#include <linux/prefetch.h>
37
35
38
36
#include <asm/irq.h>
52
50
*
53
51
* - Multicast support
54
52
* - Large MTU support
55
- * - SW LRO
56
53
* - Multiqueue RX/TX
57
54
*/
58
55
59
- #define LRO_MAX_AGGR 64
60
-
61
56
#define PE_MIN_MTU 64
62
57
#define PE_MAX_MTU 9000
63
58
#define PE_DEF_MTU ETH_DATA_LEN
@@ -257,37 +252,6 @@ static int pasemi_mac_set_mac_addr(struct net_device *dev, void *p)
257
252
return 0 ;
258
253
}
259
254
260
- static int get_skb_hdr (struct sk_buff * skb , void * * iphdr ,
261
- void * * tcph , u64 * hdr_flags , void * data )
262
- {
263
- u64 macrx = (u64 ) data ;
264
- unsigned int ip_len ;
265
- struct iphdr * iph ;
266
-
267
- /* IPv4 header checksum failed */
268
- if ((macrx & XCT_MACRX_HTY_M ) != XCT_MACRX_HTY_IPV4_OK )
269
- return -1 ;
270
-
271
- /* non tcp packet */
272
- skb_reset_network_header (skb );
273
- iph = ip_hdr (skb );
274
- if (iph -> protocol != IPPROTO_TCP )
275
- return -1 ;
276
-
277
- ip_len = ip_hdrlen (skb );
278
- skb_set_transport_header (skb , ip_len );
279
- * tcph = tcp_hdr (skb );
280
-
281
- /* check if ip header and tcp header are complete */
282
- if (ntohs (iph -> tot_len ) < ip_len + tcp_hdrlen (skb ))
283
- return -1 ;
284
-
285
- * hdr_flags = LRO_IPV4 | LRO_TCP ;
286
- * iphdr = iph ;
287
-
288
- return 0 ;
289
- }
290
-
291
255
static int pasemi_mac_unmap_tx_skb (struct pasemi_mac * mac ,
292
256
const int nfrags ,
293
257
struct sk_buff * skb ,
@@ -817,7 +781,7 @@ static int pasemi_mac_clean_rx(struct pasemi_mac_rxring *rx,
817
781
skb_put (skb , len - 4 );
818
782
819
783
skb -> protocol = eth_type_trans (skb , mac -> netdev );
820
- lro_receive_skb (& mac -> lro_mgr , skb , ( void * ) macrx );
784
+ napi_gro_receive (& mac -> napi , skb );
821
785
822
786
next :
823
787
RX_DESC (rx , n ) = 0 ;
@@ -839,8 +803,6 @@ static int pasemi_mac_clean_rx(struct pasemi_mac_rxring *rx,
839
803
840
804
rx_ring (mac )-> next_to_clean = n ;
841
805
842
- lro_flush_all (& mac -> lro_mgr );
843
-
844
806
/* Increase is in number of 16-byte entries, and since each descriptor
845
807
* with an 8BRES takes up 3x8 bytes (padded to 4x8), increase with
846
808
* count*2.
@@ -1754,16 +1716,6 @@ pasemi_mac_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1754
1716
dev -> features = NETIF_F_IP_CSUM | NETIF_F_LLTX | NETIF_F_SG |
1755
1717
NETIF_F_HIGHDMA | NETIF_F_GSO ;
1756
1718
1757
- mac -> lro_mgr .max_aggr = LRO_MAX_AGGR ;
1758
- mac -> lro_mgr .max_desc = MAX_LRO_DESCRIPTORS ;
1759
- mac -> lro_mgr .lro_arr = mac -> lro_desc ;
1760
- mac -> lro_mgr .get_skb_header = get_skb_hdr ;
1761
- mac -> lro_mgr .features = LRO_F_NAPI | LRO_F_EXTRACT_VLAN_ID ;
1762
- mac -> lro_mgr .dev = mac -> netdev ;
1763
- mac -> lro_mgr .ip_summed = CHECKSUM_UNNECESSARY ;
1764
- mac -> lro_mgr .ip_summed_aggr = CHECKSUM_UNNECESSARY ;
1765
-
1766
-
1767
1719
mac -> dma_pdev = pci_get_device (PCI_VENDOR_ID_PASEMI , 0xa007 , NULL );
1768
1720
if (!mac -> dma_pdev ) {
1769
1721
dev_err (& mac -> pdev -> dev , "Can't find DMA Controller\n" );
0 commit comments