From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2 3/5] szedata2: add handling of scattered packets in TX Date: Mon, 26 Oct 2015 15:55:20 +0100 Message-ID: <1596710.yJjYHNzsGL@xps13> 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: Matej Vido 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) In-Reply-To: <1442565172-5338-4-git-send-email-matejvido@gmail.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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".