From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 813BF2BCE for ; Mon, 8 Apr 2019 14:29:10 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x38CPuFN020652; Mon, 8 Apr 2019 05:29:09 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=OMGN4VzsU33LpKqIQeCKkX6Qyg5B704aVcjRyeW7LIQ=; b=L+6JSYzDwC2OwzCcULYtxE0wmcmE6exZ4rPwgZ7faeyHlKqYW6HaZIO6sUfNoXuaN8QR sxKP2QW91ntldyWPQOgnW6cPMvK3TgEIYC4qNWngr4VwYwVmn3GOV1eNOlLsP5LfaAh9 YXd6NGsAOOvtfV3nqTEpiXgOZYkaMBWz4rMqsfHeElMj4YXEXEK5yacuYWkQ2udUlXFy tVqTdtPkLyQW53PUGBq5RvOr/m2Rs/U+0VT9ZVJbOrZhxato5xFZkwHn5Y9F9qyZlRE6 FyBd1DzSbeaXDRhkkEqu+sWE5cFPSSlgewtNG3sPAHK7cdKdzN3096zN+PfIwh1b5Jvs Ng== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0b-0016f401.pphosted.com with ESMTP id 2rqdy0m165-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 08 Apr 2019 05:29:09 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 8 Apr 2019 05:29:01 -0700 Received: from NAM04-CO1-obe.outbound.protection.outlook.com (104.47.45.57) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Mon, 8 Apr 2019 05:29:01 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OMGN4VzsU33LpKqIQeCKkX6Qyg5B704aVcjRyeW7LIQ=; b=ur3h60rx6rqd/MOPXjjHWJIS7IKjbp7YfyjiaAsCsPhbHgCxyqZH6ip/kzH/GolTu1m/HGCje8Ax9qXGVPSWrYzYYhQICCPmnA9r1l+3KJIxGBbCZwrdxxluRjKg+fGdOnhXDES7L5d7EPrjRYR0NtVabp0C5dc7ynrJU7Sy634= Received: from CY4PR1801MB1863.namprd18.prod.outlook.com (10.171.255.14) by CY4PR1801MB1941.namprd18.prod.outlook.com (10.171.255.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1771.21; Mon, 8 Apr 2019 12:28:59 +0000 Received: from CY4PR1801MB1863.namprd18.prod.outlook.com ([fe80::e980:fa09:c83a:851d]) by CY4PR1801MB1863.namprd18.prod.outlook.com ([fe80::e980:fa09:c83a:851d%3]) with mapi id 15.20.1771.021; Mon, 8 Apr 2019 12:28:59 +0000 From: Pavan Nikhilesh Bhagavatula To: Bruce Richardson CC: Jerin Jacob Kollanukkaran , "thomas@monjalon.net" , "dev@dpdk.org" Thread-Topic: [EXT] Re: [dpdk-dev] [PATCH] app/testpmd: fix ether header size calculation Thread-Index: AQHU7fOnwhyqrZLgQESa9clr7u/KrqYyKLeAgAAIdzA= Date: Mon, 8 Apr 2019 12:28:59 +0000 Message-ID: References: <20190408101236.18076-1-pbhagavatula@marvell.com> <20190408115759.GB1742@bricha3-MOBL.ger.corp.intel.com> In-Reply-To: <20190408115759.GB1742@bricha3-MOBL.ger.corp.intel.com> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [183.82.17.181] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 055d7dab-1ddf-40a4-7264-08d6bc1dc6ce x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600139)(711020)(4605104)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020); SRVR:CY4PR1801MB1941; x-ms-traffictypediagnostic: CY4PR1801MB1941: x-microsoft-antispam-prvs: x-forefront-prvs: 0001227049 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(376002)(136003)(346002)(396003)(366004)(199004)(189003)(13464003)(54906003)(14444005)(486006)(99286004)(6506007)(81156014)(78486014)(76176011)(97736004)(81166006)(316002)(8676002)(102836004)(53936002)(14454004)(55016002)(86362001)(9686003)(6246003)(26005)(476003)(256004)(8936002)(68736007)(52536014)(6436002)(446003)(3846002)(11346002)(25786009)(4326008)(33656002)(6916009)(71190400001)(71200400001)(6116002)(5660300002)(186003)(2906002)(7696005)(105586002)(305945005)(7736002)(478600001)(66066001)(74316002)(229853002)(106356001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR1801MB1941; H:CY4PR1801MB1863.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: WYnMPLG64YnMbG9T3DB9hJ94dkToPhDr0u6KIRzC7c2zWnUvNbrvq32XiAsedKy2ZDHRZLfUb9mNHbB1b9xUCPajiqjvxHnzB6Hbp3DnPQhVRsYQy0o5u8mV7m1uxKS/3pFrF1ElWYI5NUsgzGsuEH+Gr6hbMO54TOzRjfnzT1yftu+OpkHBE+FKU5uCpjyLJSvbDPAdq8jKWplA3w52uQpQc2V0csTwUNNqUwSXqLvhT8SWJ2y65RJgOjV1axmLQS4Wa9L14ffyW0pnS6PNMWjWmZ8jB6u2Ac5Ye6oKS9vgTFxg3Ez/mZNdWCjqG3W89a0OBARIjmEKDTjzp5OF2rVndH+sS1IQi5aD5Wifik5TBYWSmZUoRvK+Q55PeFG9thDxqkN/CAtCSHe8LOdYtTcxB2c4SYlWRs+xUUdwBnM= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 055d7dab-1ddf-40a4-7264-08d6bc1dc6ce X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Apr 2019 12:28:59.3444 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1801MB1941 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-04-08_04:, , signatures=0 Subject: Re: [dpdk-dev] [EXT] Re: [PATCH] app/testpmd: fix ether header size calculation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Apr 2019 12:29:10 -0000 >-----Original Message----- >From: Bruce Richardson >Sent: Monday, April 8, 2019 5:28 PM >To: Pavan Nikhilesh Bhagavatula >Cc: Jerin Jacob Kollanukkaran ; thomas@monjalon.net; >dev@dpdk.org >Subject: [EXT] Re: [dpdk-dev] [PATCH] app/testpmd: fix ether header size >calculation > >External Email > >---------------------------------------------------------------------- >On Mon, Apr 08, 2019 at 10:13:04AM +0000, Pavan Nikhilesh Bhagavatula wrot= e: >> From: Pavan Nikhilesh >> >> Fix ether header size calculation in Tx only mode. >> >> Coverity issue: 337684 >> Fixes: 01b645dcff7f ("app/testpmd: move txonly prepare in separate >> function") >> >> Signed-off-by: Pavan Nikhilesh >> --- >> app/test-pmd/txonly.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/app/test-pmd/txonly.c b/app/test-pmd/txonly.c index >> 66e63788a..a9c27be3e 100644 >> --- a/app/test-pmd/txonly.c >> +++ b/app/test-pmd/txonly.c >> @@ -189,7 +189,7 @@ pkt_burst_prepare(struct rte_mbuf *pkt, struct >rte_mempool *mbp, >> /* >> * Copy headers in first packet segment(s). >> */ >> - copy_buf_to_pkt(eth_hdr, sizeof(eth_hdr), pkt, 0); >> + copy_buf_to_pkt(eth_hdr, sizeof(struct ether_hdr), pkt, 0); > >Would a simpler fix not be to change "sizeof(eth_hdr)" to "sizeof(*eth_hdr= )"? It >would keep the logical connection between the destination and destination = size, >and make future refactoring easier. > Ack, will send v2.=20 >/Bruce From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 6E554A0096 for ; Mon, 8 Apr 2019 14:29:13 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 759D32C24; Mon, 8 Apr 2019 14:29:11 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 813BF2BCE for ; Mon, 8 Apr 2019 14:29:10 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x38CPuFN020652; Mon, 8 Apr 2019 05:29:09 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=OMGN4VzsU33LpKqIQeCKkX6Qyg5B704aVcjRyeW7LIQ=; b=L+6JSYzDwC2OwzCcULYtxE0wmcmE6exZ4rPwgZ7faeyHlKqYW6HaZIO6sUfNoXuaN8QR sxKP2QW91ntldyWPQOgnW6cPMvK3TgEIYC4qNWngr4VwYwVmn3GOV1eNOlLsP5LfaAh9 YXd6NGsAOOvtfV3nqTEpiXgOZYkaMBWz4rMqsfHeElMj4YXEXEK5yacuYWkQ2udUlXFy tVqTdtPkLyQW53PUGBq5RvOr/m2Rs/U+0VT9ZVJbOrZhxato5xFZkwHn5Y9F9qyZlRE6 FyBd1DzSbeaXDRhkkEqu+sWE5cFPSSlgewtNG3sPAHK7cdKdzN3096zN+PfIwh1b5Jvs Ng== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0b-0016f401.pphosted.com with ESMTP id 2rqdy0m165-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 08 Apr 2019 05:29:09 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 8 Apr 2019 05:29:01 -0700 Received: from NAM04-CO1-obe.outbound.protection.outlook.com (104.47.45.57) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Mon, 8 Apr 2019 05:29:01 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OMGN4VzsU33LpKqIQeCKkX6Qyg5B704aVcjRyeW7LIQ=; b=ur3h60rx6rqd/MOPXjjHWJIS7IKjbp7YfyjiaAsCsPhbHgCxyqZH6ip/kzH/GolTu1m/HGCje8Ax9qXGVPSWrYzYYhQICCPmnA9r1l+3KJIxGBbCZwrdxxluRjKg+fGdOnhXDES7L5d7EPrjRYR0NtVabp0C5dc7ynrJU7Sy634= Received: from CY4PR1801MB1863.namprd18.prod.outlook.com (10.171.255.14) by CY4PR1801MB1941.namprd18.prod.outlook.com (10.171.255.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1771.21; Mon, 8 Apr 2019 12:28:59 +0000 Received: from CY4PR1801MB1863.namprd18.prod.outlook.com ([fe80::e980:fa09:c83a:851d]) by CY4PR1801MB1863.namprd18.prod.outlook.com ([fe80::e980:fa09:c83a:851d%3]) with mapi id 15.20.1771.021; Mon, 8 Apr 2019 12:28:59 +0000 From: Pavan Nikhilesh Bhagavatula To: Bruce Richardson CC: Jerin Jacob Kollanukkaran , "thomas@monjalon.net" , "dev@dpdk.org" Thread-Topic: [EXT] Re: [dpdk-dev] [PATCH] app/testpmd: fix ether header size calculation Thread-Index: AQHU7fOnwhyqrZLgQESa9clr7u/KrqYyKLeAgAAIdzA= Date: Mon, 8 Apr 2019 12:28:59 +0000 Message-ID: References: <20190408101236.18076-1-pbhagavatula@marvell.com> <20190408115759.GB1742@bricha3-MOBL.ger.corp.intel.com> In-Reply-To: <20190408115759.GB1742@bricha3-MOBL.ger.corp.intel.com> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [183.82.17.181] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 055d7dab-1ddf-40a4-7264-08d6bc1dc6ce x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600139)(711020)(4605104)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020); SRVR:CY4PR1801MB1941; x-ms-traffictypediagnostic: CY4PR1801MB1941: x-microsoft-antispam-prvs: x-forefront-prvs: 0001227049 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(376002)(136003)(346002)(396003)(366004)(199004)(189003)(13464003)(54906003)(14444005)(486006)(99286004)(6506007)(81156014)(78486014)(76176011)(97736004)(81166006)(316002)(8676002)(102836004)(53936002)(14454004)(55016002)(86362001)(9686003)(6246003)(26005)(476003)(256004)(8936002)(68736007)(52536014)(6436002)(446003)(3846002)(11346002)(25786009)(4326008)(33656002)(6916009)(71190400001)(71200400001)(6116002)(5660300002)(186003)(2906002)(7696005)(105586002)(305945005)(7736002)(478600001)(66066001)(74316002)(229853002)(106356001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR1801MB1941; H:CY4PR1801MB1863.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: WYnMPLG64YnMbG9T3DB9hJ94dkToPhDr0u6KIRzC7c2zWnUvNbrvq32XiAsedKy2ZDHRZLfUb9mNHbB1b9xUCPajiqjvxHnzB6Hbp3DnPQhVRsYQy0o5u8mV7m1uxKS/3pFrF1ElWYI5NUsgzGsuEH+Gr6hbMO54TOzRjfnzT1yftu+OpkHBE+FKU5uCpjyLJSvbDPAdq8jKWplA3w52uQpQc2V0csTwUNNqUwSXqLvhT8SWJ2y65RJgOjV1axmLQS4Wa9L14ffyW0pnS6PNMWjWmZ8jB6u2Ac5Ye6oKS9vgTFxg3Ez/mZNdWCjqG3W89a0OBARIjmEKDTjzp5OF2rVndH+sS1IQi5aD5Wifik5TBYWSmZUoRvK+Q55PeFG9thDxqkN/CAtCSHe8LOdYtTcxB2c4SYlWRs+xUUdwBnM= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 055d7dab-1ddf-40a4-7264-08d6bc1dc6ce X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Apr 2019 12:28:59.3444 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1801MB1941 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-04-08_04:, , signatures=0 Subject: Re: [dpdk-dev] [EXT] Re: [PATCH] app/testpmd: fix ether header size calculation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190408122859.k5LvJzclYDbxIzWnQuCSsQ2ki923tIFXjZr-7weOHi0@z> >-----Original Message----- >From: Bruce Richardson >Sent: Monday, April 8, 2019 5:28 PM >To: Pavan Nikhilesh Bhagavatula >Cc: Jerin Jacob Kollanukkaran ; thomas@monjalon.net; >dev@dpdk.org >Subject: [EXT] Re: [dpdk-dev] [PATCH] app/testpmd: fix ether header size >calculation > >External Email > >---------------------------------------------------------------------- >On Mon, Apr 08, 2019 at 10:13:04AM +0000, Pavan Nikhilesh Bhagavatula wrot= e: >> From: Pavan Nikhilesh >> >> Fix ether header size calculation in Tx only mode. >> >> Coverity issue: 337684 >> Fixes: 01b645dcff7f ("app/testpmd: move txonly prepare in separate >> function") >> >> Signed-off-by: Pavan Nikhilesh >> --- >> app/test-pmd/txonly.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/app/test-pmd/txonly.c b/app/test-pmd/txonly.c index >> 66e63788a..a9c27be3e 100644 >> --- a/app/test-pmd/txonly.c >> +++ b/app/test-pmd/txonly.c >> @@ -189,7 +189,7 @@ pkt_burst_prepare(struct rte_mbuf *pkt, struct >rte_mempool *mbp, >> /* >> * Copy headers in first packet segment(s). >> */ >> - copy_buf_to_pkt(eth_hdr, sizeof(eth_hdr), pkt, 0); >> + copy_buf_to_pkt(eth_hdr, sizeof(struct ether_hdr), pkt, 0); > >Would a simpler fix not be to change "sizeof(eth_hdr)" to "sizeof(*eth_hdr= )"? It >would keep the logical connection between the destination and destination = size, >and make future refactoring easier. > Ack, will send v2.=20 >/Bruce