From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by dpdk.org (Postfix) with ESMTP id 841983B5 for ; Sat, 21 Jan 2017 16:09:01 +0100 (CET) Received: by mail-wm0-f65.google.com with SMTP id d140so14134769wmd.2 for ; Sat, 21 Jan 2017 07:09:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=Fh2tok6HgBjdRSH9NpkwToo9La1HhJTu3ex9lbFoPAc=; b=SVPU1KKaHZElt99BUXfGNDiCl9XPnnskLQCzJju37umV02Y02qQF0GXWXRxDkoLE93 UNSlQOrajsj/k7/YkhyR+lERZyxzzNaOflIjvcB57SIEjNnAm4PN6PudmtD5zS+Y/mha jJ8RoMzsanW5QLCJPXErsF3/3c74tQFfoYvub3OlFT8RNOzoEueexWM7PewEWPaVXt4R PYyAzaz0FDs3p9qW4V5EQtZXC7lRvsdWxoPpF4UcJrNoKHmV6Mb5JssjwpZCuFTRU2VO QyoEuah1qriCub1eSX76SEmGEkQ9c+C0pWtEBbhd5mvp/dLIzWYqKHvtZr5Ayy5l3A72 /nXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=Fh2tok6HgBjdRSH9NpkwToo9La1HhJTu3ex9lbFoPAc=; b=i2aWdXiADBCQlOvr2ANXlVBJOj5SB0kS6wvGjn5p5HWgDCW7AAjAhHbya9Bmx6+kbd EbXF0B2Lcus9HEQkV4nxCbGCQv0AnOIO32loQJrPFrlbbq/y3BoQJP3tymwHVwpHMM4F 3Fbzj0QuyjPqkOJ4nfZVqrApi1q+5k1qp3zU0PXvdARgUiP0X2Vq53hm+zrEVbVeeinU jwTYMsDBuOlW9HusBq1FIpH+O5B1U2cIv4NH2E69epQM+mpoyJIJbW0JcTxxDyUHfwHc pa2dMpl6iA9GBNVPwZN7liVtmZqyaYv8NTMDTQplwe9ZNFYyPj3QmBUnLMMhRMpdPnCJ IAeA== X-Gm-Message-State: AIkVDXJNuaNkJhx965tq85FaVTnx0Go4zNK3tgbGmHKgNoxEuG7IWTB2L6Vz03FWdBzqUg== X-Received: by 10.223.173.181 with SMTP id w50mr16318522wrc.177.1485011341089; Sat, 21 Jan 2017 07:09:01 -0800 (PST) Received: from [192.168.0.101] ([94.204.18.159]) by smtp.gmail.com with ESMTPSA id d14sm11328821wmd.19.2017.01.21.07.08.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 21 Jan 2017 07:09:00 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) From: Ilya Matveychikov In-Reply-To: Date: Sat, 21 Jan 2017 19:08:28 +0400 Cc: dev@dpdk.org Content-Transfer-Encoding: quoted-printable Message-Id: <37EFD294-2DEE-4140-9A74-423429B82B02@gmail.com> References: <7181C1FE-0FB9-4FB8-9A12-08AB4506880E@gmail.com> To: Ferruh Yigit X-Mailer: Apple Mail (2.3259) Subject: Re: [dpdk-dev] [PATCH] mbuf: remove redundant line in rte_pktmbuf_attach X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jan 2017 15:09:01 -0000 > On Jan 20, 2017, at 4:08 PM, Ferruh Yigit = wrote: >=20 > On 1/20/2017 12:19 AM, Ilya Matveychikov wrote: >> mi->next will be assigned to NULL few lines later, trivial patch >>=20 >> Signed-off-by: Ilya V. Matveychikov >> --- >> lib/librte_mbuf/rte_mbuf.h | 1 - >> 1 file changed, 1 deletion(-) >>=20 >> diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h >> index ead7c6e..5589d54 100644 >> --- a/lib/librte_mbuf/rte_mbuf.h >> +++ b/lib/librte_mbuf/rte_mbuf.h >> @@ -1139,7 +1139,6 @@ static inline void rte_pktmbuf_attach(struct = rte_mbuf *mi, struct rte_mbuf *m) >> mi->buf_addr =3D m->buf_addr; >> mi->buf_len =3D m->buf_len; >>=20 >> - mi->next =3D m->next; >=20 > Do you know why attaching mbuf is not supporting multi-segment? > Perhaps this can be documented in function comment, as one of the "not > supported" items. No, I don=E2=80=99t know. For my application I=E2=80=99ve found that = nb_segs with it=E2=80=99s limit in 256 segments is very annoying and = I=E2=80=99ve decided not to use DPDK functions that dealt with = nb_segs=E2=80=A6 But it is not about the rte_pktmbuf_attach() function = and the patch. > Also, should we check mi->next before overwriting, in case it is not = NULL? >=20 >> mi->data_off =3D m->data_off; >> mi->data_len =3D m->data_len; >> mi->port =3D m->port; >>=20 >=20 I don=E2=80=99t know. It depends of the usage. Will someone needs to = chain two chains of mbuf?=