From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0078.outbound.protection.outlook.com [104.47.1.78]) by dpdk.org (Postfix) with ESMTP id AD6BD2BF4 for ; Wed, 25 Apr 2018 04:54:00 +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=piEPUiY/taou5IDzfpcDvVLuXmUhVp+6VLwNA4Fa+u77UE6sDD08nDLZ/Kd3JAp9wnwOTOSUf8A9LdcPPESNNIP0hx5gI0kb+b2j/jv/J/WUfSDTuH3nbqIlwNzLhXpkPEbNsy4JygLfz8cXlrHHG40jSDnhRqZbrgqkALOdPaQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yskoh@mellanox.com; Received: from mellanox.com (209.116.155.178) by DB6PR0501MB2037.eurprd05.prod.outlook.com (2603:10a6:4:6::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.696.13; Wed, 25 Apr 2018 02:53:57 +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: Tue, 24 Apr 2018 19:53:41 -0700 Message-Id: <20180425025341.10590-2-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180425025341.10590-1-yskoh@mellanox.com> References: <20180310012532.15809-1-yskoh@mellanox.com> <20180425025341.10590-1-yskoh@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [209.116.155.178] X-ClientProxiedBy: BYAPR07CA0025.namprd07.prod.outlook.com (2603:10b6:a02:bc::38) To DB6PR0501MB2037.eurprd05.prod.outlook.com (2603:10a6:4:6::19) 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:DB6PR0501MB2037; X-Microsoft-Exchange-Diagnostics: 1; DB6PR0501MB2037; 3:hjSRSmzPwIyoEOoEDh2OZV37UTE7Y3SUAivCpNwzhIn++73Y5hA5tSGeUwv+RDQlHsSjGE2bqpLZRDQdUIfm3ciudydlCO5JFbCmlyn6g5kBfYjY17+5sP1vEjEM6eeHIK9vdEdt07uIN8ngb3Cn8ux9OZSS0iyPHWW/9LDABvl6kleZAdcx4nCk5GtGlIZJvBcb54hzFVcmCJnpAhW+uoODvetpybGULF8engpisxMWLLKaBO3ecDPXFvgywujP; 25:C2USoEXhMQbduYB1QPyJffKKtJLLZMoC7vwVg3Q/sB0Lh9056Cc88SLHun9xEeO3PvZ9xe5j1tzKouWhkY1ByZusNA6VkLD5PiUX1pkZDGp6AGhK3rACEnvV6EgTdIK8j856A4vqRIEIieLuXRbetmZqhJYeNGIw46d+fXUPBZo1jrWSJnPjafmVkawAxJeq2+MaPcBX3RTSdZieAdq2pi69hkFQJMYt8LDU0HlApgg4slJQbgYzFEk7t5mRqWMn+rKeS5KYyF8vNnVKUVTrmWDT/FrVPFZl1R66FgKTNY8QDgjyVW0MbijG8DWTLSKXJc1agm6stD46QC8DDFLzug==; 31:m15+KNrdizmByKzpJjSK+oA+SIeD+7lVfRaP17d6sunTXIMBvJqFxRkEJBH7p/4rK8Qg6/SKSbuoggRsCWJcW+KlSu5rajwvTaOjEAw90Ssd7MJz3BXSzxryzjPY2xPCboH4S7YJ7TWDu3d7AO+IMZ6TkxwCl1+YzvcQtf2ayRQOWe+EPmbafiIO5DtVsVnt4VS15nFbSbNgahWKSDlRM1EcDQA0Qq+pe+e/cj+Qms0= X-MS-TrafficTypeDiagnostic: DB6PR0501MB2037: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; DB6PR0501MB2037; 20:yllxyL3W2O4x1PApngZjY046+rSl4EMJmHL3NLxiGRt+sP1qKbVKVqGK4Y//iy15w/Si2+SpxpUVeSwTiCFa1UuAl4C1V2Znbp6DmJhLGLkgcnxgo8fjmPQwk1J9EfLueX3fUVpTAzcvdb2Sovrhv9A8acg7izcgCWt2Vm5zhNN8Bob4kfgJPAlPYgLVUpLM2ZbLw/F7J9NBDFsuBSRSvOZfartzBRjOqIhsXpznZACzsrv/1U/MPznr97E7VAbB2/Tbtz+Xmh8r8cf16TF5j4yu54Zb2vkCLeZ65iNCvGuE/7eno9eUDS/MFThLph7YJ6si3vu6rHqO6TSfqUkK27oQal1mXOko18Vkvxz3UioMQUkEPPSpe6MXNLVH7mJ57E5lyMqbe4VqhP5FY5pLyqvZHMn7IDwLi+8OD6PhuL8UjrQm3SgO5xpLTXa4SP8cJ81QMQ011c9xKjwSTEfC7Gi2E9olbiuLBzpCfDTtRS4aBDih8o7TuKmPDB+YH7j0; 4:fTj08H7KK7BBjJ5M5cAVxQjo8lZCL29rrXQDV9kXmC+iRbKAo1TPmGpma1vIicDNejrfr2kSgP3o8oZJ2u+WYsIs1eds6e2XmhOE+RJrqrTFOD2sDR9j2awBGFJbnLdyIOUOGaXvFQ89nkUwMC/D0RVZMt8uUEMcLh9t2gPr0aTVErtEpD1k9hqCpzO5EFDeOniGn+Zs8UH2lUJVwovpe/2J+Czfceq1DIZ5szKCa5gb/+zIRUZOPccVYW98Rqs40MtGLo6mXxhiGC3erCWRxQ== 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)(93006095)(93001095)(3231232)(944501410)(52105095)(3002001)(10201501046)(6055026)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123558120)(20161123562045)(6072148)(201708071742011); SRVR:DB6PR0501MB2037; BCL:0; PCL:0; RULEID:; SRVR:DB6PR0501MB2037; X-Forefront-PRVS: 06530126A4 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(376002)(346002)(366004)(39860400002)(39380400002)(189003)(199004)(36756003)(478600001)(107886003)(5660300001)(105586002)(21086003)(48376002)(486006)(4326008)(3846002)(6116002)(476003)(69596002)(2616005)(956004)(50466002)(16586007)(316002)(7736002)(305945005)(97736004)(47776003)(1076002)(53936002)(25786009)(446003)(11346002)(55016002)(8676002)(81156014)(386003)(81166006)(106356001)(6666003)(76176011)(52116002)(7696005)(51416003)(16526019)(26005)(7416002)(186003)(575784001)(86362001)(5890100001)(50226002)(66066001)(2906002)(68736007)(8936002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB6PR0501MB2037; 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; DB6PR0501MB2037; 23:4b90TQMbZxo0i27DHFpiUpMdz7nbRM/VAWNj0xT?= =?us-ascii?Q?4NV96Z4O7JEzrQ7NuCY6ZExNXcdrLBFajRyZDmMVpBawvQ+nUzoRsUVadqqc?= =?us-ascii?Q?iBAsFP1npdrC8cqOrBYUQbu2PMortjrRmCAEgP9bw2hX/360hhzgSlU4Mx23?= =?us-ascii?Q?AyhFW/o66G+czb7M2mpgUp3P9mci6Ol+mqJKMND64rDCB/o6sWBh8Eet1hpc?= =?us-ascii?Q?X+J+BUC8GjfJf5BDDSOm/V637sQHJRZnwRVeeV4S3N8FfuQMJk6yfHFC6N9n?= =?us-ascii?Q?nM9BzSJ8lrgPWzD+qe7VDPE5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xNTjZrNLywNYrkcyZjDPf8JSrIOBO4q2sMt9aUNTDEok0375SgbEXwtw8VBG1OkbnEdwQ0L6/1vM0jTKpM2UDHoNMU= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DB6PR0501MB2037; 7:66oSV27Q1fsaYH/SsHha5K5d4MKU1CYe+tF53y4Gt5LqrLVcohupdlexrQa+OgXbNvkHl5H0FzTVjtgys7kL52bQFPG2XFBIFsCELWg3ibTyH+pUebZl8FCeU8vKdIQN9NYlzrZH0CnAC5SKZnY3LH3ltIjHLYAv8JSwaJ9cz2p/PfYPInFf0pzRfnCiYy7VtQiLUT1CK4hcMFJQ0lmFxr/hwI49SXZfItIp1cryuApm38qbtGvYp2cl0080C5CE X-MS-Office365-Filtering-Correlation-Id: 2cb1616e-0008-40da-fe79-08d5aa57cb7d X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Apr 2018 02:53:57.7107 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2cb1616e-0008-40da-fe79-08d5aa57cb7d X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0501MB2037 Subject: [dpdk-dev] [PATCH v5 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: Wed, 25 Apr 2018 02:54:01 -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