From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1on0054.outbound.protection.outlook.com [157.56.110.54]) by dpdk.org (Postfix) with ESMTP id 428DB558F for ; Wed, 16 Mar 2016 07:23:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-caviumnetworks-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=KxM1sgrhB4uVg97vi8n9iO818TaoFhtG4s/BErKDdSA=; b=zLBtUkq9pAePS/cE3VgbfqD5zKHMGohIIUe71pZFrz+LUpCJND0vAhjOvKoGLhspPHUGUejQhq8paAPHwG8gIOC/Qepgwf9gDzWkOxLnbkfJaz+Yr3iCj1ze319WEP7c2J2cu641pgrYKmJ/3/2VFWLbj580idk+0jmh8bS6JKU= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=caviumnetworks.com; Received: from localhost.localdomain (87.239.222.107) by SN2PR0701MB1038.namprd07.prod.outlook.com (10.160.58.145) with Microsoft SMTP Server (TLS) id 15.1.427.16; Wed, 16 Mar 2016 06:23:51 +0000 From: Maciej Czekaj To: CC: , Date: Wed, 16 Mar 2016 07:23:24 +0100 Message-ID: <1458109404-27626-1-git-send-email-Maciej.Czekaj@caviumnetworks.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1458084216-20942-1-git-send-email-Maciej.Czekaj@caviumnetworks.com> References: <1458084216-20942-1-git-send-email-Maciej.Czekaj@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [87.239.222.107] X-ClientProxiedBy: DB5PR02CA0005.eurprd02.prod.outlook.com (25.161.237.15) To SN2PR0701MB1038.namprd07.prod.outlook.com (25.160.58.145) X-MS-Office365-Filtering-Correlation-Id: 32ad8a2c-0b20-4e39-a7a5-08d34d638b59 X-Microsoft-Exchange-Diagnostics: 1; SN2PR0701MB1038; 2:C8Nm/fniurAxAIUdOs0qbmwV1KXj7kU6/bcHpqa2thUugHfgh8nuOgBPzPp/OLo+cs+kWSKFbN72bsk8UoJBKXTV8WANa7hAOSTfL0JtBE55klp/Rzb1zpRV8iApaxBHibFW37iyZkLIphHARuzwPANp77BnML8yNDwPXaEo4xuNA5JC4alRyJmn1AOjnqmK; 3:oChWrioXWb3icdJRxttPImfydyfswrI7D9AwwRX/5Sbi2sVK1BSe3pjnetDxrYZdJjD/+w55IO0VovvEP/aikrZTiPFUhBNF90lnbMSpqwqar8QVAkZSl99woD5R9r0Z; 25:iUMgYZALa25Lp8KPUQ0FRQcIAtKbHuJGohf8W1nixXdzCHan/HstcTgeowykA95voS7wjJ+RDIk7eLIJDjbr162xPLz+ytvQM7cw0WSs4J7aGxZJEZ5/1RserFa6BP3vGMtRz0F00MkbsoMKjtDrie08ghBLOBvsEflAt4Yyv6DaCt/Yf1SRLFi3RjL+Yhhsye5wTYfo3jH3BdFB2GcMiedpExT0uVYrf+rcLncyYvPwq2snmIFj1Ws0cNpKGFyWvuH2hUuFz3F3rPIJWW3UwxO+toXRzA+KsxmO9i428flhJlnvQdixAAfxuhO6vAT2tzGQt8jN9tXhpQBXU+nvSQ== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SN2PR0701MB1038; X-Microsoft-Exchange-Diagnostics: 1; SN2PR0701MB1038; 20:WQUqelHST1t45TqEhl+jY9EP7Y+28SXvppmgfMbRCV6iKQ0SfePNEvaD4hqr52SZez6MKmelzmvoWeOV10IQWa9U2VNP2EmoHZJpnr35rxF1nnDBmqRd2QkF6lBBzPQ5gxlxqycT64nONBmc7BlBIlcKRnRqZ/Y3N4KQYALvoFqYD/1yPTyJH6CEvkcVkCJntTndhgKQBZfwdJ+dcTgJpWmUDOl3e5+iHwAv15kDJF11TbfMHxv+/CSuWjPvItfeOzgLw8waSe6vX06AxLZJhuOo5vdKJmwVMvwdcGELOP26xQx6LqEGlFlQ7QcYKArMpZv30oSRm3AC940H2aZ5Ccj783iz36PKf9xm8dTxuwvZjMSgHGrLaq87DH9VVskPfSVGU7EmlkKLCRFpGTnuILHThv4OJxOTgZEdeUtsPVh/mYDApyzmaZSRVOwVl6L1BR3493wOEZyX1tkCtomm2VLNz6o8vkylJ+vwtgHsaqREJ9n7Vs/H3t4TxXJVCj5mEyuRsXBe0UNvTiwIMkuE2BpJIOLR/UU9rDepWkq2qGb5RY5VhGbB7X0g4FRFf5KduMPv+/kEflaQzw38ls/6yfZSD6vjilU8bSKbIlLWsss= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046); SRVR:SN2PR0701MB1038; BCL:0; PCL:0; RULEID:; SRVR:SN2PR0701MB1038; X-Microsoft-Exchange-Diagnostics: 1; SN2PR0701MB1038; 4:/amhKEcSe9L7TCk6da2T0IJ0K6xnBUlEGaNx5oXDHvgU9TBz8Cxu63LY0KUyetc2yZ9iHtITDxcCnmCoaKOX0FEUzr38nChWzmcddXBdNbY1UOwBEVkYQWrsqCdmpR3dbVblLRoCsiseOY/EuI2fpVzIfCB1kEwrN9JPz2Xr7p/qTzPZFbWz+r9vg8klZHzlDmKvECDGCubzXuoC0LWn/38xQlYAbXxcmTTLuUbGgnz6mwOUTrRa1Jv6OToOHh5GEMFACuFwzVpJMOTQZbWKdXY8QCmpSkKW4MGREeoaVt8xoPikGx63ro9X/JdBEeMDC4eeEACNZQD3jvrW39tO1aHdzfX0EADI7JD4Fehx82tSr5kobeAi6nczoxl+mFrh X-Forefront-PRVS: 08831F51DC X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(81166005)(5004730100002)(50226001)(66066001)(36756003)(1096002)(2906002)(229853001)(19580395003)(19580405001)(4326007)(92566002)(47776003)(2351001)(586003)(3846002)(6116002)(2950100001)(5003940100001)(77096005)(48376002)(5008740100001)(50466002)(86362001)(189998001)(110136002)(42186005)(50986999)(76176999)(32563001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR0701MB1038; H:localhost.localdomain; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; SN2PR0701MB1038; 23://lTmK4a8YbsXibVte6lIQJF6YgsrXXCtWLsey/1dS1lLsSXG9lm9jfGcpFC9myiCJAapiktJfywuF0FExdaFcyQrc7Jl8YWVk9ULf/akSt7jfdPW5qUjdZXoDGXmYLHU8kwLCvC0/SESMyaBkPaareNLf7UJ5aKhLF50FCzezGVdKTTyESrmbUvy875jivOAaryPA3//GpQ3TVvdueF8fGi1djL8CZyfVhY4UclbEW6VJz/NZThhrxCphkLMKjXWUpNJnU7uSNV8YKWJ+zq5VqtrYDTtNmAvIqd4CN5FQ1AHuZnPwFVfWTbWKljSjga7SAayCm2pM4Y1heYKcMQr5an33hu2+pE0J6/xCtlqlRDTGTVf6BnCT6/r44a9Og4/j+F3TwSkp48xyuWtsJuKE8yr4Jeoeg9u4dC6jJj3Ty+Afk4cpJVLowlxClxE/KDYQFIdGLqdhvCK6MIjqaf+X6XDaXgpmnXrCptNEIoaUrHXDV1ZZXAvnPFSdQFAxt+VGSfuBuovmjiYjzfigLsSx4qFvYQoaoAbjvaEbfeD4GG+LcBU+/1BMWt/hoZpfdZVJXK8IZqk45zGaJ9qS6x134BtpYpHEWKnEh3w72TYQcxEC1FE99A0pyJwxixNZT+qFTy8P2ThyMwjJQWT/BcU3S0BKW01XmBBLZStqxcaIjV2HGNVHC9u2WjsmRQHr/tA6/dtc/zEpRo4xq+RcGixhMeV8r2WqSL5N9lcGLolMYU99xoaPFo+VHupkEraRoZwNexx9URExSQ7Ihuc1taJWMT846poOUfy8qbLV3GKySSKxxIYdCEEyU4pfOVdKqMT5oHCqwnnymfLNO87tKzqIkVyFvHfcYGrJJLcPLStft+QdtC0OUO6BjWySwDvlAO X-Microsoft-Exchange-Diagnostics: 1; SN2PR0701MB1038; 5:VF4bOtbxS73ylmrNch4dQpizghXaug0hsnhT1ZwDASUBhDwO6+2wjP9LNYf8PZkp2zFtToa+8UQnIAcwcOZ15FXRPHUeQDYEQ2fW1WRGCd7OQdNuUzaJtkLzzC4d6c1EV+s1ojTusXS3RbkTpKXEAw==; 24:uNeX+wR2eDjoHCXnEgFB6eyUB+TjLIYJ+xBLAP6E7jLu6Oebrxs+pew0rIc42azwbmmMPcSNVbebY+y0I5CygPHk6A86Li5u+jBUQCfWCHc= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Mar 2016 06:23:51.0006 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR0701MB1038 Subject: [dpdk-dev] [PATCH v2] l3fwd: Fix compilation with HASH_MULTI_LOOKUP 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: Wed, 16 Mar 2016 06:23:54 -0000 l3fwd does not compile with HASH_MULTI_LOOKUP. 2 issues: * in 64d395 mask0 changed type from xmm_t to rte_xmm_t -> use x field from rte_xmm_t * in dc81eb dst_port parameter changed to uint32_t -> change uint16_t dst_port to uin32_t dsp_port Signed-off-by: Maciej Czekaj --- examples/l3fwd/l3fwd_em_hlm_sse.h | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/examples/l3fwd/l3fwd_em_hlm_sse.h b/examples/l3fwd/l3fwd_em_hlm_sse.h index d3388da..891ae2e 100644 --- a/examples/l3fwd/l3fwd_em_hlm_sse.h +++ b/examples/l3fwd/l3fwd_em_hlm_sse.h @@ -46,7 +46,7 @@ static inline void em_get_dst_port_ipv4x8(struct lcore_conf *qconf, struct rte_mbuf *m[8], - uint8_t portid, uint16_t dst_port[8]) + uint8_t portid, uint32_t dst_port[8]) { int32_t ret[8]; union ipv4_5tuple_host key[8]; @@ -77,14 +77,14 @@ em_get_dst_port_ipv4x8(struct lcore_conf *qconf, struct rte_mbuf *m[8], sizeof(struct ether_hdr) + offsetof(struct ipv4_hdr, time_to_live))); - key[0].xmm = _mm_and_si128(data[0], mask0); - key[1].xmm = _mm_and_si128(data[1], mask0); - key[2].xmm = _mm_and_si128(data[2], mask0); - key[3].xmm = _mm_and_si128(data[3], mask0); - key[4].xmm = _mm_and_si128(data[4], mask0); - key[5].xmm = _mm_and_si128(data[5], mask0); - key[6].xmm = _mm_and_si128(data[6], mask0); - key[7].xmm = _mm_and_si128(data[7], mask0); + key[0].xmm = _mm_and_si128(data[0], mask0.x); + key[1].xmm = _mm_and_si128(data[1], mask0.x); + key[2].xmm = _mm_and_si128(data[2], mask0.x); + key[3].xmm = _mm_and_si128(data[3], mask0.x); + key[4].xmm = _mm_and_si128(data[4], mask0.x); + key[5].xmm = _mm_and_si128(data[5], mask0.x); + key[6].xmm = _mm_and_si128(data[6], mask0.x); + key[7].xmm = _mm_and_si128(data[7], mask0.x); const void *key_array[8] = {&key[0], &key[1], &key[2], &key[3], &key[4], &key[5], &key[6], &key[7]}; @@ -170,19 +170,19 @@ get_ipv6_5tuple(struct rte_mbuf *m0, __m128i mask0, static inline void em_get_dst_port_ipv6x8(struct lcore_conf *qconf, struct rte_mbuf *m[8], - uint8_t portid, uint16_t dst_port[8]) + uint8_t portid, uint32_t dst_port[8]) { int32_t ret[8]; union ipv6_5tuple_host key[8]; - get_ipv6_5tuple(m[0], mask1, mask2, &key[0]); - get_ipv6_5tuple(m[1], mask1, mask2, &key[1]); - get_ipv6_5tuple(m[2], mask1, mask2, &key[2]); - get_ipv6_5tuple(m[3], mask1, mask2, &key[3]); - get_ipv6_5tuple(m[4], mask1, mask2, &key[4]); - get_ipv6_5tuple(m[5], mask1, mask2, &key[5]); - get_ipv6_5tuple(m[6], mask1, mask2, &key[6]); - get_ipv6_5tuple(m[7], mask1, mask2, &key[7]); + get_ipv6_5tuple(m[0], mask1.x, mask2.x, &key[0]); + get_ipv6_5tuple(m[1], mask1.x, mask2.x, &key[1]); + get_ipv6_5tuple(m[2], mask1.x, mask2.x, &key[2]); + get_ipv6_5tuple(m[3], mask1.x, mask2.x, &key[3]); + get_ipv6_5tuple(m[4], mask1.x, mask2.x, &key[4]); + get_ipv6_5tuple(m[5], mask1.x, mask2.x, &key[5]); + get_ipv6_5tuple(m[6], mask1.x, mask2.x, &key[6]); + get_ipv6_5tuple(m[7], mask1.x, mask2.x, &key[7]); const void *key_array[8] = {&key[0], &key[1], &key[2], &key[3], &key[4], &key[5], &key[6], &key[7]}; @@ -292,7 +292,7 @@ l3fwd_em_send_packets(int nb_rx, struct rte_mbuf **pkts_burst, uint8_t portid, struct lcore_conf *qconf) { int32_t j; - uint16_t dst_port[MAX_PKT_BURST]; + uint32_t dst_port[MAX_PKT_BURST]; /* * Send nb_rx - nb_rx%8 packets -- 1.9.1