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 72EE91B3E2 for ; Mon, 2 Apr 2018 20:50:42 +0200 (CEST) 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=kMwSxNEwrYyHBtg/p1Mvs7LzAFXPRzJSfR/4OfGJPBhHl1b8FGTFcGJOQ01Kz+HhszH46nl+y1KboRORpedDh3GQ0Vd9UJrSgjsDUfqdOQpaC6suwm2a6L8ABnNFion37x5LpnKkkISfI5ld6kDO8eUNMIIveLqQJhTMdfK2Rs8= Received: from mellanox.com (209.116.155.178) by AM5PR0501MB2036.eurprd05.prod.outlook.com (2603:10a6:203:1a::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.631.10; Mon, 2 Apr 2018 18:50:40 +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: Mon, 2 Apr 2018 11:50:08 -0700 Message-Id: <20180402185008.13073-7-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180402185008.13073-1-yskoh@mellanox.com> References: <20180310012532.15809-1-yskoh@mellanox.com> <20180402185008.13073-1-yskoh@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [209.116.155.178] X-ClientProxiedBy: DM3PR12CA0064.namprd12.prod.outlook.com (2603:10b6:0:56::32) To AM5PR0501MB2036.eurprd05.prod.outlook.com (2603:10a6:203:1a::22) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 11f2b31a-5259-4f04-63a8-08d598caa248 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:AM5PR0501MB2036; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0501MB2036; 3:/eq0yuc2x6Llwps/sTuFdLrNPPWDZYE4wlueM7UpAJGJyw9Trm5Tigdi1UU3qqNuvqZDHwPWtxcZdzUNgZw6KKDS0MHqhrYrU8+rAIzVNSSQkssRwT96DIgG6JCGmxIYKKfczzd2BlLKlVccKEQWMfbHzQ7yiDdUyUkxllHWXc660gqMzh3hCzxXrdoL29Ceo46atYNJF5OtAPb1VW//0XmuxyXQsJ45jeL+IvlDKT19ilpw1N1Nh9ltYwqg+ij1; 25:qikomrr8JqkWnp/IlZyPVJ5l8uDBSR5gItYt766snQUAbsf4mCcZ6qJXV3NNphRwCCC/Pjb7TkxsrhQgGsjo+TH91gaoSyW81fyRhxl+WDikf1h2iKYRWTnXZazzeWjHv3Pgde1hBqniucHptUJexbl3ocX7Atdf6tZQzcpCwWiRvWsPZ7MiKNcbi/IYmI5utYWhFPS2WJuvZjMWf3pQ4GJ/1aXq4O1mCs5963BnYo7tMb/r732zppEWmoHeSW+QbAqSQpIWClBKPUS8vuVnL5PBnPuxKmPzGBfmPiTh5FEA3WjltnRG2AD/zkldG0nK/hRpI3HXkxmKLtYX8JdgBA==; 31:zZn9Bj+DDz7gSscd4RDVz/nt470AsdTSrCRxGV5t2s3i1zZ7LJo00YIHz1C04kWKq28hUZek777XcZY8i4RYg5+lkmuZlg/7Yk0cZqaTYWS5rItB051VRpXB1ntt7VAWu08d+/Pob33L+lIVD+4HUPFnPDJW3iKZHpbRrrLKo1GjhrC9LQuLvAI2Z+vicYh/qjRKPQo8hSo4Rq0GnaNU+/8wXFKu0bvcuIfvrxdSN7w= X-MS-TrafficTypeDiagnostic: AM5PR0501MB2036: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; AM5PR0501MB2036; 20:9ovV88N7zUobGP/brqnnShOifPKQei8CLctsD4hbMF4dIA5YnDLy542bYbzRRlmoYBbhALiLt18hP5y3cfeEQXuKTnD9oE70weEXASXvhll7rNwrmBJU8Qfs5rApj5mZJsl5yEPjpKlg+mMHAiV+KpoULIOll/WWNhbwSc05EgpvLBvC8JwRWj8W90ltcvYw4cGLDZoCLbt5cboCbCQSc4RbJv+RKqI6NfyqRUHMC60xATCUhOHjWmvJnNksMZYMW4h63TvJUidjy/Yp+MsMLtXENN80/XzwoJzMqbVnODeX+y1vGVFBPJ5eZJm6eHmemo0K9u3mBNb1/z4x4/GCdwm9D/vhrOzkca19BKux59yQN+M4nPAHbEBNWcaLYCrQSbzh69UNtodyFBiybrpJm8lIh7L6/WQ5sxy/JHlaL3tBn5MjUaJrtanrDtGEyHSmgUYimUaeH2v4e7y4zM9y/E39zRJYlew66+88ZxhwNVJFl/SaeFdU8XrThJ9Aygqs; 4:a1v3SGWmUHb/bTH6k5Fy46/zX6PEaIJszcaaxcw7Cm/BR1zk41IQqWmOePzfwZanbzQkFuv0s5Jw1wnduF79ba7ZaRx/Fzkr95N6P0NgcRtk4sPdNnAnOlJAtwmSrhxy3tFGYYcjNpfMri2DbltT0/UdQwKuvydDKuGqiYSuEiYnf2CvHrfp949BIKLChpLbLHrr/mF1//n11e+BkhFHRuayG/NW1wKxiFIAj+VTqFnbU72GTkI6hYuw6owAqgHQrfHQdlgxAiZRf3hebqs3WQ== 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)(93006095)(93001095)(3231221)(944501327)(52105095)(3002001)(6055026)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123560045)(20161123558120)(6072148)(201708071742011); SRVR:AM5PR0501MB2036; BCL:0; PCL:0; RULEID:; SRVR:AM5PR0501MB2036; X-Forefront-PRVS: 0630013541 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39380400002)(39860400002)(366004)(396003)(346002)(376002)(189003)(199004)(25786009)(106356001)(7696005)(81166006)(956004)(5660300001)(76176011)(16526019)(26005)(8936002)(186003)(51416003)(478600001)(47776003)(69596002)(66066001)(50466002)(105586002)(476003)(5890100001)(316002)(486005)(446003)(6346003)(21086003)(81156014)(52116002)(8676002)(16586007)(86362001)(2616005)(50226002)(68736007)(386003)(11346002)(486005)(107886003)(3846002)(1076002)(2906002)(6116002)(55016002)(36756003)(7736002)(53936002)(4326008)(48376002)(97736004)(305945005)(6666003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM5PR0501MB2036; H:mellanox.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yskoh@mellanox.com; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM5PR0501MB2036; 23:B6Sesu3x7lnOBCpFnJihMnjKbXx6kmL3Q0F26uH?= =?us-ascii?Q?WYnpx/klepop2wwdn2hjxUaE5uhwC1Ks3w60aWNEXzFSdUC6uBYBFKi48qi0?= =?us-ascii?Q?YtqNS7XtWJqO/cUDE4pGmi5uC/hGuAuGlDJyLRB2dUx7hTkMmW45NlLzl6AZ?= =?us-ascii?Q?s1CO5H1580FFumfjClZoN19ldFs5mcXLWv31BImI58eFipz8Sn5eRqYXY/76?= =?us-ascii?Q?f3sPRKtCkvKnH2fCJlKZo+U5JRhCNp1WeVqL1MUzol0px+VPTriHFDvzN8Zy?= =?us-ascii?Q?9eftKbmcIkcb1g/FYOusG2NzviN+rnd7c7qWie2smh9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yRUSlitd+SPGd3CQdjFUGdtrYk2312s1o9pMly0uPBJt77NMer4V+k1yBci29tvigXpk27Q= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM5PR0501MB2036; 7:+FeRSDLUe9kAzI+pnka2SqUTK+lqY/65nLsFJy8JrmnAtJNUFM+I4vzbvBK6Iwry9kMDFcwg6OouNvjyEgXVudLdDRpdhVND9Uiuagpafoyt8bbYje4lbRElLYS3dPs47/3JqBTNUaj/lQc4plw2PSbMDKNcu9aOD6Y3/PeBz1Re8XTZiXT0E0eCNpzTMc0bBjd354KFRHuaCKDRbJV2t9lwtCkbRaKTeZdpbTr5Nd4JfBUzlb2zddwptqLhHvUJ X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Apr 2018 18:50:40.1519 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 11f2b31a-5259-4f04-63a8-08d598caa248 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0501MB2036 Subject: [dpdk-dev] [PATCH v2 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: Mon, 02 Apr 2018 18:50:42 -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