get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/4339/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 4339,
    "url": "http://patches.dpdk.org/api/patches/4339/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1429222237-8002-2-git-send-email-thomas.monjalon@6wind.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": "<1429222237-8002-2-git-send-email-thomas.monjalon@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1429222237-8002-2-git-send-email-thomas.monjalon@6wind.com",
    "date": "2015-04-16T22:10:37",
    "name": "[dpdk-dev,v3,2/2] use simple zero initializers",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "86a0462406b69704526ec66e1a110cc5371459dd",
    "submitter": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/people/1/?format=api",
        "name": "Thomas Monjalon",
        "email": "thomas.monjalon@6wind.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1429222237-8002-2-git-send-email-thomas.monjalon@6wind.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/4339/comments/",
    "check": "pending",
    "checks": "http://patches.dpdk.org/api/patches/4339/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 060CBC344;\n\tFri, 17 Apr 2015 00:11:34 +0200 (CEST)",
            "from mail-wi0-f179.google.com (mail-wi0-f179.google.com\n\t[209.85.212.179]) by dpdk.org (Postfix) with ESMTP id 10D80C31A\n\tfor <dev@dpdk.org>; Fri, 17 Apr 2015 00:11:32 +0200 (CEST)",
            "by wizk4 with SMTP id k4so844161wiz.1\n\tfor <dev@dpdk.org>; Thu, 16 Apr 2015 15:11:31 -0700 (PDT)",
            "from localhost.localdomain (136-92-190-109.dsl.ovh.fr.\n\t[109.190.92.136])\n\tby mx.google.com with ESMTPSA id jh1sm83811wid.9.2015.04.16.15.11.30\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tThu, 16 Apr 2015 15:11:31 -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:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=UhQ4l4uHJ2t+bWvWFCsQnjaw76zCe/W0Z69YCxQdADw=;\n\tb=XSbm8UsvCA1uILEZ5yFugeyhlBokmZWAU3r8YmqCl9u1B6nS53FdS+FP2I4DT30MDP\n\tZO/DKTiKP1t9QGq/EkF6GRmvRnIz2uyKeOTlUjdRBV7SX+fbj+CNwKK9lGIPnyXLE1+T\n\tnVKxtKHEuMDn3MPbw3Xaa4cPOofyadTzZ9WfXsYc/jdWV3InFevJm7KGLVcSTo/L3Cxd\n\tUzfcyWwdDmmhH7ftc3eUMrkbZjMyNvUGXsKDUA70g0mUk8vbdFGvER422BlQl82oLRop\n\tG8xEOougNqFYtCF1IvZjnamtuwvc4PG5TIX7jBmM5F1t/gbGgFdyf4jYPlXRiCwogOxN\n\tBU3A==",
        "X-Gm-Message-State": "ALoCoQm1K+aHdHf1RMwg8rMgWBAwRuI9a847NDx1ZAXgLXncx6wo49PfwwaEE05Kud7PjakyjzpC",
        "X-Received": "by 10.194.249.201 with SMTP id yw9mr38697618wjc.5.1429222291699; \n\tThu, 16 Apr 2015 15:11:31 -0700 (PDT)",
        "From": "Thomas Monjalon <thomas.monjalon@6wind.com>",
        "To": "dev@dpdk.org",
        "Date": "Fri, 17 Apr 2015 00:10:37 +0200",
        "Message-Id": "<1429222237-8002-2-git-send-email-thomas.monjalon@6wind.com>",
        "X-Mailer": "git-send-email 2.2.2",
        "In-Reply-To": "<1429222237-8002-1-git-send-email-thomas.monjalon@6wind.com>",
        "References": "<1429130956-17828-1-git-send-email-thomas.monjalon@6wind.com>\n\t<1429222237-8002-1-git-send-email-thomas.monjalon@6wind.com>",
        "Subject": "[dpdk-dev] [PATCH v3 2/2] use simple zero initializers",
        "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>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "To initialize a structure with zeros, one field was explicitly set\nto avoid \"missing initializer\" bug with old GCC (e.g. 4.4).\nThis warning is now disabled (commit <insertlater>) for old versions of GCC,\nso the workarounds may be removed.\n\nThese initializers should not be needed for static variables but they\nare still used to workaround an ICC bug (see commit b2595c4aa92d).\n\nThere is one remaining exception where {0} initializer doesn't work cleanly,\neven with recent GCC:\nlib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c:735:9:\nerror: missing braces around initializer [-Werror=missing-braces]\n  struct rte_mbuf mb_def = {0}; /* zeroed mbuf */\n\nTested with gcc-4.4.7 (CentOS), gcc-4.7.2 (Debian), gcc-4.9.2 (Arch),\nclang-3.6.0 and icc-13.1.1.\n\nSigned-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>\nTested-by: Thomas Monjalon <thomas.monjalon@6wind.com>\nTested-by: John McNamara <john.mcnamara@intel.com>\n---\nchanges in v2:\n- new patch\nchanges in v3:\n- tested with clang and icc\n\n app/test/test_ring_perf.c             | 2 +-\n lib/librte_pmd_e1000/em_ethdev.c      | 2 +-\n lib/librte_pmd_e1000/igb_ethdev.c     | 4 ++--\n lib/librte_pmd_e1000/igb_rxtx.c       | 6 ++----\n lib/librte_pmd_enic/enic_clsf.c       | 2 +-\n lib/librte_pmd_i40e/i40e_rxtx.c       | 2 +-\n lib/librte_pmd_ixgbe/ixgbe_rxtx.c     | 8 +++-----\n lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c | 3 +--\n lib/librte_pmd_mlx4/mlx4.c            | 2 +-\n 9 files changed, 13 insertions(+), 18 deletions(-)",
    "diff": "diff --git a/app/test/test_ring_perf.c b/app/test/test_ring_perf.c\nindex 44dda4d..8c47ccb 100644\n--- a/app/test/test_ring_perf.c\n+++ b/app/test/test_ring_perf.c\n@@ -253,7 +253,7 @@ static void\n run_on_core_pair(struct lcore_pair *cores,\n \t\tlcore_function_t f1, lcore_function_t f2)\n {\n-\tstruct thread_params param1 = {.size = 0}, param2 = {.size = 0};\n+\tstruct thread_params param1 = {0}, param2 = {0};\n \tunsigned i;\n \tfor (i = 0; i < sizeof(bulk_sizes)/sizeof(bulk_sizes[0]); i++) {\n \t\tlcore_count = 0;\ndiff --git a/lib/librte_pmd_e1000/em_ethdev.c b/lib/librte_pmd_e1000/em_ethdev.c\nindex 12ecf5f..82e0b7a 100644\n--- a/lib/librte_pmd_e1000/em_ethdev.c\n+++ b/lib/librte_pmd_e1000/em_ethdev.c\n@@ -130,7 +130,7 @@ static struct rte_pci_id pci_id_em_map[] = {\n #define RTE_PCI_DEV_ID_DECL_EM(vend, dev) {RTE_PCI_DEVICE(vend, dev)},\n #include \"rte_pci_dev_ids.h\"\n \n-{.device_id = 0},\n+{0},\n };\n \n static const struct eth_dev_ops eth_em_ops = {\ndiff --git a/lib/librte_pmd_e1000/igb_ethdev.c b/lib/librte_pmd_e1000/igb_ethdev.c\nindex 1ea2d38..e2b7cf3 100644\n--- a/lib/librte_pmd_e1000/igb_ethdev.c\n+++ b/lib/librte_pmd_e1000/igb_ethdev.c\n@@ -221,7 +221,7 @@ static struct rte_pci_id pci_id_igb_map[] = {\n #define RTE_PCI_DEV_ID_DECL_IGB(vend, dev) {RTE_PCI_DEVICE(vend, dev)},\n #include \"rte_pci_dev_ids.h\"\n \n-{.device_id = 0},\n+{0},\n };\n \n /*\n@@ -232,7 +232,7 @@ static struct rte_pci_id pci_id_igbvf_map[] = {\n #define RTE_PCI_DEV_ID_DECL_IGBVF(vend, dev) {RTE_PCI_DEVICE(vend, dev)},\n #include \"rte_pci_dev_ids.h\"\n \n-{.device_id = 0},\n+{0},\n };\n \n static const struct eth_dev_ops eth_igb_ops = {\ndiff --git a/lib/librte_pmd_e1000/igb_rxtx.c b/lib/librte_pmd_e1000/igb_rxtx.c\nindex 946b39d..084e45a 100644\n--- a/lib/librte_pmd_e1000/igb_rxtx.c\n+++ b/lib/librte_pmd_e1000/igb_rxtx.c\n@@ -1164,8 +1164,7 @@ igb_reset_tx_queue_stat(struct igb_tx_queue *txq)\n static void\n igb_reset_tx_queue(struct igb_tx_queue *txq, struct rte_eth_dev *dev)\n {\n-\tstatic const union e1000_adv_tx_desc zeroed_desc = { .read = {\n-\t\t\t.buffer_addr = 0}};\n+\tstatic const union e1000_adv_tx_desc zeroed_desc = {{0}};\n \tstruct igb_tx_entry *txe = txq->sw_ring;\n \tuint16_t i, prev;\n \tstruct e1000_hw *hw;\n@@ -1330,8 +1329,7 @@ eth_igb_rx_queue_release(void *rxq)\n static void\n igb_reset_rx_queue(struct igb_rx_queue *rxq)\n {\n-\tstatic const union e1000_adv_rx_desc zeroed_desc = { .read = {\n-\t\t\t.pkt_addr = 0}};\n+\tstatic const union e1000_adv_rx_desc zeroed_desc = {{0}};\n \tunsigned i;\n \n \t/* Zero out HW ring memory */\ndiff --git a/lib/librte_pmd_enic/enic_clsf.c b/lib/librte_pmd_enic/enic_clsf.c\nindex b61d625..a069194 100644\n--- a/lib/librte_pmd_enic/enic_clsf.c\n+++ b/lib/librte_pmd_enic/enic_clsf.c\n@@ -96,7 +96,7 @@ int enic_fdir_add_fltr(struct enic *enic, struct rte_fdir_filter *params,\n \tu16 queue, u8 drop)\n {\n \tstruct enic_fdir_node *key;\n-\tstruct filter fltr = {.type = 0};\n+\tstruct filter fltr = {0};\n \tint32_t pos;\n \tu8 do_free = 0;\n \tu16 old_fltr_id = 0;\ndiff --git a/lib/librte_pmd_i40e/i40e_rxtx.c b/lib/librte_pmd_i40e/i40e_rxtx.c\nindex 9c7be6f..abe68f4 100644\n--- a/lib/librte_pmd_i40e/i40e_rxtx.c\n+++ b/lib/librte_pmd_i40e/i40e_rxtx.c\n@@ -1228,7 +1228,7 @@ i40e_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)\n \tuint16_t tx_last;\n \tuint16_t slen;\n \tuint64_t buf_dma_addr;\n-\tunion i40e_tx_offload tx_offload = { .data = 0 };\n+\tunion i40e_tx_offload tx_offload = {0};\n \n \ttxq = tx_queue;\n \tsw_ring = txq->sw_ring;\ndiff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c\nindex f1da9ec..3c61d1c 100644\n--- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c\n+++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c\n@@ -579,7 +579,7 @@ ixgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,\n \tuint64_t tx_ol_req;\n \tuint32_t ctx = 0;\n \tuint32_t new_ctx;\n-\tunion ixgbe_tx_offload tx_offload = { .data = 0 };\n+\tunion ixgbe_tx_offload tx_offload = {0};\n \n \ttxq = tx_queue;\n \tsw_ring = txq->sw_ring;\n@@ -2052,8 +2052,7 @@ ixgbe_dev_tx_queue_release(void *txq)\n static void\n ixgbe_reset_tx_queue(struct ixgbe_tx_queue *txq)\n {\n-\tstatic const union ixgbe_adv_tx_desc zeroed_desc = { .read = {\n-\t\t\t.buffer_addr = 0}};\n+\tstatic const union ixgbe_adv_tx_desc zeroed_desc = {{0}};\n \tstruct ixgbe_tx_entry *txe = txq->sw_ring;\n \tuint16_t prev, i;\n \n@@ -2445,8 +2444,7 @@ check_rx_burst_bulk_alloc_preconditions(__rte_unused struct ixgbe_rx_queue *rxq)\n static void\n ixgbe_reset_rx_queue(struct ixgbe_hw *hw, struct ixgbe_rx_queue *rxq)\n {\n-\tstatic const union ixgbe_adv_rx_desc zeroed_desc = { .read = {\n-\t\t\t.pkt_addr = 0}};\n+\tstatic const union ixgbe_adv_rx_desc zeroed_desc = {{0}};\n \tunsigned i;\n \tuint16_t len = rxq->nb_rx_desc;\n \ndiff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c\nindex 7ac6b61..abd10f6 100644\n--- a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c\n+++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c\n@@ -691,8 +691,7 @@ ixgbe_tx_free_swring(struct ixgbe_tx_queue *txq)\n static void\n ixgbe_reset_tx_queue(struct ixgbe_tx_queue *txq)\n {\n-\tstatic const union ixgbe_adv_tx_desc zeroed_desc = { .read = {\n-\t\t\t.buffer_addr = 0} };\n+\tstatic const union ixgbe_adv_tx_desc zeroed_desc = {{0}};\n \tstruct ixgbe_tx_entry_v *txe = (struct ixgbe_tx_entry_v *)txq->sw_ring;\n \tuint16_t i;\n \ndiff --git a/lib/librte_pmd_mlx4/mlx4.c b/lib/librte_pmd_mlx4/mlx4.c\nindex e096071..024282a 100644\n--- a/lib/librte_pmd_mlx4/mlx4.c\n+++ b/lib/librte_pmd_mlx4/mlx4.c\n@@ -3497,7 +3497,7 @@ static void\n mlx4_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)\n {\n \tstruct priv *priv = dev->data->dev_private;\n-\tstruct rte_eth_stats tmp = { .ipackets = 0 };\n+\tstruct rte_eth_stats tmp = {0};\n \tunsigned int i;\n \tunsigned int idx;\n \n",
    "prefixes": [
        "dpdk-dev",
        "v3",
        "2/2"
    ]
}