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 B8DDFA0093; Thu, 17 Mar 2022 19:20:53 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 52C79407FF; Thu, 17 Mar 2022 19:20:53 +0100 (CET) Received: from mail-pj1-f41.google.com (mail-pj1-f41.google.com [209.85.216.41]) by mails.dpdk.org (Postfix) with ESMTP id 3B7E640040 for ; Thu, 17 Mar 2022 19:20:51 +0100 (CET) Received: by mail-pj1-f41.google.com with SMTP id bx5so5571275pjb.3 for ; Thu, 17 Mar 2022 11:20:51 -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=AnlkKSpAjk3bd2ZdrmQgXJXhqa+rhhb+ZWwi8TGs2X8=; b=cPDFL8sKtobxGBIP8fuaR1P3id+1/zsvegId9NwU19IszNaGd8RdQrMb6JeIKvESrW vTSZP3amecwGN9c5Kn2nMqD+mDdzuVevGiHdIRyLPYm5KITQEJyD12xPNm63HU7iT1lm 8hNhPiXR6k78aSZgg1fFSn33caDtimhqDvKbiS5f5aJ6nJcKovvCnm2auxKkd4mCjAN2 58RwKdgKcNhHacobDz/DACmpYur3r38OU7S00SBKvliWTrFDtGc08fes7KO4gYMVT7At Ls0CMpQD5pccg3NBiXFENQ2RrO0Em7WDpKrICBU4ybcEysfQnkIqA8r0AHlM3J8rAYWy r1xQ== 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=AnlkKSpAjk3bd2ZdrmQgXJXhqa+rhhb+ZWwi8TGs2X8=; b=gRIF3vWQjI2qr+joFfUp9WOXXLdt6bk5N2NwP6Hi9gb/0YA78EcZWZDnIGJ9TEtFZM 4hz5B9m9EOuVu03RmCNdVvGoMz0T8ju9CE+SEgAIG2ztaq/cOxIJ+iK0AFAF70MqMZ79 p7I5kf8ItoIuu01WWUGNuUlVK4bzMXogj0PbZcX6ZWm4MbIHe1w8LfSYxZCGfeZcL74D wEdNVu7htn/821dcmYP1yPxpI6xmt+Q7xmlFijEgQSXN2xWypGGynTFPYtQQPr7wTar9 bN4UuWPrxjSRgA2eXZQlEw9iasjx6Z35KeRKD9oAQ2MXNWlOA+NkyCXwFQgn2UqnqM3q Q7AQ== X-Gm-Message-State: AOAM531rTb10+Qn2uS7xjVjER5R1HpdtpyVDrm/yJ0YBvRWeG2I0bWal n/ljkRGKInwxBOixYifa19Sq7g== X-Google-Smtp-Source: ABdhPJzR4t2ynpDGVX7x/uKePnYISNPKEZ5zVfECqUO2jnBbnNkZ2reqTzonKy6ZlSescGLAQMXc0w== X-Received: by 2002:a17:90b:1d8b:b0:1bf:b979:bf27 with SMTP id pf11-20020a17090b1d8b00b001bfb979bf27mr17483696pjb.15.1647541250399; Thu, 17 Mar 2022 11:20:50 -0700 (PDT) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id l186-20020a633ec3000000b003820485172asm2395142pga.65.2022.03.17.11.20.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Mar 2022 11:20:49 -0700 (PDT) Date: Thu, 17 Mar 2022 11:20:47 -0700 From: Stephen Hemminger To: ido g Cc: Ferruh Yigit , dev@dpdk.org Subject: Re: [PATCH] net/pcap: support MTU set Message-ID: <20220317112047.2d8d4f8a@hermes.local> In-Reply-To: <20220317174347.110909-1-ido@cgstowernetworks.com> References: <20220317174347.110909-1-ido@cgstowernetworks.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 Thu, 17 Mar 2022 19:43:47 +0200 ido g wrote: > + if (unlikely(header.caplen > dev->data->mtu)) { > + pcap_q->rx_stat.err_pkts++; > + rte_pktmbuf_free(mbuf); > + break; > + } MTU should only be enforced on transmit. Other real network devices allow oversized packets. Since the pcap file is something user provides, if you don't want that then use something to filter the file.