From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0071.outbound.protection.outlook.com [104.47.1.71]) by dpdk.org (Postfix) with ESMTP id 7DE487CDB for ; Thu, 26 Apr 2018 03:10:41 +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=V/QYZxjlVrooeVGY59b5TWLRAAQPunnRvB2STyjzArA=; b=bZLK/pgOpVisNv04+N9wUanrCLgRyY4L1jqUxDzzSFy/WVmqg13VO+EUTgUwuMikPYUfYXP06TTnESB5cNrknTER7ErjoaBvyvthxbxKAuujXeSg5VGqz3WHf4mJ+X0MJiy+gzRHBRnaZ5jYAishpFmPG6EGtBdx9wCUJLhXWCc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yskoh@mellanox.com; Received: from mellanox.com (209.116.155.178) by VI1PR0501MB2046.eurprd05.prod.outlook.com (2603:10a6:800:36::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.696.15; Thu, 26 Apr 2018 01:10:36 +0000 From: Yongseok Koh To: wenzhuo.lu@intel.com, jingjing.wu@intel.com, olivier.matz@6wind.com Cc: dev@dpdk.org, konstantin.ananyev@intel.com, arybchenko@solarflare.com, stephen@networkplumber.org, thomas@monjalon.net, adrien.mazarguil@6wind.com, nelio.laranjeiro@6wind.com, Yongseok Koh Date: Wed, 25 Apr 2018 18:10:10 -0700 Message-Id: <20180426011010.28078-2-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180426011010.28078-1-yskoh@mellanox.com> References: <20180310012532.15809-1-yskoh@mellanox.com> <20180426011010.28078-1-yskoh@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [209.116.155.178] X-ClientProxiedBy: CY4PR04CA0050.namprd04.prod.outlook.com (2603:10b6:910:4f::15) To VI1PR0501MB2046.eurprd05.prod.outlook.com (2603:10a6:800:36::20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:VI1PR0501MB2046; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0501MB2046; 3:w4CcMDVy7/BPFm7j/xvifyL6rl3ocjxLWe85uW1tMdqjTWQIq4rJcwB6Qyhp4JKT5I3JMdl3nf2kzcu8pCsYW/R7DEsZ5pjHVTY67PeE3iU9AjazKjR+klaygdU+5qkwaGRZwS5FYPcyzNKcu7SFW+DWbYCvGAcoYHfmOHD0XQOwBNGDimledtcPuUnQwoKpHcdjKQiwyalVhuE4/aClAeY+P43T5JyGm8f5nQVKrfT0SL4yriGB3jv+YRIEaCaV; 25:b0r4Oj5MxEgVGP/fQ9YVugiBThy/LkSyk5Na3mQr3kjY9o3/U4u7LvuQ0KUrERJl7JFoO0Sw8cgf8cxgVvmifhpKuVyQrnJmcroRnthuI9uGm2VeXF+LE0+XAOfVhH4/zjXEBhsnyPfBQELeGKyO7dr0SqPzhQOL6zfsafKqYh6Dr0BjZSC5R9QizqJrhkfEMPnCiNHVFtoQeg4hgQWdhU5NPV0lUO6qM2vlpa7WVrRLCZ0TEqBSwkhR++YTVOttkzIC3xEadW7ms0eZlpvAV7h1SmnkWJz9+985dJiW14pjSO15t6RaizalEgwCvk+Fch7622UNLELuE+RxK5FPUg==; 31:/OTqsBFgEgTimlx6l6keLJPRx5z2irnOHL/ztVyEup7crtyOHCxC5YUpl/L+Eh0sBmoUWONieTFVIhj1JrhHvw2FBsZc4SsZYSPEIdo93qbISMAX5n0ntcY3GaCC7rqYlK9ud7Kvaw+KXci7B6UlCPejfjTolaxxI0/YktoRum12qMaHRggsoIbWFoIsP6yrTfsT+ufewrC/xL91eLzepWdzaZasUhugnCvstaee9Fw= X-MS-TrafficTypeDiagnostic: VI1PR0501MB2046: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; VI1PR0501MB2046; 20:Vif01Rfv0L0Drbsuhw2upSKJMdGU5xvIXB/jo4UuPfXJEv+Y76hMrQYulJQymy85KPWKBrYpPMOFYvvWtLCKCanqbn7Yoo4IBAPzr/RWNfn19P7OasM9/pt+f2UXlaVow2RhaSbAIkeaPU4kvOTASOWX4qtMaLIByBRtK463s1zuK9iDJqEkf1Da2KM7v3EvgoOGs9KYjU7HwhHPZjCmK3Ocb/hMzPAFnKbNBalD+4ZozDtxluHgTPWy52bD48VFfI5ma14ekqCNZt1HrHMAv74QYXB6dGtUi1imRx7AfAvhLh8xcclJ7/e4Q27U4/gfErJutB90DMq0jrUnfNrhak1uoElDDQr8n2P/Dn1zFpWg2awecCdKJ0KzxEO5EY4wZXg0rO8/03jViUfZvCbTUoh1ihywBIAIjfvrfDw0UPGgUzXR0nGwqn29pcvHLBZOpBbzzZkC971EZ4raE0QqNuZ4LromWftckrW6YjMmVdmnIq+aFVi61S5fWomMiU5+; 4:azbDs671J3OW9+jHwJUNU3JyjLYZaWVLl+vWUB3wYlqCGwJnhvSrBSkpUQaa38D9f/bqLPuvvEDLtRaTpIkUSVBVQoIJDvmFddfKkfOIqYzrHBtNRaQ0CbU6HeSVuHD+5/KSKGUZXez3Oa9yZBEtHbaSw7iqa7yj3KO/unNpYurv5oHYMgQlOMsRQV5z0nQkrkC2CHlNXBYj+PFMHaZY6sAiVP8ocZjT7OnYvDeYzsD8tMXaWa5bTjkIiSRNaVJAcCgImq0i6qDfQtSBr+nEZw== 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)(3231232)(944501410)(52105095)(3002001)(93006095)(93001095)(6055026)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123560045)(20161123564045)(20161123558120)(6072148)(201708071742011); SRVR:VI1PR0501MB2046; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0501MB2046; X-Forefront-PRVS: 0654257CF5 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(39380400002)(366004)(396003)(39860400002)(376002)(189003)(199004)(47776003)(5890100001)(66066001)(107886003)(2616005)(21086003)(956004)(48376002)(476003)(97736004)(2906002)(11346002)(6666003)(446003)(26005)(186003)(51416003)(52116002)(386003)(50466002)(16526019)(76176011)(478600001)(55016002)(106356001)(7696005)(6116002)(8676002)(69596002)(4326008)(50226002)(3846002)(8936002)(1076002)(36756003)(16586007)(305945005)(486006)(105586002)(53936002)(68736007)(316002)(5660300001)(7416002)(575784001)(81156014)(25786009)(86362001)(7736002)(81166006); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0501MB2046; 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) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0501MB2046; 23:iWAsmpoArqwHwZghMrcksB5C/x+2Wgiw99Kl+Vi?= =?us-ascii?Q?3rEKauFCmIrU1mBG2d7PfcmjuCZUcTr7c3Evbym9t69iyLDWOxmC8+CLaGfX?= =?us-ascii?Q?qgXI5onKPnqeZDNQmirUk7YJ+IKcSGpRR2BegiwQM6zP8+8tDjvWqGe4z7j9?= =?us-ascii?Q?X4sn8FM7wt67KuZ1gjAPOTUfxyzJpYmhuM7c+3l8UOQiqE6Um0N4F+S2vCR/?= =?us-ascii?Q?dVmwN+pYVvDu19OklE0VPN1U6kx+C2Fd+IALnCGPkiJgb2uIAwEiBq7+SK6D?= =?us-ascii?Q?r9s3PBkDa56sxHdKfEvkrTDcDcgQEliRWRUK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VAlNa1XFTHhyBUaayTD4QlhLEmV60ljfZaV9ELFuq9+vHqIzpeccqU8G8T8oOJG/AFzPxMwzq89FkYB/Kk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR0501MB2046; 7:49kFzF182Up1/ek/Ch4HP4O2KXU7ufjVlOzRB77yiEwNoFoSGOkl+xVC5j2Ih3+JmjG6exJJbsXTKlFnWMW6Wu9jAjIA28UOu4E7xYB+7JBTbSIBJHrW0mBiJ4nLcCQ5r+9a6KlU1PRaMRGdQDCZrSDR31w0K/jdh98cxQ5ydArJf5DPn2KAjQeBkvLf1o1RE2X7hsnzoC39hV2MXMFySkDNgwGAa+SIaXzavIf0+5nmueeERQdsKE0wsggAbTj1 X-MS-Office365-Filtering-Correlation-Id: 80ecdb0a-6655-496e-4b48-08d5ab1285e7 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Apr 2018 01:10:36.4893 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 80ecdb0a-6655-496e-4b48-08d5ab1285e7 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0501MB2046 Subject: [dpdk-dev] [PATCH v6 2/2] app/testpmd: conserve offload flags of mbuf 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, 26 Apr 2018 01:10:41 -0000 This patch is to accommodate an experimental feature of mbuf - external buffer attachment. If mbuf is attached to an external buffer, its ol_flags will have EXT_ATTACHED_MBUF set. Without enabling/using the feature, everything remains same. If PMD delivers Rx packets with non-direct mbuf, ol_flags should not be overwritten. For mlx5 PMD, if Multi-Packet RQ is enabled, Rx packets could be carried with externally attached mbufs. Signed-off-by: Yongseok Koh --- app/test-pmd/csumonly.c | 3 +++ app/test-pmd/macfwd.c | 3 +++ app/test-pmd/macswap.c | 3 +++ 3 files changed, 9 insertions(+) diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c index 5f5ab64aa..bb0b675a8 100644 --- a/app/test-pmd/csumonly.c +++ b/app/test-pmd/csumonly.c @@ -770,6 +770,9 @@ pkt_burst_checksum_forward(struct fwd_stream *fs) m->l4_len = info.l4_len; m->tso_segsz = info.tso_segsz; } + if (!RTE_MBUF_DIRECT(m)) + tx_ol_flags |= m->ol_flags & + (IND_ATTACHED_MBUF | EXT_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..ba0021194 100644 --- a/app/test-pmd/macfwd.c +++ b/app/test-pmd/macfwd.c @@ -96,6 +96,9 @@ 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_DIRECT(mb)) + ol_flags |= mb->ol_flags & + (IND_ATTACHED_MBUF | EXT_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..b8d15f6ba 100644 --- a/app/test-pmd/macswap.c +++ b/app/test-pmd/macswap.c @@ -127,6 +127,9 @@ 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_DIRECT(mb)) + ol_flags |= mb->ol_flags & + (IND_ATTACHED_MBUF | EXT_ATTACHED_MBUF); mb->ol_flags = ol_flags; mb->l2_len = sizeof(struct ether_hdr); mb->l3_len = sizeof(struct ipv4_hdr); -- 2.11.0