From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 117A7B36D for ; Tue, 26 Aug 2014 10:33:16 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP; 26 Aug 2014 01:37:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,862,1389772800"; d="scan'208";a="377031719" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by FMSMGA003.fm.intel.com with ESMTP; 26 Aug 2014 01:33:06 -0700 Received: from fmsmsx151.amr.corp.intel.com (10.19.17.220) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.195.1; Tue, 26 Aug 2014 01:37:14 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by FMSMSX151.amr.corp.intel.com (10.19.17.220) with Microsoft SMTP Server (TLS) id 14.3.195.1; Tue, 26 Aug 2014 01:37:14 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.246]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.147]) with mapi id 14.03.0195.001; Tue, 26 Aug 2014 16:37:11 +0800 From: "Ouyang, Changchun" To: Stephen Hemminger Thread-Topic: [RFC 06/10] virtio: use software vlan stripping Thread-Index: AQHPwNLIkuBom6zzbkOfNnmLgUOrQ5vihQRA Date: Tue, 26 Aug 2014 08:37:11 +0000 Message-ID: References: <20140826020746.062748014@networkplumber.org> <20140826020848.386074683@networkplumber.org> In-Reply-To: <20140826020848.386074683@networkplumber.org> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [RFC 06/10] virtio: use software vlan stripping X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Aug 2014 08:33:17 -0000 SGkgU3RlcGhlbiwNCg0KV291bGQgeW91IHBsZWFzZSBkZXNjcmliZSB0aGUgdXNlIHNjZW5hcmlv IGZvciB0aGUgZnJvbnQgZW5kIHJ4IHZsYW4gc3RyaXAgYW5kIHR4IHZsYW4gaW5zZXJ0aW9uPw0K SW4gb3VyIGN1cnJlbnQgaW1wbGVtZW50YXRpb24sIGJhY2tlbmQgd2lsbCBzdHJpcCB2bGFuIHRh ZyBmb3IgUlgsIGFuZCBpbnNlcnQgdmxhbiB0YWcgZm9yIFRYLg0KICANClRoYW5rcw0KQ2hhbmdj aHVuDQoNCj4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCj4gRnJvbTogU3RlcGhlbiBIZW1t aW5nZXIgW21haWx0bzpzdGVwaGVuQG5ldHdvcmtwbHVtYmVyLm9yZ10NCj4gU2VudDogVHVlc2Rh eSwgQXVndXN0IDI2LCAyMDE0IDEwOjA4IEFNDQo+IFRvOiBPdXlhbmcsIENoYW5nY2h1bg0KPiBD YzogZGV2QGRwZGsub3JnOyBTdGVwaGVuIEhlbW1pbmdlcg0KPiBTdWJqZWN0OiBbUkZDIDA2LzEw XSB2aXJ0aW86IHVzZSBzb2Z0d2FyZSB2bGFuIHN0cmlwcGluZw0KPiANCj4gSW1wbGVtZW50IFZM QU4gc3RyaXBwaW5nIGluIHNvZnR3YXJlLiBUaGlzIGFsbG93cyBhcHBsaWNhdGlvbiB0byBiZSBk ZXZpY2UNCj4gaW5kZXBlbmRlbnQuDQo+IA0KPiBTaWduZWQtb2ZmLWJ5OiBTdGVwaGVuIEhlbW1p bmdlciA8c3RlcGhlbkBuZXR3b3JrcGx1bWJlci5vcmc+DQo+IA0KPiANCj4gLS0tDQo+ICBsaWIv bGlicnRlX3BtZF92aXJ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