Re: [PATCH net-next 08/12] r8152: support TSO

2014-03-04 Thread Eric Dumazet
On Tue, 2014-03-04 at 20:01 +0800, Hayes Wang wrote: > Support scatter gather and TSO. > > - netdev->features |= NETIF_F_RXCSUM | NETIF_F_IP_CSUM; > - netdev->hw_features = NETIF_F_RXCSUM | NETIF_F_IP_CSUM; > + netdev->features |= NETIF_F_RXCSUM | NETIF_F_IP_CSUM | NETIF_F_SG | > +

Re: [PATCH net-next 08/12] r8152: support TSO

2014-03-04 Thread Eric Dumazet
On Tue, 2014-03-04 at 20:01 +0800, Hayes Wang wrote: > +static u32 r8152_xmit_frags(struct r8152 *tp, struct sk_buff *skb, u8 *data) > +{ > + struct skb_shared_info *info = skb_shinfo(skb); > + unsigned int cur_frag; > + u32 total = skb_headlen(skb); > + > + memcpy(data,

RE: [PATCH net-next 08/12] r8152: support TSO

2014-03-04 Thread David Laight
From: Eric Dumazet > On Tue, 2014-03-04 at 14:35 +, David Laight wrote: > > > Does that mean you are splitting the 64k 'ethernet packet' from TCP > > is software? I've looked at the ax88179 where the hardware can do it. > > > > Is there really a gain doing segmentation here if you have to do

RE: [PATCH net-next 08/12] r8152: support TSO

2014-03-04 Thread Eric Dumazet
On Tue, 2014-03-04 at 14:35 +, David Laight wrote: > Does that mean you are splitting the 64k 'ethernet packet' from TCP > is software? I've looked at the ax88179 where the hardware can do it. > > Is there really a gain doing segmentation here if you have to do the > extra data copy? There

RE: [PATCH net-next 08/12] r8152: support TSO

2014-03-04 Thread David Laight
From: hayeswang > David Laight [mailto:david.lai...@aculab.com] > > Sent: Tuesday, March 04, 2014 8:12 PM > > To: 'Hayes Wang'; net...@vger.kernel.org > > Cc: nic_s...@realtek.com; linux-kernel@vger.kernel.org; > > linux-...@vger.kernel.org > > Subject: RE: [PAT

RE: [PATCH net-next 08/12] r8152: support TSO

2014-03-04 Thread hayeswang
David Laight [mailto:david.lai...@aculab.com] > Sent: Tuesday, March 04, 2014 8:12 PM > To: 'Hayes Wang'; net...@vger.kernel.org > Cc: nic_s...@realtek.com; linux-kernel@vger.kernel.org; > linux-...@vger.kernel.org > Subject: RE: [PATCH net-next 08/12] r8152: support TSO >

RE: [PATCH net-next 08/12] r8152: support TSO

2014-03-04 Thread David Laight
From: Hayes Wang > Support scatter gather and TSO. > > Adjust the tx checksum function and set the max gso size to fix the > size of the tx aggregation buffer. There is little point supporting TSO unless the usb host controller supports arbitrary aligned scatter-gather. All you do is require

RE: [PATCH net-next 08/12] r8152: support TSO

2014-03-04 Thread David Laight
From: Hayes Wang Support scatter gather and TSO. Adjust the tx checksum function and set the max gso size to fix the size of the tx aggregation buffer. There is little point supporting TSO unless the usb host controller supports arbitrary aligned scatter-gather. All you do is require that a

RE: [PATCH net-next 08/12] r8152: support TSO

2014-03-04 Thread hayeswang
David Laight [mailto:david.lai...@aculab.com] Sent: Tuesday, March 04, 2014 8:12 PM To: 'Hayes Wang'; net...@vger.kernel.org Cc: nic_s...@realtek.com; linux-kernel@vger.kernel.org; linux-...@vger.kernel.org Subject: RE: [PATCH net-next 08/12] r8152: support TSO From: Hayes Wang

RE: [PATCH net-next 08/12] r8152: support TSO

2014-03-04 Thread David Laight
From: hayeswang David Laight [mailto:david.lai...@aculab.com] Sent: Tuesday, March 04, 2014 8:12 PM To: 'Hayes Wang'; net...@vger.kernel.org Cc: nic_s...@realtek.com; linux-kernel@vger.kernel.org; linux-...@vger.kernel.org Subject: RE: [PATCH net-next 08/12] r8152: support TSO

RE: [PATCH net-next 08/12] r8152: support TSO

2014-03-04 Thread Eric Dumazet
On Tue, 2014-03-04 at 14:35 +, David Laight wrote: Does that mean you are splitting the 64k 'ethernet packet' from TCP is software? I've looked at the ax88179 where the hardware can do it. Is there really a gain doing segmentation here if you have to do the extra data copy? There is no

RE: [PATCH net-next 08/12] r8152: support TSO

2014-03-04 Thread David Laight
From: Eric Dumazet On Tue, 2014-03-04 at 14:35 +, David Laight wrote: Does that mean you are splitting the 64k 'ethernet packet' from TCP is software? I've looked at the ax88179 where the hardware can do it. Is there really a gain doing segmentation here if you have to do the

Re: [PATCH net-next 08/12] r8152: support TSO

2014-03-04 Thread Eric Dumazet
On Tue, 2014-03-04 at 20:01 +0800, Hayes Wang wrote: +static u32 r8152_xmit_frags(struct r8152 *tp, struct sk_buff *skb, u8 *data) +{ + struct skb_shared_info *info = skb_shinfo(skb); + unsigned int cur_frag; + u32 total = skb_headlen(skb); + + memcpy(data, skb-data,

Re: [PATCH net-next 08/12] r8152: support TSO

2014-03-04 Thread Eric Dumazet
On Tue, 2014-03-04 at 20:01 +0800, Hayes Wang wrote: Support scatter gather and TSO. - netdev-features |= NETIF_F_RXCSUM | NETIF_F_IP_CSUM; - netdev-hw_features = NETIF_F_RXCSUM | NETIF_F_IP_CSUM; + netdev-features |= NETIF_F_RXCSUM | NETIF_F_IP_CSUM | NETIF_F_SG | +