From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43]) by dpdk.org (Postfix) with ESMTP id E80568DED for ; Tue, 10 Nov 2015 15:56:17 +0100 (CET) Received: by wmdw130 with SMTP id w130so74492581wmd.0 for ; Tue, 10 Nov 2015 06:56:17 -0800 (PST) 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=gu+/qdznt7ouZfcV/o3BJsV66MDgqJmy0SwtYpRsnaw=; b=wGTmkKqEIhxVGvnw5TlT7OZsbrhmnad9Unv//qg4WIboJt2dFYK93nYU21mzLpYdcO VAizdc3y9rZUCVLRzC5cTrQqZ1ur29PEPOt6do8quHl6YGivmViDMAaTVh4/UzIKDREw moEDIuENf2pfgQX7jZjRHJF5zPR99nkf0cvYs/kDd6kcd9WgzFhSG5/f7OrdOImhhijI ur2tL1IsQcUx2JLwkCU/OqrZWKqP4CQnf8B6k+7KAAlSe70AHoL4cXU7XjrFV4Ctp49D Y8RTTwMkXgltNLrO0wqDhATrC+PwMl7QK+yWNZm+96XDmF+7BiNQPKEiqHmojuD1bRAY YU9Q== 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=gu+/qdznt7ouZfcV/o3BJsV66MDgqJmy0SwtYpRsnaw=; b=jkj3LtjkldlJsjjE7h0POLZHDI9uS8a/MpsKZ322uNrpSryBJ20WpxuHOelJahLpfS vBRhGVkC+mQ0I30PUtXbPR9dMZk3cu+TyZoKaVN1Vete+OXtGpTk6CXv2e+kdIJTilJu 2Y0+95qmSF0AP95ad93LggaUh5MRliqNBbjfhLH+WHZQWuZG1icB/HtP5MbUS6ZXl5uE gU4Sf65IcT5koriBErN7Ug1LSsI0Z9jDBBS+XyCQVZCsB5XecxtZozXYxopkVfiHkMf/ VHD6RRvpX3sTxktZxpzQdDwnNEjmpNQRoEsu1uVXoOCkSIw0ppCinM7AGNgNY0gaxgEy N/Gw== X-Gm-Message-State: ALoCoQmX0yCkM2FdnHZjOsbU0G4ecsRgIBzCAmV9rc8e87ZAjSkF554PhgMNLuM67AfvxnyubIJL X-Received: by 10.194.87.39 with SMTP id u7mr4582910wjz.11.1447167377642; Tue, 10 Nov 2015 06:56:17 -0800 (PST) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by smtp.gmail.com with ESMTPSA id b1sm3938270wjx.12.2015.11.10.06.56.16 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Nov 2015 06:56:17 -0800 (PST) From: Thomas Monjalon To: Arseniy Zaostrovnykh Date: Tue, 10 Nov 2015 15:55:06 +0100 Message-ID: <2072134.jEP6IvT7ZX@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <5642034D.8070406@epfl.ch> References: <563CBFE3.5080804@epfl.ch> <563CC1D6.3030703@epfl.ch> <5642034D.8070406@epfl.ch> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org, users@dpdk.org Subject: Re: [dpdk-dev] [dpdk-users] Why packet_type is zero? 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: Tue, 10 Nov 2015 14:56:18 -0000 Thanks for reporting. 2015-11-10 15:46, Arseniy Zaostrovnykh: > Is the pcap driver obsolete? No > L3fwd example(http://dpdk.org/doc/guides/sample_app_ug/l3_forward.html) > check the mbuf field packet_type, and in the zero case (which is a > default value, as far as I know) it does nothing. At the same time, only > few drivers even mention this field: > > dpdk-2.1.0 $ grep packet_type drivers -Rl > drivers/net/enic/enic_main.c > drivers/net/e1000/igb_rxtx.c > drivers/net/ixgbe/ixgbe_rxtx.c > drivers/net/mlx4/mlx4.c > drivers/net/i40e/i40e_rxtx.c > drivers/net/mpipe/mpipe_tilegx.c > drivers/net/vmxnet3/vmxnet3_rxtx.c > drivers/net/fm10k/fm10k_rxtx.c > drivers/net/cxgbe/sge.c > > And a PCap driver (drivers/net/pcap/rte_eth_pcap.c) specifically, does > not alter the field, so L3fwd application drops all packets. The zero value is acceptable. #define RTE_PTYPE_UNKNOWN 0x00000000 Maybe a fix is required in the l3fwd example? Or maybe it should be explicit that it works with only few drivers. More generally, the packet type is not mandatory for drivers. At a time we were talking about implementing a generic callback to fill it. Or it can be filled in an application fallback with parsing.