[dpdk-dev] [PATCH v2 12/12] virtio: add Tso support

2016-10-18 Thread Olivier Matz
Hi Stephen, On 10/14/2016 01:33 AM, Stephen Hemminger wrote: > On Thu, 13 Oct 2016 16:18:39 +0800 > Yuanhan Liu wrote: > >> On Mon, Oct 03, 2016 at 11:00:23AM +0200, Olivier Matz wrote: >>> +/* When doing TSO, the IP length is not included in the pseudo header >>> + * checksum of the packet give

[dpdk-dev] [PATCH v2 12/12] virtio: add Tso support

2016-10-14 Thread Yuanhan Liu
On Thu, Oct 13, 2016 at 05:45:21PM +0200, Olivier Matz wrote: > >> If you have a packet split like this: > >> > >> mbuf segment 1 mbuf segment 2 > >> -- > >> | Ethernet header | IP hea| |der | TCP header | da

[dpdk-dev] [PATCH v2 12/12] virtio: add Tso support

2016-10-13 Thread Yuanhan Liu
On Thu, Oct 13, 2016 at 05:15:24PM +0200, Olivier MATZ wrote: > > > On 10/13/2016 05:01 PM, Yuanhan Liu wrote: > >On Thu, Oct 13, 2016 at 04:52:25PM +0200, Olivier MATZ wrote: > >> > >> > >>On 10/13/2016 04:16 PM, Yuanhan Liu wrote: > >>>On Thu, Oct 13, 2016 at 04:02:49PM +0200, Olivier MATZ wrot

[dpdk-dev] [PATCH v2 12/12] virtio: add Tso support

2016-10-13 Thread Yuanhan Liu
On Thu, Oct 13, 2016 at 04:52:25PM +0200, Olivier MATZ wrote: > >In the "else" clause, the ip header is still in the mbuf, right? > >Why do you have to access it the way like: > > > > ip_version = *rte_pktmbuf_mtod_offset(m, uint8_t *, > > m->l2_len) >> 4; > > > >Why can't you just

[dpdk-dev] [PATCH v2 12/12] virtio: add Tso support

2016-10-13 Thread Yuanhan Liu
On Thu, Oct 13, 2016 at 04:52:25PM +0200, Olivier MATZ wrote: > > > On 10/13/2016 04:16 PM, Yuanhan Liu wrote: > >On Thu, Oct 13, 2016 at 04:02:49PM +0200, Olivier MATZ wrote: > >> > >> > >>On 10/13/2016 10:18 AM, Yuanhan Liu wrote: > >>>On Mon, Oct 03, 2016 at 11:00:23AM +0200, Olivier Matz wrot

[dpdk-dev] [PATCH v2 12/12] virtio: add Tso support

2016-10-13 Thread Yuanhan Liu
On Thu, Oct 13, 2016 at 04:02:49PM +0200, Olivier MATZ wrote: > > > On 10/13/2016 10:18 AM, Yuanhan Liu wrote: > >On Mon, Oct 03, 2016 at 11:00:23AM +0200, Olivier Matz wrote: > >>+/* When doing TSO, the IP length is not included in the pseudo header > >>+ * checksum of the packet given to the PM

[dpdk-dev] [PATCH v2 12/12] virtio: add Tso support

2016-10-13 Thread Olivier Matz
Le 13 octobre 2016 17:29:35 CEST, Yuanhan Liu a ?crit : >On Thu, Oct 13, 2016 at 05:15:24PM +0200, Olivier MATZ wrote: >> >> >> On 10/13/2016 05:01 PM, Yuanhan Liu wrote: >> >On Thu, Oct 13, 2016 at 04:52:25PM +0200, Olivier MATZ wrote: >> >> >> >> >> >>On 10/13/2016 04:16 PM, Yuanhan Liu wro

[dpdk-dev] [PATCH v2 12/12] virtio: add Tso support

2016-10-13 Thread Olivier MATZ
On 10/13/2016 05:01 PM, Yuanhan Liu wrote: > On Thu, Oct 13, 2016 at 04:52:25PM +0200, Olivier MATZ wrote: >> >> >> On 10/13/2016 04:16 PM, Yuanhan Liu wrote: >>> On Thu, Oct 13, 2016 at 04:02:49PM +0200, Olivier MATZ wrote: On 10/13/2016 10:18 AM, Yuanhan Liu wrote: > On Mon,

[dpdk-dev] [PATCH v2 12/12] virtio: add Tso support

2016-10-13 Thread Olivier MATZ
On 10/13/2016 04:16 PM, Yuanhan Liu wrote: > On Thu, Oct 13, 2016 at 04:02:49PM +0200, Olivier MATZ wrote: >> >> >> On 10/13/2016 10:18 AM, Yuanhan Liu wrote: >>> On Mon, Oct 03, 2016 at 11:00:23AM +0200, Olivier Matz wrote: +/* When doing TSO, the IP length is not included in the pseudo hea

[dpdk-dev] [PATCH v2 12/12] virtio: add Tso support

2016-10-13 Thread Stephen Hemminger
On Thu, 13 Oct 2016 16:18:39 +0800 Yuanhan Liu wrote: > On Mon, Oct 03, 2016 at 11:00:23AM +0200, Olivier Matz wrote: > > +/* When doing TSO, the IP length is not included in the pseudo header > > + * checksum of the packet given to the PMD, but for virtio it is > > + * expected. > > + */ > > +st

[dpdk-dev] [PATCH v2 12/12] virtio: add Tso support

2016-10-13 Thread Yuanhan Liu
On Mon, Oct 03, 2016 at 11:00:23AM +0200, Olivier Matz wrote: > +/* When doing TSO, the IP length is not included in the pseudo header > + * checksum of the packet given to the PMD, but for virtio it is > + * expected. > + */ > +static void > +virtio_tso_fix_cksum(struct rte_mbuf *m) > +{ > + /

[dpdk-dev] [PATCH v2 12/12] virtio: add Tso support

2016-10-13 Thread Olivier MATZ
On 10/13/2016 10:18 AM, Yuanhan Liu wrote: > On Mon, Oct 03, 2016 at 11:00:23AM +0200, Olivier Matz wrote: >> +/* When doing TSO, the IP length is not included in the pseudo header >> + * checksum of the packet given to the PMD, but for virtio it is >> + * expected. >> + */ >> +static void >> +vi

[dpdk-dev] [PATCH v2 12/12] virtio: add Tso support

2016-10-03 Thread Olivier Matz
Signed-off-by: Olivier Matz --- drivers/net/virtio/virtio_ethdev.c | 6 ++ drivers/net/virtio/virtio_ethdev.h | 2 + drivers/net/virtio/virtio_rxtx.c | 129 - 3 files changed, 134 insertions(+), 3 deletions(-) diff --git a/drivers/net/virtio/virtio_ethde