From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0072.outbound.protection.outlook.com [104.47.1.72]) by dpdk.org (Postfix) with ESMTP id 30E617CF1 for ; Sat, 10 Mar 2018 02:26:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=E2hKDrfHdFxNnRdJ3v74XtBSm3suwpvrD9W6aCkQ7q4=; b=FQdC5a+q2iYHqXWTEtXOCjA1O1lycewK3iaeDtZy3HWTnqlM/+eF7Wkw4TC8Qj99OPAlT0ZdYJ2crYTCoHTRL+/N2AmxW3A0X3t0Mmy5JNXD2wgPZwCOYD++6VbSXxfWefMGtz5kfOcHQzIJJVeemwj3rKQhyi+FCoPpgwpMW7g= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yskoh@mellanox.com; Received: from mellanox.com (209.116.155.178) by VI1PR0501MB2045.eurprd05.prod.outlook.com (2603:10a6:800:36::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.548.13; Sat, 10 Mar 2018 01:25:59 +0000 From: Yongseok Koh To: wenzhuo.lu@intel.com, jingjing.wu@intel.com, adrien.mazarguil@6wind.com, nelio.laranjeiro@6wind.com, olivier.matz@6wind.com Cc: dev@dpdk.org, Yongseok Koh Date: Fri, 9 Mar 2018 17:25:32 -0800 Message-Id: <20180310012532.15809-7-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180310012532.15809-1-yskoh@mellanox.com> References: <20180310012532.15809-1-yskoh@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [209.116.155.178] X-ClientProxiedBy: CO2PR07CA0068.namprd07.prod.outlook.com (2603:10b6:100::36) To VI1PR0501MB2045.eurprd05.prod.outlook.com (2603:10a6:800:36::19) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: a1110776-18af-4724-4299-08d58625e227 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:VI1PR0501MB2045; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0501MB2045; 3:DGZBXqzDh7t7l4fZcXw4mw/vsN00S1bbZJmbqjk5xDf4LmD3IfYYv44A5eqeqBqml+Cq1G6iXL8i1qN9By0m7cs11gNCVMfng7kAWxDmNbbf79oWJQ8Tiq4y5t29Sthdoc7ypqqidsCWMGBoBsfCceebCCvzF0CaXT1W1sK56DlG1IbAW9QNK3FZMkzua3Nz9dJx+KNnaojaZcF28ySS9PjLsjfNWAPKsR8G9dKmHfJa/QO8X5D9nh8muH+Adt9C; 25:R/IAc+gYAuGjVJ/O7RwBB6sq0xyezy1RSyNB6XZdhv0BjZRsDAuaNFFmem3qoWV3Mb621ScnWV5VVmR2rsZnt8aOreLW3XKPc5W0IOJVkUpTQ1Ilr/doLVv/AaD4E579AfnD4lvDGnHpcus3STeVNybFmLjiOvnvjrlQ5vM9nNIshMXmowds3ybGMnYbVbuuBQCPNf2F8pqEguEjnY4nF3r0CkcrwFOFwexVjBKppROyzMhs4cMWxGeokypjY99JN8H2E/PGHDvoCQnM9NGDp3MvR7yeofqFW6fPPjHu+HjcmUsxleaBCa8cI/PRcfY6dfzduS68higv2DXRs9ETQA==; 31:omVM2u+gUHRqKV4v3sTe/aniIXSUqmNIRx0x8JCAIVQH1uMcyz5yL7oc0PSVRlWmQUHNXXI3LdVk2qqNF/aTF/+vatqLwBhrangUmGgWEo6gcaPjhtcuwF1vcUJlMzvR/dRyGtfeDNbJayHBPiOmAw1FziFKdLzfURlbZULyD0jIdsbJf7B1WWSmGRt2leoPoABPK1vjS7cVhp5OpC8AsLHNCI9dvpQNFxQOCPwPzj8= X-MS-TrafficTypeDiagnostic: VI1PR0501MB2045: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; VI1PR0501MB2045; 20:44S8JrLBVheL1xdobM1RoBBFMjiMnicsTuwa1RV+tPcDjdewYnQyXxRLBTWPzTupp18iwFovwssHUaXuiP2ptZA5o7bXc4+vDtnYhifk0d8u03rJE9Tn2u4BK21l9SW/MLt3d9D+FcP+GyqovpOsbadv42OfuybsimEuSsk9Mm9Mog3g0wm6OYgRp5OZvYehKmFIw/RWXxBOuA5MsP1rhUC4b9p4UtnRKaERmjKLKq72MblTw6M5gm8MqGT+8N7ksJdgrbpwq3G3KmtuUgUotDjsZYxbuVk39/miwvW0eZoNCpZQcBpwIWYs6pUSLNWsXp3O7i4DJpGAi+SUrX6abeqXsRl54hUX8qAt997jeOmo32CyZ4MY3/Y7Rc5sFKxxDA032Ba1uf8nKDzy0xyAoyHObjamTfDg/Y9glZpIqqmNrcTkmCmdZ5eZtrtUF5NwwnrXvuic6zU1Z+ZJopObU6mDhegA/EygkTRa8ALJSay13djPAWn/zUAihcGhRMzE; 4:vARKo0l5rx1nDiuxNc2WKYB39J7aoEtydoSJpsZydOdGLS74k3kr9/jjVIlbcimpmtdLf3QCQbNFKBPVeCCwUy3RDCFuKRtDGvuqO9dedY4cNp3qHzMxrzy320laOfym1UJqgxXI25CJgsee10Zw9vAa3ZnVRFjQrxrsA6jMzUU6SFyGXjo++po/Ok9AtId5FmHw6LR3WozdhPCT9okejdD8vk31IRpjRusjlsjwU1gilj/NbphvQnABtq/jLomE77dJLPieqyode1Kko5mw+g== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93001095)(3231220)(944501244)(52105095)(6055026)(6041310)(20161123564045)(20161123560045)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:VI1PR0501MB2045; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0501MB2045; X-Forefront-PRVS: 06070568C5 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39380400002)(346002)(396003)(376002)(366004)(39860400002)(189003)(199004)(7736002)(5660300001)(97736004)(7696005)(51416003)(36756003)(6666003)(478600001)(76176011)(107886003)(86362001)(8676002)(48376002)(55016002)(50466002)(52116002)(53936002)(4326008)(69596002)(25786009)(21086003)(105586002)(6116002)(3846002)(66066001)(386003)(2906002)(16586007)(186003)(50226002)(47776003)(68736007)(305945005)(5890100001)(8936002)(316002)(106356001)(26005)(1076002)(2950100002)(81156014)(16526019)(81166006); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0501MB2045; H:mellanox.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0501MB2045; 23:cld0FfnQzVICHpQa78VNef60WVq05nqLfJvmYok?= =?us-ascii?Q?Y3Xq2ztrgwV4r2Re5eJSghYH1yGmmU9ePSo0fqxt2cdqGzem/M9aLf6v9N2z?= =?us-ascii?Q?YhG8V3YFIIcJfG2YU7VfEtQt4NMeCkfko8dMRPCatE7jMcWc7+eIuUY+GTpe?= =?us-ascii?Q?6xjjoBZeC31KGadUrIGN47WhvV2QNuNeGltpM+IByfpf+1be2vQgOIpFKHSA?= =?us-ascii?Q?4A3Y2SdZ9UhGWTDYg2T5Wf7Vz23W6ypaDpWR1Ib1O6eUGsWkW8o4aZNfF5Ih?= =?us-ascii?Q?rvtCdktfjQIPyC3FKiNgjjtCkv9sPynH0xNaBp57AeZBNgluwFDY7aVC5VpS?= =?us-ascii?Q?e49ZS3dNN329qV8loSHc9Xd/sIq8N34YqYm3rWbCdxNjmyF+gcNhDeBhK8Oh?= =?us-ascii?Q?RsGD9DHRfNhocAst/ktlWsDdedJ/C2QhoYOnTZy/46ZMjcDWuBdDMAbJqv9q?= =?us-ascii?Q?Mr9mqrhvYAeUTkzQqj3tIN/EtJNBHruusNRryrqb1IUSPcvmZYdp7rbKOtW1?= =?us-ascii?Q?3U0UvrTaSBBzYWXZ5DQkdV+zVEDdQHSZnsmF4KVR6uNGbUww5xscrcz0FVds?= =?us-ascii?Q?e93JYMWpjzKz9qMLhdERNh+mFsUzE6HTC/9Ozq80JqlNcFEaBKc/9USdNMMQ?= =?us-ascii?Q?+Yltz5l9SjssGQx2ZRJ3jhv+ODI6BKttHoHg4t8q5AphtGBHqLGRn4C/LozE?= =?us-ascii?Q?jY3q1aApg7hC0m/hDqGq8S82mODY6niaAH1CUkgSqoJVN2YXnvf9nwY+6/S0?= =?us-ascii?Q?4+l31Qy6so2vh5fC955ov+0lKixM7aii3zz0/mFrCyhTHSUWrIFDOA7YPx47?= =?us-ascii?Q?hUJNY+xeV1mFXKpLV6LfyBANBWfJTTTUIkpHIwwr0g/tnwrLg+x8C3XihgUX?= =?us-ascii?Q?UglCUCzEAt/y1+w11F8Xw+6WqimoLuDfaPuNAs/xxk+kSqfhneQujYDte8aB?= =?us-ascii?Q?mzXQIulIi/cKZALaSioh9gmOrqq5b6xlX6Gz9TmNCWGR6PX5fprk9dtkk9ib?= =?us-ascii?Q?v+d/JR+iNN641Wpo6tPubNYyJJrPnMrG1DRDKcWlNmoxk83BCMKHAzeJFq8A?= =?us-ascii?Q?4Krin8XmRGYeNN14mf87ZsLruXY6I8z5NA5Yc1nJqssJDnzBza5+b5BL0sgv?= =?us-ascii?Q?XNAe8/u3G6H+CzezqNjWp32+rb1wsTbAHmsBCGRBmMr3qiNpTCm0L52NEu7u?= =?us-ascii?Q?aCYJkWw1v7GP/m+M=3D?= X-Microsoft-Antispam-Message-Info: N275pejpmqDi/cC9u62k3hNORCWW4kIqjrm8ABthX7bN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aGRrmtxkM56s3Wt6VhMrdpL1 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Mar 2018 01:25:59.2677 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a1110776-18af-4724-4299-08d58625e227 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0501MB2045 Subject: [dpdk-dev] [PATCH v1 6/6] app/testpmd: conserve mbuf indirection flag 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: Sat, 10 Mar 2018 01:26:02 -0000 If PMD delivers Rx packets with mbuf indirection, ol_flags should not be overwritten. For mlx5 PMD, if Multi-Packet RQ is enabled, Rx packets could be indirect mbufs. Signed-off-by: Yongseok Koh --- app/test-pmd/csumonly.c | 2 ++ app/test-pmd/macfwd.c | 2 ++ app/test-pmd/macswap.c | 2 ++ 3 files changed, 6 insertions(+) diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c index 5f5ab64aa..1dd4d7130 100644 --- a/app/test-pmd/csumonly.c +++ b/app/test-pmd/csumonly.c @@ -770,6 +770,8 @@ pkt_burst_checksum_forward(struct fwd_stream *fs) m->l4_len = info.l4_len; m->tso_segsz = info.tso_segsz; } + if (RTE_MBUF_INDIRECT(m)) + tx_ol_flags |= IND_ATTACHED_MBUF; m->ol_flags = tx_ol_flags; /* Do split & copy for the packet. */ diff --git a/app/test-pmd/macfwd.c b/app/test-pmd/macfwd.c index 2adce7019..7e096ee78 100644 --- a/app/test-pmd/macfwd.c +++ b/app/test-pmd/macfwd.c @@ -96,6 +96,8 @@ pkt_burst_mac_forward(struct fwd_stream *fs) ð_hdr->d_addr); ether_addr_copy(&ports[fs->tx_port].eth_addr, ð_hdr->s_addr); + if (RTE_MBUF_INDIRECT(mb)) + ol_flags |= IND_ATTACHED_MBUF; mb->ol_flags = ol_flags; mb->l2_len = sizeof(struct ether_hdr); mb->l3_len = sizeof(struct ipv4_hdr); diff --git a/app/test-pmd/macswap.c b/app/test-pmd/macswap.c index e2cc4812c..39f96c1e0 100644 --- a/app/test-pmd/macswap.c +++ b/app/test-pmd/macswap.c @@ -127,6 +127,8 @@ pkt_burst_mac_swap(struct fwd_stream *fs) ether_addr_copy(ð_hdr->s_addr, ð_hdr->d_addr); ether_addr_copy(&addr, ð_hdr->s_addr); + if (RTE_MBUF_INDIRECT(mb)) + ol_flags |= IND_ATTACHED_MBUF; mb->ol_flags = ol_flags; mb->l2_len = sizeof(struct ether_hdr); mb->l3_len = sizeof(struct ipv4_hdr); -- 2.11.0