From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0052.outbound.protection.outlook.com [104.47.1.52]) by dpdk.org (Postfix) with ESMTP id EE2E07ED0 for ; Fri, 27 Apr 2018 02:01: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=kqpFb55eRyrKAg6boZSluWQ9GbrDtpoYX1EgBBsmjfM=; b=uvuE+1fxLZXIaX3gnbFLPHk1C22toFWKkqYsqOHdTc3Oc1bfAuZwpGIyXk4sm3DDTH/LWpKdOQYyy+d3fGbI9cEaWRfG0w55hLxgjZomh+GLBJVsa5wDa91iLb+ccvhMKEk/Kvr+Kufiz5tWaGjJ0QmYIdDwPOa4/7hUMTsbM6Y= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yskoh@mellanox.com; Received: from mellanox.com (209.116.155.178) by HE1PR0501MB2042.eurprd05.prod.outlook.com (2603:10a6:3:35::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.696.15; Fri, 27 Apr 2018 00:01:38 +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: Thu, 26 Apr 2018 17:01:23 -0700 Message-Id: <20180427000123.31888-2-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180427000123.31888-1-yskoh@mellanox.com> References: <20180310012532.15809-1-yskoh@mellanox.com> <20180427000123.31888-1-yskoh@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [209.116.155.178] X-ClientProxiedBy: BN6PR1101CA0006.namprd11.prod.outlook.com (2603:10b6:405:4a::16) To HE1PR0501MB2042.eurprd05.prod.outlook.com (2603:10a6:3:35::20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(48565401081)(2017052603328)(7153060)(7193020); SRVR:HE1PR0501MB2042; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0501MB2042; 3:CKXIgd5KUvPV15clJO99JTR7h9E8egsZll9R21CKqpN+1QbEcEFPKS8TUmWt0ydGWMnvChXMeV7dJJpMDbENkPlalPveqLPZARoL7jEjTol4zDvXvdHq0D4sEqA+JBauUVbiFZEnCK27BXTRtUJFwoO4cgS5L6X1pu8oVhvkU8kF2xUQiIkMZMKROV2DzqBsktOPTV2jmkYlwfqBaT23nKPJoY7PgVSPyFxegp8c3vUUk+dUyskS6S+J7CO5aFOi; 25:d6tjGjWrncUmZxQfA1XFfDCtfPjt/7SPkXSEmI7PZo8FtUka4KrdY0YTFot3/504wxseP0lwjtj739yRxBDBkQUyNpWXunXpZlYgroyeE1stZTn3N9W4uxP+DZ/3MdUQoZydJxzdLlRTuIYbkI2FZV5zv8KprlCT+JJrb2CUYCPoMNR2fFyKb8vCm5zMFHFH98g5pAaXI6i5cqL53s/YUiJhIjmt5BC18lLSSbfvsRrsGcXZlQa4eMuzZRw44VJovTJ8pJMpWqm/r7Ez3eboXjxQC3PF+eYSDBNrBUbkdbuIekpvzXlPspi9LpVxPeAMvdzsnIy2ymVX8xRn5HNpig==; 31:ch4JICMuK6mJVdszYrA3QhR85u0FLEVGupliM5DPams5bZ84lqGl0bU9nB/fif5enn4AUI/1O2hHxE6izqOxjKxcJleFApXGh/P0s/DT3lA3Mi7qyXmqWB6ls8xU13b9Bcefm0mFH8W+Qn+yqUHEgqd6pPxlVU59LjIMd8WYj19bZxpT6Ba+kM75JWG/pMWhUNftEtZVzgoxH/5HE+gLBly3M7VWzrj930fQyu+7beM= X-MS-TrafficTypeDiagnostic: HE1PR0501MB2042: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; HE1PR0501MB2042; 20:iPqyCQgiMOS1W4mmlz4KWfQIjzY7EiT1rMN/mqkWRPEpHtZcHiddzKyhq3wiDIC41qXEcTpePuHt4pAS3usFDC7dkgMh1IlZi4TOxqkK4nQHAJjpac/nb46iVtLmBZiMyhKtnZMTry1qlo/h7xI1leii7N3jYiFdTbCpzaS8YRayJYIkSVSsEfnVJqfrhM+3waEFr2HvnPHHZjtZLsHl4VSb6c4q11juLS7ry3zpD0q+PKw2ykggNQJ9MyqlvA0Y4YVghaU3ccidk0x/fjLvFQLeTs2nX+wcCV+z4Nji9K16hIOeIFaDQqalNDxA8hTia8cyYMLhXacfQVICGkjzatiW8L+kM41ZCdmqaxr68KgXL2xVna43cuCzqXKjQGCE5iPOPQPgEtfmvoTn/dNhphmymZHbzCMxDLAJHsohfAfj/mS7Efv0Fl/J88KhIRvRHuA01cAIAj+8uK/6SoWPPtbvKJ2KWIHoDp603wXDEpzT6n+CRvhEvc1DR1RmdrSf; 4:JZMSMWEiaP/s2nR4ewiz8GnARBuGGdm5ZY39bJeOGMT20koemzxrZLbIo1FjAitFgKpLbiiurTlN+I/nSmcETJgnjCV2QNblt1FR5+/rrsPnaNx0cED15WrVyDbxJQOjny+Gq1k8cJ4G/BiC4ZPHQkLKYumG2cLvPmsRT8Bx+DRZa1Btggl9+7SK3/OBo+gmYFFiM+VxX2wMI7PxTXJYah5t0pp8tzO+sByEHOEYT9sxNY6woj91PaaxSxwcT/+m9UKNKUgdEoOhEbQxWE0RTg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(3231232)(944501410)(52105095)(10201501046)(93006095)(93001095)(6055026)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(6072148)(201708071742011); SRVR:HE1PR0501MB2042; BCL:0; PCL:0; RULEID:; SRVR:HE1PR0501MB2042; X-Forefront-PRVS: 0655F9F006 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39380400002)(366004)(39860400002)(396003)(376002)(346002)(189003)(199004)(186003)(478600001)(36756003)(25786009)(81166006)(5660300001)(305945005)(316002)(8676002)(106356001)(16586007)(86362001)(7416002)(7736002)(2616005)(105586002)(50466002)(55016002)(81156014)(1076002)(3846002)(4326008)(48376002)(53936002)(66066001)(6666003)(8936002)(486006)(446003)(2906002)(6116002)(76176011)(11346002)(956004)(5890100001)(386003)(26005)(50226002)(52116002)(47776003)(7696005)(16526019)(51416003)(21086003)(68736007)(97736004)(476003)(107886003)(69596002); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR0501MB2042; 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; HE1PR0501MB2042; 23:TrdJaW5PTVKFg5qUsd6k44nc8SfJHp6fnv3k0cu?= =?us-ascii?Q?aM9tcZt55vv6oflrjHrq9IU83UE1JOWZalPc8QHYN4pQfx3sm0KV2U+rXQgN?= =?us-ascii?Q?8bPmWEQzkb4v1CkgvHkYXEuDAl3ZtZ5jFuTxATD934KlkIf3BIsNLKLR/fu/?= =?us-ascii?Q?4mxockmaPnBLZKDuW40ayoalJdBhY6+zWY0oK9c5djapLom/Qk7nOo9CkSUs?= =?us-ascii?Q?fwh3FlSl2tIMTaL3aLKujVNrLLfg9NBHpnci+daa0IqrUzI89Fd9hlTf4gwG?= =?us-ascii?Q?ojktbroKTPmNEc1/34JdZiUC6/3+kLrVkCOKg3DcjkNS/TLNdFjfu44+CqWq?= =?us-ascii?Q?1j5lV0THR+sz0UgVGTez899NgmdzAufZM1ybXVwfa1UNhjGURkYKLB4KezQO?= =?us-ascii?Q?T7CYSV+krnCJZE01jywN66iX2UBjjBBruSwltx2xFxgUI875RXfh4Fa64p70?= =?us-ascii?Q?xmhQCgXRUFjxzfFPtJbe3sLb+keq3UOyrFAgpHF1j9ciHD6Vf7yrgOyJjWB7?= =?us-ascii?Q?LviK9bLtZMgoQNnluWaZvoF9coRErH2a7sj+pAbSVfHLNxBI/LXHEQv26bcd?= =?us-ascii?Q?Qb0dh8BQbGFCigBoa504vf5hM5oKWMkHTb0wmIP8eXTchni9OqmyyOyXtuFu?= =?us-ascii?Q?fzlDVJVEmXAZxfAiULJ2MOxcpmE5DbwnZTI+NMBoCwXSpjHyKb22UPU3b4/q?= =?us-ascii?Q?u4bBS2GbtKQWC14lW6IQWl63JE08QEu5vtOhMDL+ORkEmaml/OcsfakHpvyu?= =?us-ascii?Q?kmDndC52+I8thlIk6GMCL0VQ0f9Wcf3ToqbRyilEURU3CPALeWlm/J9OSBHJ?= =?us-ascii?Q?gFMm4U6ueasC19494YfAVkMHSYsl69C/iuPfULd39166n6vmWPp100Oj/k3l?= =?us-ascii?Q?NhD7w8XM4pFxj4IB9hN4lwxFa5RN1Ng1J1wNo/tARKp11PXxx5OW406xZl9x?= =?us-ascii?Q?0LQcL71y10328rEBfUWG9YGSmcaKQf6Youfki0cIw1/xom3okDZCvfOLGqsp?= =?us-ascii?Q?TxLwXMeOU0TVWvGbC0ZESmzFq3eWr3jaHHJ++/15eVzihMDc8ubOnlFDtP12?= =?us-ascii?Q?ankjyza4dsyO5Ww2C2ubI64Jb/L5lUl8deMHglTdpqZAhf2e0P1u4uWx48Wa?= =?us-ascii?Q?QbXlRoDOEQmLflTZpUj6Zx2YqbtYf4oFfyHOGBG+RDfjNDPawpZqUDACXKDj?= =?us-ascii?Q?6p9Hwt/FCqhB/2EEi+jIf/RA5t+1VACuTTXgB6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Ddo/lLVpXiNQ+YILBN2/w= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; HE1PR0501MB2042; 7:Zg6SMETfaHuVrQZObIxZquu5dau4bJK0JdVGs/s5xZUaOY/fhidWrdiBq+JXMnevVgmroR2HfeEL11g7YHvUFSPggHdZB1J5dSa9+covuK+xZ+ylljsmQQosBdHanL7U9YNcNsT3fAW2pXBVzcqlSBtZ0CeorcHJMh9cyvbAVhQ8XYiX+0xrOK2rtSm1KieldH0HO2fZFqswWCUDfC9pyR+mGe6sqARu4wXaHJqUV8TAL2mo7LpTubikYAIY047R X-MS-Office365-Filtering-Correlation-Id: fe422ac9-02d8-4a8a-8c5a-08d5abd20e65 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Apr 2018 00:01:38.6903 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fe422ac9-02d8-4a8a-8c5a-08d5abd20e65 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0501MB2042 Subject: [dpdk-dev] [PATCH v7 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: Fri, 27 Apr 2018 00:01:43 -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 53b98412a..4a82bbc92 100644 --- a/app/test-pmd/csumonly.c +++ b/app/test-pmd/csumonly.c @@ -851,6 +851,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