From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f177.google.com (mail-wi0-f177.google.com [209.85.212.177]) by dpdk.org (Postfix) with ESMTP id D78A65A65 for ; Mon, 26 Oct 2015 15:56:29 +0100 (CET) Received: by wicfv8 with SMTP id fv8so120078597wic.0 for ; Mon, 26 Oct 2015 07:56:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind_com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:organization:user-agent :in-reply-to:references:mime-version:content-transfer-encoding :content-type; bh=MImHd+vT94YEpVfi8o/i3gczREj1Ew3Hf4OvsOFS4Tc=; b=ly4DT1fxMtxw003QO2RUomUWTUX+ehKADTNmBvFgBb0/Z+rhoneKIOuoYdNqfZ63cn DdHqpf3NerRYr2I5+d7FHQqoTVYArb8Uyb2y/lUUP115GJRWab2UxGHK5sXJmVEm8T79 j3TuGSDTZL5kTFpXUOl/C8NOaz+aaFm1p+FNEvuFBYx396iWm4cKSkbSv9FND4Mr5swJ hftPUOU1fNlEr/Mhk6S4zQggqGxLaFvzCjoIbrbaqttUC53kfBUZy0fpJTPhKAa5C4wt IvsWrf1TMZwGoC3JJ7bqyyst3XIxWLAk1K54+6DWaLjdLjMcVG+o3r3w+wts9Nq40N9m oktw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=MImHd+vT94YEpVfi8o/i3gczREj1Ew3Hf4OvsOFS4Tc=; b=QIrfggFDPrfB0PO5lJfWBcmTn6P+EqVb9biHpHj8UGItqyBRv7ZK0wSZUWp4RQq7Ys xT5WHYQrNnzwI3dXU6rn11axpm2gCv6AqUofBonWztwXEWS2otgqE7Ayx3C8tagrhDEZ oE00rI50sk49AgsVBdCrjSOca7+D+k9IiYkL+b6D0haoXAbPGNRSqaHw3b+mpYX/rwmm L9sMokIWupVpWH5OK9hsJqtlijtE1q0OUAzcRd90oIajREbb4JJ5q/C8MXTW3M5tFk6m hf/4NP0NQK6CkDw3y2xQxTz/oQACfmXW41QDEC1Re2/ILta/sXNwqmI5pBwbX/rtoIeJ Yijw== X-Gm-Message-State: ALoCoQklY+za8RwYHjDi3EtESmEQJ6PBIoaAqRqo5YUQVqw+s0B659lJ5gETxZW0T9KmIp1oAz9K X-Received: by 10.194.186.238 with SMTP id fn14mr23113482wjc.128.1445871389568; Mon, 26 Oct 2015 07:56:29 -0700 (PDT) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by smtp.gmail.com with ESMTPSA id at4sm9127975wjc.9.2015.10.26.07.56.28 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Oct 2015 07:56:28 -0700 (PDT) From: Thomas Monjalon To: Matej Vido Date: Mon, 26 Oct 2015 15:55:20 +0100 Message-ID: <1596710.yJjYHNzsGL@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <1442565172-5338-4-git-send-email-matejvido@gmail.com> References: <1434702301-4509-1-git-send-email-vido@cesnet.cz> <1442565172-5338-1-git-send-email-matejvido@gmail.com> <1442565172-5338-4-git-send-email-matejvido@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v2 3/5] szedata2: add handling of scattered packets in TX X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2015 14:56:30 -0000 Hi Matej, 2015-09-18 10:32, Matej Vido: > - rte_memcpy(tmp_dst, > - rte_pktmbuf_mtod(mbuf, const void *), > - pkt_len); > + if (likely(mbuf_segs == 1)) { > + /* > + * non-scattered packet, > + * transmit from one mbuf > + */ > + rte_memcpy(tmp_dst, > + rte_pktmbuf_mtod(mbuf, const void *), > + pkt_len); You could avoid this change by keeping "if (likely(mbuf_segs == 1))" in the first patch. By the way, it seems to be an abusive use of "likely".