From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-bl2-obe.outbound.protection.outlook.com (mail-bl2on0105.outbound.protection.outlook.com [65.55.169.105]) by dpdk.org (Postfix) with ESMTP id 76D6729D2 for ; Thu, 7 Apr 2016 19:11:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shieldxnetworks.onmicrosoft.com; s=selector1-shieldxnetworks-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=vngbXB2qw9x0ML3XM/1LYfwU6d2z54xPeQrxHgX92v8=; b=kI81Dq5lx2EfaK1FXVyQRNYsLFW+793yO9o0BdJolH9N1XM059X61j9P8NZ5A+aM8Nny+8KHHrt0rV5IMVy6R6UF4Yrq10/Qwxun+n0WRe8eU+OtpZogI5MfC69/+zRn5R2pL5ClIduvfzwtJgGQSO06uo4TydWYbfMEeDa73n4= Received: from SN1PR20MB0285.namprd20.prod.outlook.com (10.163.87.151) by SN1PR20MB0285.namprd20.prod.outlook.com (10.163.87.151) with Microsoft SMTP Server (TLS) id 15.1.447.15; Thu, 7 Apr 2016 17:11:19 +0000 Received: from SN1PR20MB0285.namprd20.prod.outlook.com ([10.163.87.151]) by SN1PR20MB0285.namprd20.prod.outlook.com ([10.163.87.151]) with mapi id 15.01.0447.028; Thu, 7 Apr 2016 17:11:19 +0000 From: John Guzik To: "dev@dpdk.org" Thread-Topic: vmxnet3 driver - vlan offload is on end descriptor Thread-Index: AdGQ7xN5t9fuwnkAQqa8NqYIVPrnYg== Date: Thu, 7 Apr 2016 17:11:19 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=shieldxnetworks.com; x-originating-ip: [50.242.104.1] x-ms-office365-filtering-correlation-id: 6d46e2bb-b29a-4740-967a-08d35f07a2e2 x-microsoft-exchange-diagnostics: 1; SN1PR20MB0285; 5:dxZLgc9meKNcsLf0npg4N3C45C5V/0bNy9jRLYEeXpKw9Z6ppXT8ZwNwEEdjLoCfZjoiJWEornbUReZHx3gpwwMdBu/VrGK54gKXHTpDMCGWvj1T1hUcyHx5q1XwwGIS/r87AJTGr2N1BVnGFVFQ5w==; 24:eCoHuBjAuo0k2zMgVtVtm1Jydxknp7smYRUeGJhaEFkGWySSDdYg75yTdMm0uSp2jzXXr4f4v2fMkXA7WcM40P7m3Xg8J61Thee5jpO+Bj8= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SN1PR20MB0285; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040074)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6041046)(6043046); SRVR:SN1PR20MB0285; BCL:0; PCL:0; RULEID:; SRVR:SN1PR20MB0285; x-forefront-prvs: 0905A6B2C7 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(2906002)(81166005)(3846002)(5002640100001)(3280700002)(1096002)(102836003)(5630700001)(5640700001)(450100001)(790700001)(6116002)(92566002)(5003600100002)(19580395003)(16236675004)(77096005)(86362001)(110136002)(15975445007)(54356999)(3660700001)(50986999)(1220700001)(87936001)(33656002)(122556002)(1730700002)(586003)(19625215002)(76576001)(2900100001)(99286002)(189998001)(74316001)(107886002)(66066001)(5004730100002)(10400500002)(2501003)(11100500001)(19300405004)(229853001)(2351001)(5008740100001)(19627235001); DIR:OUT; SFP:1102; SCL:1; SRVR:SN1PR20MB0285; H:SN1PR20MB0285.namprd20.prod.outlook.com; FPR:; SPF:None; MLV:ovrnspm; PTR:InfoNoRecords; LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: shieldxnetworks.com X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Apr 2016 17:11:19.0602 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e5d0fba-ef79-4dc8-ac55-5e7580d89303 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR20MB0285 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-dev] vmxnet3 driver - vlan offload is on end descriptor 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: Thu, 07 Apr 2016 17:11:21 -0000 With the new jumbo frame patch a latent bug has appeared to have been uncov= ered: the VLAN offload is on the last rx descriptor, when rcd->eop is true,= not the first rx descriptor, when rcd->sop is true and rcd->eop could be f= alse. Most likely the reason this has not been seen before is that for non-jumbo = frames rcd->eop has always been true when rcd->sop is true as well. The following patch should fix the problem: diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxne= t3_rxtx.c index 4ac0456..3d4a5eb 100644 --- a/drivers/net/vmxnet3/vmxnet3_rxtx.c +++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c @@ -587,12 +587,6 @@ vmxnet3_post_rx_bufs(vmxnet3_rx_queue_t *rxq, uint8_t = ring_id) static void vmxnet3_rx_offload(const Vmxnet3_RxCompDesc *rcd, struct rte_mbuf *rxm) { - /* Check for hardware stripped VLAN tag */ - if (rcd->ts) { - rxm->ol_flags |=3D PKT_RX_VLAN_PKT; - rxm->vlan_tci =3D rte_le_to_cpu_16((uint16_t)rcd->tci); - } - /* Check for RSS */ if (rcd->rssType !=3D VMXNET3_RCD_RSS_TYPE_NONE) { rxm->ol_flags |=3D PKT_RX_RSS_HASH; @@ -737,7 +731,15 @@ vmxnet3_recv_pkts(void *rx_queue, struct rte_mbuf **rx= _pkts, uint16_t nb_pkts) rxq->last_seg =3D rxm; if (rcd->eop) { - rx_pkts[nb_rx++] =3D rxq->start_seg; + struct rte_mbuf *start =3D rxq->start_seg; + + /* Check for hardware stripped VLAN tag */ + if (rcd->ts) { + start->ol_flags |=3D PKT_RX_VLAN_PKT; + start->vlan_tci =3D rte_le_to_cpu_16((uint1= 6_t)rcd->tci); + } + + rx_pkts[nb_rx++] =3D start; rxq->start_seg =3D NULL; }