Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/264/?format=api
http://patches.dpdk.org/api/patches/264/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1409240559-14447-2-git-send-email-bruce.richardson@intel.com/", "project": { "id": 1, "url": "http://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<1409240559-14447-2-git-send-email-bruce.richardson@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1409240559-14447-2-git-send-email-bruce.richardson@intel.com", "date": "2014-08-28T15:42:34", "name": "[dpdk-dev,v2,1/6] ixgbe: put only non-zero initializer in definition", "commit_ref": "", "pull_url": "", "state": "accepted", "archived": true, "hash": "730d1d353c979b7164b21d276abc8d5d4b2635fb", "submitter": { "id": 20, "url": "http://patches.dpdk.org/api/people/20/?format=api", "name": "Bruce Richardson", "email": "bruce.richardson@intel.com" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dpdk/patch/1409240559-14447-2-git-send-email-bruce.richardson@intel.com/mbox/", "series": [], "comments": "http://patches.dpdk.org/api/patches/264/comments/", "check": "pending", "checks": "http://patches.dpdk.org/api/patches/264/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<bricha3@ecsmtp.ir.intel.com>", "Received": [ "from mga09.intel.com (mga09.intel.com [134.134.136.24])\r\n\tby dpdk.org (Postfix) with ESMTP id 09BB15942\r\n\tfor <dev@dpdk.org>; Thu, 28 Aug 2014 18:01:58 +0200 (CEST)", "from azsmga001.ch.intel.com ([10.2.17.19])\r\n\tby orsmga102.jf.intel.com with ESMTP; 28 Aug 2014 08:37:01 -0700", "from irvmail001.ir.intel.com ([163.33.26.43])\r\n\tby azsmga001.ch.intel.com with ESMTP; 28 Aug 2014 08:42:40 -0700", "from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com\r\n\t[10.237.217.46])\r\n\tby irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id\r\n\ts7SFge0q024767; Thu, 28 Aug 2014 16:42:40 +0100", "from sivswdev02.ir.intel.com (localhost [127.0.0.1])\r\n\tby sivswdev02.ir.intel.com with ESMTP id s7SFgeY9014767;\r\n\tThu, 28 Aug 2014 16:42:40 +0100", "(from bricha3@localhost)\r\n\tby sivswdev02.ir.intel.com with id s7SFgeOD014763;\r\n\tThu, 28 Aug 2014 16:42:40 +0100" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.04,418,1406617200\"; d=\"scan'208\";a=\"473512672\"", "From": "Bruce Richardson <bruce.richardson@intel.com>", "To": "dev@dpdk.org", "Date": "Thu, 28 Aug 2014 16:42:34 +0100", "Message-Id": "<1409240559-14447-2-git-send-email-bruce.richardson@intel.com>", "X-Mailer": "git-send-email 1.7.0.7", "In-Reply-To": "<1409154628-30825-1-git-send-email-bruce.richardson@intel.com>", "References": "<1409154628-30825-1-git-send-email-bruce.richardson@intel.com>", "Subject": "[dpdk-dev] [PATCH v2 1/6] ixgbe: put only non-zero initializer in\r\n\tdefinition", "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>,\r\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>,\r\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "X-List-Received-Date": "Thu, 28 Aug 2014 16:01:59 -0000" }, "content": "Since all unspecified fields in an initializer are assumed to be zero we\ncan simplify the empty mbuf definition in the vector driver to only use\nthe fields that are non-zero, i.e. just nb_segs = 1. This makes things\nshorter and means that the structure doesn't need as many updates for\nother fields being renamed or moved.\n\nThe variable itself is never modified and only used by a single function\nso it can be made const and local to the using function.\n\nChanges in v2:\n* None\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c | 29 +++++------------------------\n 1 file changed, 5 insertions(+), 24 deletions(-)", "diff": "diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c\r\nindex 92e07de..56dce23 100644\r\n--- a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c\r\n+++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c\r\n@@ -44,33 +44,14 @@\r\n #pragma GCC diagnostic ignored \"-Wcast-qual\"\r\n #endif\r\n \r\n-static struct rte_mbuf mb_def = {\r\n-\r\n-\t.ol_flags = 0,\r\n-\t{\r\n-\t\t.pkt = {\r\n-\t\t\t.data_len = 0,\r\n-\t\t\t.pkt_len = 0,\r\n-\r\n-\t\t\t.vlan_macip = {\r\n-\t\t\t\t.data = 0,\r\n-\t\t\t},\r\n-\t\t\t.hash = {\r\n-\t\t\t\t.rss = 0,\r\n-\t\t\t},\r\n-\r\n-\t\t\t.nb_segs = 1,\r\n-\t\t\t.in_port = 0,\r\n-\r\n-\t\t\t.next = NULL,\r\n-\t\t\t.data = NULL,\r\n-\t\t},\r\n-\t},\r\n-};\r\n-\r\n static inline void\r\n ixgbe_rxq_rearm(struct igb_rx_queue *rxq)\r\n {\r\n+\tstatic const struct rte_mbuf mb_def = {\r\n+\t\t.pkt = {\r\n+\t\t\t.nb_segs = 1,\r\n+\t\t},\r\n+\t};\r\n \tint i;\r\n \tuint16_t rx_id;\r\n \tvolatile union ixgbe_adv_rx_desc *rxdp;\r\n", "prefixes": [ "dpdk-dev", "v2", "1/6" ] }{ "id": 264, "url": "