List patch comments

GET /api/patches/141/comments/?format=api
HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Link: 
<http://patches.dpdk.org/api/patches/141/comments/?format=api&page=1>; rel="first",
<http://patches.dpdk.org/api/patches/141/comments/?format=api&page=1>; rel="last"
Vary: Accept
[ { "id": 350, "web_url": "http://patches.dpdk.org/comment/350/", "msgid": "<53E9D689.8010901@6wind.com>", "list_archive_url": "https://inbox.dpdk.org/dev/53E9D689.8010901@6wind.com", "date": "2014-08-12T08:55:37", "subject": "Re: [dpdk-dev] [RFC PATCH 04/14] mbuf: replace data pointer by an\n\toffset", "submitter": { "id": 8, "url": "http://patches.dpdk.org/api/people/8/?format=api", "name": "Olivier Matz", "email": "olivier.matz@6wind.com" }, "content": "Hi Bruce,\n\nOn 08/11/2014 10:44 PM, Bruce Richardson wrote:\n> From: Olivier Matz <olivier.matz@6wind.com>\n>\n> Original patch:\n> The mbuf structure already contains a pointer to the beginning of the\n> buffer (m->buf_addr). It is not needed to use 8 bytes again to store\n> another pointer to the beginning of the data.\n>\n> Using a 16 bits unsigned integer is enough as we know that a mbuf is\n> never longer than 64KB. We gain 6 bytes in the structure thanks to\n> this modification.\n>\n> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>\n>\n> This version:\n> * Updated original patch to apply to latest on mainline.\n> * Disabled vector PMD in config as it relies heavily on the mbuf layout\n>\n> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>\n\nRemaining references shown by:\n\ngit grep \n\"\\(pkt->data[^_]\\)\\|\\(mb->data[^_]\\)\\|\\(m->data[^_]\\)\\|\\(mbuf->data[^_]\\)\"\n\nIn:\napp/test-pmd/ieee1588fwd.c\nexamples/vhost_xen/main.c\nlib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c\nlib/librte_pmd_pcap/rte_eth_pcap.c\nlib/librte_pmd_xenvirt/rte_eth_xenvirt.c\n\n> --- a/lib/librte_mbuf/rte_mbuf.h\n> +++ b/lib/librte_mbuf/rte_mbuf.h\n> @@ -140,6 +140,13 @@ struct rte_mbuf {\n> \tvoid *buf_addr; /**< Virtual address of segment buffer. */\n> \tphys_addr_t buf_physaddr; /**< Physical address of segment buffer. */\n> \tuint16_t buf_len; /**< Length of segment buffer. */\n> +\n> +\t/* valid for any segment */\n> +\tstruct rte_mbuf *next; /**< Next segment of scattered packet. */\n> +\tuint16_t data_off;\n> +\tuint16_t data_len; /**< Amount of data in segment buffer. */\n> +\tuint32_t pkt_len; /**< Total pkt len: sum of all segments. */\n> +\n> #ifdef RTE_MBUF_REFCNT\n> \t/**\n> \t * 16-bit Reference counter.\n> @@ -156,18 +163,12 @@ struct rte_mbuf {\n> #else\n> \tuint16_t refcnt_reserved; /**< Do not use this field */\n> #endif\n> -\tuint16_t reserved; /**< Unused field. Required for padding. */\n> -\tuint16_t ol_flags; /**< Offload features. */\n> -\n> -\t/* valid for any segment */\n> -\tstruct rte_mbuf *next; /**< Next segment of scattered packet. */\n> -\tvoid* data; /**< Start address of data in segment buffer. */\n> -\tuint16_t data_len; /**< Amount of data in segment buffer. */\n>\n> \t/* these fields are valid for first segment only */\n> \tuint8_t nb_segs; /**< Number of segments. */\n> \tuint8_t in_port; /**< Input port. */\n> -\tuint32_t pkt_len; /**< Total pkt len: sum of all segment data_len. */\n> +\tuint16_t ol_flags; /**< Offload features. */\n> +\tuint16_t reserved; /**< Unused field. Required for padding. */\n\nI think we should try to keep comments aligned if possible.\n\n>\n> \t/* offload features, valid for first segment only */\n> \tunion rte_vlan_macip vlan_macip;\n> @@ -185,7 +186,7 @@ struct rte_mbuf {\n> \t\tuint16_t metadata16[0];\n> \t\tuint32_t metadata32[0];\n> \t\tuint64_t metadata64[0];\n> -\t};\n> +\t} __rte_cache_aligned;\n> } __rte_cache_aligned;\n>\n\nIn my initial patch, there was a \"reserved2\" field at the end of the\nrte_mbuf structure to keep its size to 64 bytes. This is not really\nrequired because of the __rte_cache_aligned, but I wonder if it's a\nproblem to have metadata not starting on a cache line. There can be\nsome conflicts if some part of the code use *(uint32 *)(m + 1)\nand other part of code m->metadata32[0].\n\nBy the way (that's completely off-topic), but I don't really see why\nhaving this metadata at the end of mbuf structure is useful.\n\n> @@ -1523,7 +1523,8 @@ ixgbe_recv_scattered_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,\n> \t\t}\n>\n> \t\t/* Prefetch data of first segment, if configured to do so. */\n> -\t\trte_packet_prefetch(first_seg->data);\n> +\t\trte_packet_prefetch((char *)first_seg->buf_addr +\n> +\t\t\tfirst_seg->data_off);\n>\n\nIt seems there is a trailing whitespace here after the \"+\" (seen by\n\"git am\").\n\n\nRegards,\nOlivier", "headers": { "Return-Path": "<olivier.matz@6wind.com>", "Received": [ "from mail-wg0-f47.google.com (mail-wg0-f47.google.com\n\t[74.125.82.47]) by dpdk.org (Postfix) with ESMTP id 105B7B3B4\n\tfor <dev@dpdk.org>; Tue, 12 Aug 2014 10:52:45 +0200 (CEST)", "by mail-wg0-f47.google.com with SMTP id b13so9546144wgh.18\n\tfor <dev@dpdk.org>; Tue, 12 Aug 2014 01:55:39 -0700 (PDT)", "from [10.16.0.195] (guy78-3-82-239-227-177.fbx.proxad.net.\n\t[82.239.227.177]) by mx.google.com with ESMTPSA id\n\tkw1sm7772275wjb.19.2014.08.12.01.55.38 for <multiple recipients>\n\t(version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);\n\tTue, 12 Aug 2014 01:55:38 -0700 (PDT)" ], "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20130820;\n\th=x-gm-message-state:message-id:date:from:user-agent:mime-version:to\n\t:cc:subject:references:in-reply-to:content-type\n\t:content-transfer-encoding;\n\tbh=xCK/OyE+z+5DNAbH+w6anv6G0DzqCIpn6bDroWnbs5c=;\n\tb=HDKpWoST7Ld58B/dYHBhLIs9hlB/NnuiPjBt/qjK+c4h9MeZ14QtA0eEhFeDlikqGC\n\t94+WqIxgxktN1PVUie230yu0mTh+vR0X1DxqZwpo7Wqlu2nh/u1mfCcCXlORM3WEqFDw\n\tsreBno5PFwnNjzhL8uK8o16al4x8WO98yS7TCGZQVa2Nf8ZjygqspsB19Y6bYMTCxKCW\n\tQz/84VfxZsDzXqrdH+tEH1ZVR7kViQ3XhQVJJ3CRpE6/R42Dm0iiorjczcS6edpyNXtE\n\t6g9LgV0fXLEryE1bLmP7q/184cRTi+RRMPABxY4UgPXN+9vRAEFRt0+wbTaUYSAJZ6H0\n\tZkoQ==", "X-Gm-Message-State": "ALoCoQnw/i8a10muFtUOhBWTcUvLTrkLq0yvd9HbA3U9G/rxO1NlEzI0yXJvFd58rhRslAeHE+cs", "X-Received": "by 10.194.184.101 with SMTP id et5mr3107926wjc.14.1407833739689; \n\tTue, 12 Aug 2014 01:55:39 -0700 (PDT)", "Message-ID": "<53E9D689.8010901@6wind.com>", "Date": "Tue, 12 Aug 2014 10:55:37 +0200", "From": "Olivier MATZ <olivier.matz@6wind.com>", "User-Agent": "Mozilla/5.0 (X11; Linux x86_64;\n\trv:24.0) Gecko/20100101 Icedove/24.5.0", "MIME-Version": "1.0", "To": "Bruce Richardson <bruce.richardson@intel.com>", "References": "<1407789890-17355-1-git-send-email-bruce.richardson@intel.com>\n\t<1407789890-17355-5-git-send-email-bruce.richardson@intel.com>", "In-Reply-To": "<1407789890-17355-5-git-send-email-bruce.richardson@intel.com>", "Content-Type": "text/plain; charset=ISO-8859-1; format=flowed", "Content-Transfer-Encoding": "7bit", "Cc": "dev <dev@dpdk.org>", "Subject": "Re: [dpdk-dev] [RFC PATCH 04/14] mbuf: replace data pointer by an\n\toffset", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "patches and discussions about DPDK <dev.dpdk.org>", "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://dpdk.org/ml/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "X-List-Received-Date": "Tue, 12 Aug 2014 08:52:45 -0000" }, "addressed": null } ]