get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1336,
    "url": "https://patches.dpdk.org/api/patches/1336/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1416328259-23926-3-git-send-email-michalx.k.jastrzebski@intel.com/",
    "project": {
        "id": 1,
        "url": "https://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": "<1416328259-23926-3-git-send-email-michalx.k.jastrzebski@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1416328259-23926-3-git-send-email-michalx.k.jastrzebski@intel.com",
    "date": "2014-11-18T16:30:59",
    "name": "[dpdk-dev,v4,2/2] testpmd: add mode 4 support",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "22f546c0e15b9c2cd640892120926a02200ff3ba",
    "submitter": {
        "id": 74,
        "url": "https://patches.dpdk.org/api/people/74/?format=api",
        "name": "Michal Jastrzebski",
        "email": "michalx.k.jastrzebski@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1416328259-23926-3-git-send-email-michalx.k.jastrzebski@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/1336/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/1336/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 4C09D7E18;\n\tTue, 18 Nov 2014 17:20:58 +0100 (CET)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby dpdk.org (Postfix) with ESMTP id 345A85323\n\tfor <dev@dpdk.org>; Tue, 18 Nov 2014 17:20:53 +0100 (CET)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby orsmga101.jf.intel.com with ESMTP; 18 Nov 2014 08:31:08 -0800",
            "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby orsmga001.jf.intel.com with ESMTP; 18 Nov 2014 08:31:07 -0800",
            "from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com\n\t[10.237.217.45])\n\tby irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id\n\tsAIGV54X010029; Tue, 18 Nov 2014 16:31:05 GMT",
            "from sivswdev01.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev01.ir.intel.com with ESMTP id sAIGV5d9023996;\n\tTue, 18 Nov 2014 16:31:05 GMT",
            "(from mkjastrx@localhost)\n\tby sivswdev01.ir.intel.com with  id sAIGV5mo023992;\n\tTue, 18 Nov 2014 16:31:05 GMT"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.07,410,1413270000\"; d=\"scan'208\";a=\"609862056\"",
        "From": "Michal Jastrzebski <michalx.k.jastrzebski@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Tue, 18 Nov 2014 16:30:59 +0000",
        "Message-Id": "<1416328259-23926-3-git-send-email-michalx.k.jastrzebski@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "In-Reply-To": "<1416328259-23926-1-git-send-email-michalx.k.jastrzebski@intel.com>",
        "References": "<1416328259-23926-1-git-send-email-michalx.k.jastrzebski@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v4 2/2] testpmd: add mode 4 support",
        "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": "From: Pawel Wodkowski <pawelx.wodkowski@intel.com>\n\n\nSigned-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>\n---\n app/test-pmd/cmdline.c      |   28 +++++++++++++++++++++++--\n app/test-pmd/csumonly.c     |    9 ++++++++\n app/test-pmd/icmpecho.c     |   17 ++++++++++++++-\n app/test-pmd/iofwd.c        |    9 ++++++++\n app/test-pmd/macfwd-retry.c |    9 ++++++++\n app/test-pmd/macfwd.c       |    9 ++++++++\n app/test-pmd/macswap.c      |    9 ++++++++\n app/test-pmd/testpmd.c      |   48 +++++++++++++++++++++++++++++++++++++------\n app/test-pmd/testpmd.h      |   11 ++++++++--\n 9 files changed, 138 insertions(+), 11 deletions(-)",
    "diff": "diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c\nindex ee8c121..7e7dd36 100644\n--- a/app/test-pmd/cmdline.c\n+++ b/app/test-pmd/cmdline.c\n@@ -41,6 +41,8 @@\n #include <termios.h>\n #include <unistd.h>\n #include <inttypes.h>\n+\n+#include \"rte_eth_bond_8023ad.h\"\n #ifndef __linux__\n #ifndef __FreeBSD__\n #include <net/socket.h>\n@@ -86,6 +88,7 @@\n #include <rte_pci_dev_ids.h>\n #ifdef RTE_LIBRTE_PMD_BOND\n #include <rte_eth_bond.h>\n+#include <rte_eth_bond_8023ad.h>\n #endif\n \n #include \"testpmd.h\"\n@@ -3327,13 +3330,18 @@ static void cmd_show_bonding_config_parsed(void *parsed_result,\n \t\t__attribute__((unused)) void *data)\n {\n \tstruct cmd_show_bonding_config_result *res = parsed_result;\n+\tstruct rte_eth_bond_8023ad_slave_info slave_info;\n+\tstatic const char * const state_labels[] = {\n+\t\t\"ACT\", \"TIMEOUT\", \"AGG\", \"SYNC\", \"COL\", \"DIST\", \"DEF\", \"EXP\"\n+\t};\n \tint bonding_mode;\n \tuint8_t slaves[RTE_MAX_ETHPORTS];\n \tint num_slaves, num_active_slaves;\n \tint primary_id;\n-\tint i;\n+\tint i,j;\n \tportid_t port_id = res->port_id;\n \n+\n \t/* Display the bonding mode.*/\n \tbonding_mode = rte_eth_bond_mode_get(port_id);\n \tif (bonding_mode < 0) {\n@@ -3342,7 +3350,8 @@ static void cmd_show_bonding_config_parsed(void *parsed_result,\n \t} else\n \t\tprintf(\"\\tBonding mode: %d\\n\", bonding_mode);\n \n-\tif (bonding_mode == BONDING_MODE_BALANCE) {\n+\tif (bonding_mode == BONDING_MODE_BALANCE ||\n+\t\t\tbonding_mode == BONDING_MODE_8023AD) {\n \t\tint balance_xmit_policy;\n \n \t\tbalance_xmit_policy = rte_eth_bond_xmit_policy_get(port_id);\n@@ -3399,6 +3408,19 @@ static void cmd_show_bonding_config_parsed(void *parsed_result,\n \n \t\tprintf(\"%d]\\n\", slaves[num_active_slaves - 1]);\n \n+\t\tif (bonding_mode == BONDING_MODE_8023AD) {\n+\t\t\tfor (i = 0; i < num_active_slaves; i++) {\n+\t\t\t\trte_eth_bond_8023ad_slave_info(port_id, slaves[i], &slave_info);\n+\n+\t\t\t\tprintf(\"\\tSlave %u state: \", slaves[i]);\n+\t\t\t\tfor (j = 0; j < 8; j++) {\n+\t\t\t\t\tif ((slave_info.actor_state >> j) & 1)\n+\t\t\t\t\t\tprintf(\"%s \", state_labels[j]);\n+\t\t\t\t}\n+\t\t\t\tprintf(\"\\n\");\n+\t\t\t}\n+\t\t}\n+\n \t} else {\n \t\tprintf(\"\\tActive Slaves: []\\n\");\n \n@@ -3646,6 +3668,8 @@ static void cmd_create_bonded_device_parsed(void *parsed_result,\n \t\t/* Update number of ports */\n \t\tnb_ports = rte_eth_dev_count();\n \t\treconfig(port_id, res->socket);\n+\t\t/* Save bonding mode here as it is constat. */\n+\t\tports[port_id].bond_mode = res->mode;\n \t\trte_eth_promiscuous_enable(port_id);\n \t}\n \ndiff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c\nindex 8d10bfd..c433eea 100644\n--- a/app/test-pmd/csumonly.c\n+++ b/app/test-pmd/csumonly.c\n@@ -254,8 +254,17 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)\n \t */\n \tnb_rx = rte_eth_rx_burst(fs->rx_port, fs->rx_queue, pkts_burst,\n \t\t\t\t nb_pkt_per_burst);\n+#ifndef RTE_LIBRTE_PMD_BOND\n \tif (unlikely(nb_rx == 0))\n \t\treturn;\n+#else\n+\tif (unlikely(nb_rx == 0 && (fs->forward_timeout == 0 ||\n+\t\t\tfs->next_forward_time > rte_rdtsc())))\n+\t\treturn;\n+\n+\tif (fs->forward_timeout != 0)\n+\t\tfs->next_forward_time = rte_rdtsc() + fs->forward_timeout;\n+#endif\n \n #ifdef RTE_TEST_PMD_RECORD_BURST_STATS\n \tfs->rx_burst_stats.pkt_burst_spread[nb_rx]++;\ndiff --git a/app/test-pmd/icmpecho.c b/app/test-pmd/icmpecho.c\nindex 7fd4b6d..e954601 100644\n--- a/app/test-pmd/icmpecho.c\n+++ b/app/test-pmd/icmpecho.c\n@@ -305,6 +305,9 @@ reply_to_icmp_echo_rqsts(struct fwd_stream *fs)\n \tuint16_t arp_pro;\n \tuint8_t  i;\n \tint l2_len;\n+#if RTE_LIBRTE_PMD_BOND\n+\tuint8_t force_tx_burst;\n+#endif\n #ifdef RTE_TEST_PMD_RECORD_CORE_CYCLES\n \tuint64_t start_tsc;\n \tuint64_t end_tsc;\n@@ -320,8 +323,20 @@ reply_to_icmp_echo_rqsts(struct fwd_stream *fs)\n \t */\n \tnb_rx = rte_eth_rx_burst(fs->rx_port, fs->rx_queue, pkts_burst,\n \t\t\t\t nb_pkt_per_burst);\n+#ifndef RTE_LIBRTE_PMD_BOND\n \tif (unlikely(nb_rx == 0))\n \t\treturn;\n+#else\n+\tif (unlikely(nb_rx == 0 && (fs->forward_timeout == 0 ||\n+\t\t\tfs->next_forward_time > rte_rdtsc())))\n+\t\treturn;\n+\n+\tif (fs->forward_timeout != 0) {\n+\t\tforce_tx_burst = fs->next_forward_time <= rte_rdtsc();\n+\t\tfs->next_forward_time = rte_rdtsc() + fs->forward_timeout;\n+\t} else\n+\t\tforce_tx_burst = 0;\n+#endif\n \n #ifdef RTE_TEST_PMD_RECORD_BURST_STATS\n \tfs->rx_burst_stats.pkt_burst_spread[nb_rx]++;\n@@ -474,7 +489,7 @@ reply_to_icmp_echo_rqsts(struct fwd_stream *fs)\n \t}\n \n \t/* Send back ICMP echo replies, if any. */\n-\tif (nb_replies > 0) {\n+\tif (nb_replies > 0 || force_tx_burst) {\n \t\tnb_tx = rte_eth_tx_burst(fs->tx_port, fs->tx_queue, pkts_burst,\n \t\t\t\t\t nb_replies);\n \t\tfs->tx_packets += nb_tx;\ndiff --git a/app/test-pmd/iofwd.c b/app/test-pmd/iofwd.c\nindex 02a5977..62a325f 100644\n--- a/app/test-pmd/iofwd.c\n+++ b/app/test-pmd/iofwd.c\n@@ -96,8 +96,17 @@ pkt_burst_io_forward(struct fwd_stream *fs)\n \t */\n \tnb_rx = rte_eth_rx_burst(fs->rx_port, fs->rx_queue, pkts_burst,\n \t\t\t\t nb_pkt_per_burst);\n+#ifndef RTE_LIBRTE_PMD_BOND\n \tif (unlikely(nb_rx == 0))\n \t\treturn;\n+#else\n+\tif (unlikely(nb_rx == 0 && (fs->forward_timeout == 0 ||\n+\t\t\tfs->next_forward_time > rte_rdtsc())))\n+\t\treturn;\n+\n+\tif (fs->forward_timeout != 0)\n+\t\tfs->next_forward_time = rte_rdtsc() + fs->forward_timeout;\n+#endif\n \n #ifdef RTE_TEST_PMD_RECORD_BURST_STATS\n \tfs->rx_burst_stats.pkt_burst_spread[nb_rx]++;\ndiff --git a/app/test-pmd/macfwd-retry.c b/app/test-pmd/macfwd-retry.c\nindex 83da26f..fd100c0 100644\n--- a/app/test-pmd/macfwd-retry.c\n+++ b/app/test-pmd/macfwd-retry.c\n@@ -110,8 +110,17 @@ pkt_burst_mac_retry_forward(struct fwd_stream *fs)\n \t */\n \tnb_rx = rte_eth_rx_burst(fs->rx_port, fs->rx_queue, pkts_burst,\n \t\t\t\t nb_pkt_per_burst);\n+#ifndef RTE_LIBRTE_PMD_BOND\n \tif (unlikely(nb_rx == 0))\n \t\treturn;\n+#else\n+\tif (unlikely(nb_rx == 0 && (fs->forward_timeout == 0 ||\n+\t\t\tfs->next_forward_time > rte_rdtsc())))\n+\t\treturn;\n+\n+\tif (fs->forward_timeout != 0)\n+\t\tfs->next_forward_time = rte_rdtsc() + fs->forward_timeout;\n+#endif\n \n #ifdef RTE_TEST_PMD_RECORD_BURST_STATS\n \tfs->rx_burst_stats.pkt_burst_spread[nb_rx]++;\ndiff --git a/app/test-pmd/macfwd.c b/app/test-pmd/macfwd.c\nindex 38bae23..2fa7d7d 100644\n--- a/app/test-pmd/macfwd.c\n+++ b/app/test-pmd/macfwd.c\n@@ -100,8 +100,17 @@ pkt_burst_mac_forward(struct fwd_stream *fs)\n \t */\n \tnb_rx = rte_eth_rx_burst(fs->rx_port, fs->rx_queue, pkts_burst,\n \t\t\t\t nb_pkt_per_burst);\n+#ifndef RTE_LIBRTE_PMD_BOND\n \tif (unlikely(nb_rx == 0))\n \t\treturn;\n+#else\n+\tif (unlikely(nb_rx == 0 && (fs->forward_timeout == 0 ||\n+\t\t\tfs->next_forward_time > rte_rdtsc())))\n+\t\treturn;\n+\n+\tif (fs->forward_timeout != 0)\n+\t\tfs->next_forward_time = rte_rdtsc() + fs->forward_timeout;\n+#endif\n \n #ifdef RTE_TEST_PMD_RECORD_BURST_STATS\n \tfs->rx_burst_stats.pkt_burst_spread[nb_rx]++;\ndiff --git a/app/test-pmd/macswap.c b/app/test-pmd/macswap.c\nindex 1786095..042670d 100644\n--- a/app/test-pmd/macswap.c\n+++ b/app/test-pmd/macswap.c\n@@ -100,8 +100,17 @@ pkt_burst_mac_swap(struct fwd_stream *fs)\n \t */\n \tnb_rx = rte_eth_rx_burst(fs->rx_port, fs->rx_queue, pkts_burst,\n \t\t\t\t nb_pkt_per_burst);\n+#ifndef RTE_LIBRTE_PMD_BOND\n \tif (unlikely(nb_rx == 0))\n \t\treturn;\n+#else\n+\tif (unlikely(nb_rx == 0 && (fs->forward_timeout == 0 ||\n+\t\t\tfs->next_forward_time > rte_rdtsc())))\n+\t\treturn;\n+\n+\tif (fs->forward_timeout != 0)\n+\t\tfs->next_forward_time = rte_rdtsc() + fs->forward_timeout;\n+#endif\n \n #ifdef RTE_TEST_PMD_RECORD_BURST_STATS\n \tfs->rx_burst_stats.pkt_burst_spread[nb_rx]++;\ndiff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c\nindex 5740804..68e2987 100644\n--- a/app/test-pmd/testpmd.c\n+++ b/app/test-pmd/testpmd.c\n@@ -72,6 +72,9 @@\n #include <rte_ether.h>\n #include <rte_ethdev.h>\n #include <rte_string_fns.h>\n+#ifdef RTE_LIBRTE_PMD_BOND\n+#include <rte_eth_bond.h>\n+#endif\n #ifdef RTE_LIBRTE_PMD_XENVIRT\n #include <rte_eth_xenvirt.h>\n #endif\n@@ -1022,9 +1025,11 @@ start_packet_forwarding(int with_tx_first)\n \tport_fwd_begin_t port_fwd_begin;\n \tport_fwd_end_t  port_fwd_end;\n \tstruct rte_port *port;\n+\tstruct fwd_stream *fs;\n \tunsigned int i;\n \tportid_t   pt_id;\n \tstreamid_t sm_id;\n+\tuint8_t is_mode4;\n \n \tif (all_ports_started() == 0) {\n \t\tprintf(\"Not all ports were started\\n\");\n@@ -1050,7 +1055,6 @@ start_packet_forwarding(int with_tx_first)\n \t\t\treturn;\n \t\t}\n \t}\n-\ttest_done = 0;\n \n \tif(!no_flush_rx)\n \t\tflush_fwd_rx_queues();\n@@ -1067,11 +1071,35 @@ start_packet_forwarding(int with_tx_first)\n \t\tmap_port_queue_stats_mapping_registers(pt_id, port);\n \t}\n \tfor (sm_id = 0; sm_id < cur_fwd_config.nb_fwd_streams; sm_id++) {\n-\t\tfwd_streams[sm_id]->rx_packets = 0;\n-\t\tfwd_streams[sm_id]->tx_packets = 0;\n-\t\tfwd_streams[sm_id]->fwd_dropped = 0;\n-\t\tfwd_streams[sm_id]->rx_bad_ip_csum = 0;\n-\t\tfwd_streams[sm_id]->rx_bad_l4_csum = 0;\n+\t\tfs = fwd_streams[sm_id];\n+\t\tfs->rx_packets = 0;\n+\t\tfs->tx_packets = 0;\n+\t\tfs->fwd_dropped = 0;\n+\t\tfs->rx_bad_ip_csum = 0;\n+\t\tfs->rx_bad_l4_csum = 0;\n+\n+#ifdef RTE_LIBRTE_PMD_BOND\n+\t\tis_mode4 = ports[fs->rx_port].bond_mode == BONDING_MODE_8023AD ||\n+\t\t\t\tports[fs->tx_port].bond_mode == BONDING_MODE_8023AD;\n+\n+\t\tif (is_mode4) {\n+\t\t\tif (cur_fwd_config.fwd_eng == &rx_only_engine ||\n+\t\t\t\tcur_fwd_config.fwd_eng == &tx_only_engine\n+#ifdef RTE_LIBRTE_IEEE1588\n+\t\t\t\t|| cur_fwd_config.fwd_eng == &ieee1588_fwd_engine,\n+#endif\n+\t\t\t) {\n+\t\t\t\tprintf(\"Selected forwarding engine '%s' is not supported in \"\n+\t\t\t\t\t\"mode 802.3ad of link bonding.\\n\",\n+\t\t\t\t\tcur_fwd_config.fwd_eng->fwd_mode_name);\n+\n+\t\t\t\treturn;\n+\t\t\t}\n+\t\t\tfs->forward_timeout = 100 * rte_get_tsc_hz() / 1000;\n+\t\t\tfs->next_forward_time = 0; /* force forward */\n+\t\t} else\n+\t\t\tfs->forward_timeout = 0; /* force forward is disabled */\n+#endif\n \n #ifdef RTE_TEST_PMD_RECORD_BURST_STATS\n \t\tmemset(&fwd_streams[sm_id]->rx_burst_stats, 0,\n@@ -1083,6 +1111,9 @@ start_packet_forwarding(int with_tx_first)\n \t\tfwd_streams[sm_id]->core_cycles = 0;\n #endif\n \t}\n+\n+\ttest_done = 0;\n+\n \tif (with_tx_first) {\n \t\tport_fwd_begin = tx_only_engine.port_fwd_begin;\n \t\tif (port_fwd_begin != NULL) {\n@@ -1284,6 +1315,11 @@ start_port(portid_t pid)\n \tstruct rte_port *port;\n \tstruct ether_addr mac_addr;\n \n+\tif (pid >= nb_ports && pid != RTE_PORT_ALL) {\n+\t\tprintf(\"Invalid port id %u\\n\", pid);\n+\t\treturn -1;\n+\t}\n+\n \tif (test_done == 0) {\n \t\tprintf(\"Please stop forwarding first\\n\");\n \t\treturn -1;\ndiff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h\nindex 5a3423c..4830775 100644\n--- a/app/test-pmd/testpmd.h\n+++ b/app/test-pmd/testpmd.h\n@@ -40,7 +40,7 @@\n int main(int argc, char **argv);\n #endif\n \n-#define RTE_PORT_ALL            (~(portid_t)0x0)\n+#define RTE_PORT_ALL            ((portid_t)(~0x0))\n \n #define RTE_TEST_RX_DESC_MAX    2048\n #define RTE_TEST_TX_DESC_MAX    2048\n@@ -121,6 +121,10 @@ struct fwd_stream {\n \tstruct pkt_burst_stats rx_burst_stats;\n \tstruct pkt_burst_stats tx_burst_stats;\n #endif\n+#ifdef RTE_LIBRTE_PMD_BOND\n+\tuint64_t forward_timeout; /** Timeout used to force RX/TX */\n+\tuint64_t next_forward_time; /**< Next time when RX/TX should be issued. */\n+#endif\n };\n \n /**\n@@ -152,7 +156,10 @@ struct rte_port {\n \tuint8_t                 need_reconfig;  /**< need reconfiguring port or not */\n \tuint8_t                 need_reconfig_queues; /**< need reconfiguring queues or not */\n \tuint8_t                 rss_flag;   /**< enable rss or not */\n-\tuint8_t\t\t\tdcb_flag;   /**< enable dcb */\n+\tuint8_t\t                dcb_flag;   /**< enable dcb */\n+#ifdef RTE_LIBRTE_PMD_BOND\n+\tint8_t                  bond_mode;  /**< Port bonding mode */\n+#endif\n \tstruct rte_eth_rxconf   rx_conf;    /**< rx configuration */\n \tstruct rte_eth_txconf   tx_conf;    /**< tx configuration */\n };\n",
    "prefixes": [
        "dpdk-dev",
        "v4",
        "2/2"
    ]
}