From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4E4ECA00C4; Mon, 25 Jul 2022 17:42:12 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DB476410FA; Mon, 25 Jul 2022 17:42:11 +0200 (CEST) Received: from mail-pj1-f51.google.com (mail-pj1-f51.google.com [209.85.216.51]) by mails.dpdk.org (Postfix) with ESMTP id 13EEF40684 for ; Mon, 25 Jul 2022 17:42:09 +0200 (CEST) Received: by mail-pj1-f51.google.com with SMTP id x24-20020a17090ab01800b001f21556cf48so14714619pjq.4 for ; Mon, 25 Jul 2022 08:42:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OORY6pAe4FVk1c8z3T2NQ1ruL578K8uBQ4HjBBrrzy4=; b=QFY04jlXvnzmiB83A7EzS1w/+O6S5uUehPD0zs4GQHf+pQQOW0wtrKV+cKFdtBlSkN ik4qJDM1hj/QbVCQsqHoSwMWN1UGui3UhRZlfOcAcBE6APW7K/H3q6WH3LyuVkyX4zZQ lXRL3Q1PQuUc96urdn6F9gCI2ycTIHl8NaEJLGleOLaESe1Fmfk/uPjeYLjiQG26hFBY 78dbhN32GhUK1X4JlkjcjPTs1n49/SfUIMm5C75UsUivkzIePZivJNewo9R0YUjUkKjq G5ZgmfvRPhK1bjiZqAzbtbRK7B268O6Ui4krQJf0MTiYkTwVB/Wyb4jn9z/MexVebjYF tYiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OORY6pAe4FVk1c8z3T2NQ1ruL578K8uBQ4HjBBrrzy4=; b=ypHRHwrTk9QzAryLid7uNAChdxgYI/ybXIvcGdXkOUzLiP5umJH1/KqBMLko8Y2COh LJSZH5QwH28hGrdMX+lAqaTN4CwDB2hYszZ7EcvbelJNKrYMPq5J31rzm+vytPCZQ+6s agiNT82m0R2kabzmR3axeebLqRRl9RBlutmZg9nJhPGN+N7eGhvxRDFT6xDp62r4pm7J AjzfBh6uTUbcaDY12xtmT3UEmT/naPF136xlfTXYjR5My5HVg4A4t+6+U0eWeFxTsGO9 0IxFsq+I/T/9PrRGw5N9xPuQDaaPvUwZtdKVeK4BOgD7VGVhtADHJ+E48VXUjCWVfrGX q8IA== X-Gm-Message-State: AJIora/IuLrMDdOhxBQLOUoAQJvAnVbO9v4FS+JjgAum2qtczGuFn+8G 0ZVcZ1+1+l26UrC89LbstuUI2A== X-Google-Smtp-Source: AGRyM1uHzjUgkUGt+MddfG9jbSNgmWEmw1/XrIBzPIofTm+/8SnM416//fg1KMKXyf/6JhWgRAsi7Q== X-Received: by 2002:a17:90a:4e05:b0:1ec:8de4:1dd5 with SMTP id n5-20020a17090a4e0500b001ec8de41dd5mr14798414pjh.242.1658763729118; Mon, 25 Jul 2022 08:42:09 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id in2-20020a17090b438200b001ec85441515sm9196256pjb.24.2022.07.25.08.42.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jul 2022 08:42:08 -0700 (PDT) Date: Mon, 25 Jul 2022 08:42:06 -0700 From: Stephen Hemminger To: Huichao Cai Cc: dev@dpdk.org, konstantin.v.ananyev@yandex.ru Subject: Re: [PATCH v6] ip_frag: add IPv4 fragment copy packet API Message-ID: <20220725084206.37cdbcac@hermes.local> In-Reply-To: <1658650203-7831-1-git-send-email-chcchc88@163.com> References: <1658638211-6661-1-git-send-email-chcchc88@163.com> <1658650203-7831-1-git-send-email-chcchc88@163.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Sun, 24 Jul 2022 16:10:03 +0800 Huichao Cai wrote: > + > + /* > + * Formal parameter checking. > + */ > + if (unlikely(pkt_in == NULL) || unlikely(pkts_out == NULL) || > + unlikely(nb_pkts_out == 0) || unlikely(pool_direct == NULL) || > + unlikely(mtu_size < RTE_ETHER_MIN_MTU)) > + return -EINVAL; > + > + in_hdr = rte_pktmbuf_mtod(pkt_in, struct rte_ipv4_hdr *); > + header_len = (in_hdr->version_ihl & RTE_IPV4_HDR_IHL_MASK) * > + RTE_IPV4_IHL_MULTIPLIER; > + > + /* Check IP header length */ > + if (unlikely(pkt_in->data_len < header_len) || > + unlikely(mtu_size < header_len)) > + return -EINVAL; > + My suspicions are all this input parameter checking probably costs more than any performance gain of having a non-segmented fast path.