From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0040.outbound.protection.outlook.com [104.47.42.40]) by dpdk.org (Postfix) with ESMTP id 945227CBF for ; Thu, 31 Aug 2017 16:55:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Gxf44nxfS3sQE3TYrplXunS1dxKjA46SXRx3/MssIdg=; b=ENCwjhbMBDnJVuVVExmoL//GBOTkTBE2rGqQQLtPMZyMIA7lUSgEu8lOPY5YwxTDUTAqIVHpUufJxw/S5irKM+Eh05r3z5gBXmHPVw8xd5+uY7GqP+tB5RudRiBFj5IHiG8qUC1fQbAQjVow5Xln9fR1IQ4GauS5gGZIGl4cvXY= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin.domain.name (171.76.126.71) by SN2PR07MB2526.namprd07.prod.outlook.com (2603:10b6:804:6::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.13.10; Thu, 31 Aug 2017 14:55:24 +0000 From: Jerin Jacob To: dev@dpdk.org Cc: ferruh.yigit@intel.com, santosh.shukla@caviumnetworks.com, Jerin Jacob Date: Thu, 31 Aug 2017 20:24:13 +0530 Message-Id: <20170831145436.5397-4-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170831145436.5397-1-jerin.jacob@caviumnetworks.com> References: <20170831145436.5397-1-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [171.76.126.71] X-ClientProxiedBy: MA1PR01CA0109.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:1::25) To SN2PR07MB2526.namprd07.prod.outlook.com (2603:10b6:804:6::26) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b33eefde-ed7d-4e29-475d-08d4f080508a X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(2017030254152)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:SN2PR07MB2526; X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2526; 3:kwMR8Yt6yVE1ik7ieCz3RsuT36TZIv9YtJF18A0QdQ9gNVsDEYdz8BilRJ9ertDRwDHnTuGXI4nLRkryPabhnK1xGQe40EEFx1H7nLR1CslCQbe8UHmAtOLLnDGOFXOayDO7RMWYV21bPxLVF1cOhIL9UNoNAYTClB1JXiLWWqsKrbmWsjhjU8CkbKvQ2GVIh/KlBXk4hF4v9ZOSx//RJx7ltyLlV8dhYhH2nqVV5QY7oFwb5D9gX6l8zkTxJ5d7; 25:l7ARtqD3LjTyotQQ2dU5aVNPP35KO7SEMOBxN36MsLPayN/f8dnh/5WIk9cKSiuLfJdVPnvN51Ff8K5iHxuwGZ6eIzx5MPikgyhZzCgojVqKCGMgUMXrlqA6zfY1BoWiPtRSOPfpRsJoMaFPmvhPr2EV67PV1LZXKaWbGhh85OwupR+/C9ZdD0JsyG7MLOBciM56mFXSYA8Np6VAPpxqy6wPbx6d1w+XuuSgcB9tGGaafFaBoQ/BzaclCEGqstNMp8PAHQO196L2jEq/AktEbI6axgwEWu/zyv0LG5ls1YHimswQeuCJhmFv0kCCxiKgll55nN2FeK+ywVWxX/MqoQ==; 31:klJBoIwXV8XgLnITPo8NmnJZznJm29yBf1wyHw7smQ/dEEE09EVOtcym8aVvUgi38DcnGl1vQLwSRGzwLB+bOvcNR0DfRg6iyiEI/5Z8OZBu2Lu3aeCDfl48gjK404lterpbECEUkU/0IZ4ifZkBe2LaSIBcTb7Cn916C3dc9KROGY7JjklSTUTRqbUu6B+mblHRaHnrXqyI9RmmzH+fmixUZBtCaA0vlqsx3ImyaKI= X-MS-TrafficTypeDiagnostic: SN2PR07MB2526: X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2526; 20:VDYrkjQ3D2Upcxc59uZGmmSpxk7hUXgMbr2LTAGOojI7uv4wm5iJ5qKzTLojdF9gSN/ju2V1Ss1LleVRDLh2dqq4gdbM30gCJoeStEQeWA3lktDZXPkriaSe02n7ycpeEG6SLoM7f3+6ttrIyO3LTeCBJL7/leWaNWD6N0UesXRmTXs/0cp41z9aQAC0MMQz1Qk7L5UK/zdAw59N2gF9XQ+q25qCXVyrHM3EkG6syQPQsRDp3L6Er7mmNc3uw8DOunG4/XVcB0n5VPn+jSg1vbBU2mpBj/cMctG7vs3+1QBXY2uljAYPUXTLlmlAyxUjz9cAngRuIdO6srpP7ZuUmlj6EAACjTHqd+kKdWWiJdpkeFUfYTamGLej/y+IQfEU88+hVUa2d9G9xvq2hRiZIbVNafOm1a+fmB7dpUF6zfbjOq0bpNzA07rlI10iAntYjlfsiAUov56XmSOJkWpWEk9xenZU6i4IIx3vwri60jNtrP4sfux06csryuPGLpnzsU0nlWT8FEkwOUrGZiRnW8eTNnlsYIfVAVRQ4wB8a4yUZWgW5kVsrtNZ+RBKx0axCWYUptjrzirnkWXgPCefFwUH+U4FG5VzUgg8MlttzkY=; 4:I+9nUBIobh+WJFQjemp8AyzsbC3q4mZAvJdAxiRJGOoHkbdclrgpAcd6kwklvuTjQJU/Z81MiNZuehlfy1A6+ANJcQotl+lPET/YEBuPTyhDgwlkfrmOMel3t9WlX/H/e4UCuf8Em1B6gTZH+2TNhi/OOPuzisTqnvLyh7n3FlwXvtv4K9HYSj/syVpMKRHdK7+dCDPTDlORYC6ZtS64Djba9BBa6ugu0bmdCZDJhTi/djfqhjrvhWNc3G0PVKlZ X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(93006095)(100000703101)(100105400095)(10201501046)(3002001)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123564025)(20161123562025)(20161123560025)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:SN2PR07MB2526; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:SN2PR07MB2526; X-Forefront-PRVS: 04163EF38A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(199003)(189002)(25786009)(1076002)(53936002)(3846002)(6116002)(478600001)(110136004)(72206003)(7736002)(6666003)(107886003)(6512007)(305945005)(6506006)(36756003)(6486002)(68736007)(5003940100001)(189998001)(50986999)(42882006)(106356001)(101416001)(76176999)(2950100002)(6916009)(5660300001)(2361001)(15650500001)(33646002)(2351001)(2906002)(4326008)(97736004)(105586002)(48376002)(50466002)(81166006)(66066001)(69596002)(8936002)(47776003)(53416004)(8676002)(50226002)(81156014)(42186005); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR07MB2526; H:jerin.domain.name; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN2PR07MB2526; 23:uYN4mxl1pUXJszqtpXGi2/kG/YBwvMhyJ+sdCbCDx?= =?us-ascii?Q?3/RsxZ+O/Rjh/jEpM+OzwXiDoVR3/qD1oNu8iEmMY6+gdEC1Dy74aPWVp48i?= =?us-ascii?Q?AzxHwLAkO7TbV4hjKPi5GjjqUWC552E/yaWVXdE0xhMhtPpbSaoLySJspY0J?= =?us-ascii?Q?nCZZgxkfV7N0Yyojbdn+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g= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Aug 2017 14:55:24.7708 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR07MB2526 Subject: [dpdk-dev] [PATCH 03/26] event/octeontx: introduce specialized mbox message copy 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: Thu, 31 Aug 2017 14:55:28 -0000 Some of the internal toolchain versions create unaligned memory access fault when copying from 17-31B buffer using memcpy. Subsequent patches in this series will be using 17-31B mbox message. Since the mailbox message copy comes in slow path, changing memcpy to byte-per-byte copy to workaround the issue. Signed-off-by: Jerin Jacob Co-authored-by: Santosh Shukla --- drivers/event/octeontx/ssovf_mbox.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/event/octeontx/ssovf_mbox.c b/drivers/event/octeontx/ssovf_mbox.c index 764414b59..9ed417d1a 100644 --- a/drivers/event/octeontx/ssovf_mbox.c +++ b/drivers/event/octeontx/ssovf_mbox.c @@ -87,6 +87,16 @@ struct mbox_ram_hdr { }; }; + +static inline void +mbox_msgcpy(uint8_t *d, const uint8_t *s, uint16_t size) +{ + uint16_t i; + + for (i = 0; i < size; i++) + d[i] = s[i]; +} + static inline void mbox_send_request(struct mbox *m, struct octeontx_mbox_hdr *hdr, const void *txmsg, uint16_t txsize) @@ -106,7 +116,7 @@ mbox_send_request(struct mbox *m, struct octeontx_mbox_hdr *hdr, /* Copy msg body */ if (txmsg) - memcpy(ram_mbox_msg, txmsg, txsize); + mbox_msgcpy(ram_mbox_msg, txmsg, txsize); /* Prepare new hdr */ new_hdr.chan_state = MBOX_CHAN_STATE_REQ; @@ -166,7 +176,7 @@ mbox_wait_response(struct mbox *m, struct octeontx_mbox_hdr *hdr, len = RTE_MIN(rx_hdr.len, rxsize); if (rxmsg) - memcpy(rxmsg, ram_mbox_msg, len); + mbox_msgcpy(rxmsg, ram_mbox_msg, len); return len; -- 2.14.1