From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f47.google.com (mail-pa0-f47.google.com [209.85.220.47]) by dpdk.org (Postfix) with ESMTP id 004E5B368 for ; Tue, 9 Sep 2014 17:00:40 +0200 (CEST) Received: by mail-pa0-f47.google.com with SMTP id ey11so7250253pad.6 for ; Tue, 09 Sep 2014 08:05:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=Oxgo6U4lr4ts9KXgWHKNfdRuYexxFOnY288WoB+ragg=; b=lZhK+yYcyaJohUPOBwmFjRhVInoijJ83819TZHCJf1NAOfJQm5YWmRo5Fk/kJkFHGq m/lYXZc3QeZUtHZ4FewNGeSdwT6G+78Z1wZAmba92OLMZbv8r6F6aw8duaIQGLu7PNpE ARXdv8ZoScldLmOB3B96d6RLwhMhaEJRCvQzwWRnIQ89ypQCUquNYfIIdxEW5n8dE6M/ H+ef+5nkxGK2OAWajaPjvEs5uOUezmMCA1lM3kch6Y5bV+e1McYgF/0yw+FdN3uedCJu OcagtI5/a9kUK38el29Kxx5rvWUMN6xDg7wMpFUu2DYvBQt4QrY0N3VM/7ZN1OEwlYux GERQ== X-Gm-Message-State: ALoCoQlFUodWg+BK8gOH067vt77w8tTQLcNMXrnv6YV9HnRo76+ZlUTr6mmXkn33j0eeWLqT+b43 X-Received: by 10.70.131.70 with SMTP id ok6mr3017013pdb.133.1410275144759; Tue, 09 Sep 2014 08:05:44 -0700 (PDT) Received: from [172.20.12.149] ([12.232.194.107]) by mx.google.com with ESMTPSA id om6sm12026363pdb.89.2014.09.09.08.05.43 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 09 Sep 2014 08:05:44 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.0 \(1974.6\)) From: Jim Thompson In-Reply-To: <540D903E.1060206@6wind.com> Date: Tue, 9 Sep 2014 08:05:43 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <1409759378-10113-1-git-send-email-bruce.richardson@intel.com> <1409759378-10113-4-git-send-email-bruce.richardson@intel.com> <540D8228.809@6wind.com> <540D85E0.4030203@sts.kz> <540D903E.1060206@6wind.com> To: Olivier MATZ X-Mailer: Apple Mail (2.1974.6) Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH 03/13] mbuf: add packet_type field 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, 09 Sep 2014 15:00:41 -0000 > On Sep 8, 2014, at 4:17 AM, Olivier MATZ = wrote: >=20 > Hi Yerden, >=20 > On 09/08/2014 12:33 PM, Yerden Zhumabekov wrote: >> 08.09.2014 16:17, Olivier MATZ =D0=BF=D0=B8=D1=88=D0=B5=D1=82: >>>> --- a/lib/librte_mbuf/rte_mbuf.h >>>> +++ b/lib/librte_mbuf/rte_mbuf.h >>>> @@ -146,7 +146,7 @@ struct rte_mbuf { >>>> uint32_t reserved1; /**< Unused field. Required for padding = */ >>>>=20 >>>> /* remaining bytes are set on RX when pulling packet from = descriptor */ >>>> - uint16_t reserved2; /**< Unused field. Required for padding = */ >>>> + uint16_t packet_type; /**< Type of packet, e.g. protocols used = */ >>>> uint16_t data_len; /**< Amount of data in segment buffer. = */ >>>> uint32_t pkt_len; /**< Total pkt len: sum of all segments. = */ >>>> uint16_t l3_len:9; /**< L3 (IP) Header Length. */ >>>>=20 >>> This patch adds a new fields that nobody uses. So why should we add = it ? >>=20 >> I would use it :) >> It's useful to store the IP protocol number (UDP, TCP etc) and = version >> of IP (4, 6) and then relay packet to specific handler. >=20 > I'm not saying this field is useless. But even if it's useful > for some applications like yours, it does not mean that it should go = in > the generic mbuf structure. >=20 > Also, for a new field, we should define who is in charge of filling = it. > Is is the driver? Does it mean that all drivers have to be modified to > fill it? Or is it just a placeholder for applications? In this case, > shouldn't we use application-specific metadata? In the other direction > (TX), we would also need to define if this field must be filled by the > application before transmitting a mbuf to a driver. Funny, but these new fields (and extended mbuf) were prominent during = the dpdk summit. I think it=E2=80=99s going to be quite useful.