From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com [74.125.82.45]) by dpdk.org (Postfix) with ESMTP id 184215909 for ; Tue, 24 Jun 2014 15:06:50 +0200 (CEST) Received: by mail-wg0-f45.google.com with SMTP id l18so321048wgh.28 for ; Tue, 24 Jun 2014 06:07:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=MSxzvq5BnxUYV7AfCnbgHXxAxwRdIIF6TnyH/yunMzg=; b=gbPN/Z1ZrlvwBqKYv9kClvj+yn51TmKfY8YGgPsIbp8rNxYOsTWc2qGfb/y192ykhL QuW6KUcJSaWBQ7rHctRBvV/itElJPDwecJvhGAxLzlVb3EArkR2hHHKrlHTioPYilLgc P/yKS4a7V6/qvmCRxiEAtU+Qcg0xjYgyfVyPIOX3MbJvUQs9P9XCzTm6D6+tj99hELfP 8WwuvPe/3m62y44BqCr+Xrh51L/A3hda6uO0mqfyPTu7iTki2TlXCoXjSrN780tQGovY zfhUP3bv8+qSosJAmZbdZvIgLEdzihzAneKCkL/Xf3LFIXrrQlpvRW7iOk18OqjGhGWd 2RAQ== X-Gm-Message-State: ALoCoQl7g36TZg1L43FtM7vwQMyYnYjYGICz9YezO8zlu7T6vpQdR7S060PYOmuWdv67TINkTlsn X-Received: by 10.180.90.242 with SMTP id bz18mr34681056wib.12.1403615227176; Tue, 24 Jun 2014 06:07:07 -0700 (PDT) Received: from alcyon.dev.6wind.com (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id p3sm496257wjw.13.2014.06.24.06.07.06 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Jun 2014 06:07:06 -0700 (PDT) From: David Marchand To: dev@dpdk.org Date: Tue, 24 Jun 2014 15:06:50 +0200 Message-Id: <1403615212-26605-2-git-send-email-david.marchand@6wind.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1403615212-26605-1-git-send-email-david.marchand@6wind.com> References: <1403615212-26605-1-git-send-email-david.marchand@6wind.com> Subject: [dpdk-dev] [PATCH 1/3] app/testpmd: add missing autoneg field to set flow_ctrl X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jun 2014 13:06:50 -0000 Following commit 2d95b84aaacb3d2d0bd70367c0530d15e0cbb14e, rte_eth_fc_conf struct contains a autoneg field that must be set by callers. Add this parameter to testpmd. Signed-off-by: David Marchand --- app/test-pmd/cmdline.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 3298360..3d2a91a 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -326,7 +326,7 @@ static void cmd_help_long_parsed(void *parsed_result, "set flow_ctrl rx (on|off) tx (on|off) (high_water)" " (low_water) (pause_time) (send_xon) mac_ctrl_frame_fwd" - " (on|off) (port_id)\n" + " (on|off) autoneg (on|off) (port_id)\n" " Set the link flow control parameter on a port.\n\n" "set pfc_ctrl rx (on|off) tx (on|off) (high_water)" @@ -3814,6 +3814,8 @@ struct cmd_link_flow_ctrl_set_result { cmdline_fixed_string_t tx_lfc_mode; cmdline_fixed_string_t mac_ctrl_frame_fwd; cmdline_fixed_string_t mac_ctrl_frame_fwd_mode; + cmdline_fixed_string_t autoneg_str; + cmdline_fixed_string_t autoneg; uint32_t high_water; uint32_t low_water; uint16_t pause_time; @@ -3851,6 +3853,7 @@ cmd_link_flow_ctrl_set_parsed(void *parsed_result, fc_conf.pause_time = res->pause_time; fc_conf.send_xon = res->send_xon; fc_conf.mac_ctrl_frame_fwd = (uint8_t)mac_ctrl_frame_fwd; + fc_conf.autoneg = (!strcmp(res->autoneg, "on")) ? 1 : 0; ret = rte_eth_dev_flow_ctrl_set(res->port_id, &fc_conf); if (ret != 0) @@ -3893,6 +3896,12 @@ cmdline_parse_token_string_t cmd_lfc_set_mac_ctrl_frame_fwd_mode = cmdline_parse_token_string_t cmd_lfc_set_mac_ctrl_frame_fwd = TOKEN_STRING_INITIALIZER(struct cmd_link_flow_ctrl_set_result, mac_ctrl_frame_fwd_mode, "on#off"); +cmdline_parse_token_string_t cmd_lfc_set_autoneg_str = + TOKEN_STRING_INITIALIZER(struct cmd_link_flow_ctrl_set_result, + autoneg_str, "autoneg"); +cmdline_parse_token_string_t cmd_lfc_set_autoneg = + TOKEN_STRING_INITIALIZER(struct cmd_link_flow_ctrl_set_result, + autoneg, "on#off"); cmdline_parse_token_num_t cmd_lfc_set_portid = TOKEN_NUM_INITIALIZER(struct cmd_link_flow_ctrl_set_result, port_id, UINT8); @@ -3902,7 +3911,7 @@ cmdline_parse_inst_t cmd_link_flow_control_set = { .data = NULL, .help_str = "Configure the Ethernet flow control: set flow_ctrl rx on|off \ tx on|off high_water low_water pause_time send_xon mac_ctrl_frame_fwd on|off \ -port_id", +autoneg on|off port_id", .tokens = { (void *)&cmd_lfc_set_set, (void *)&cmd_lfc_set_flow_ctrl, @@ -3916,6 +3925,8 @@ port_id", (void *)&cmd_lfc_set_send_xon, (void *)&cmd_lfc_set_mac_ctrl_frame_fwd_mode, (void *)&cmd_lfc_set_mac_ctrl_frame_fwd, + (void *)&cmd_lfc_set_autoneg_str, + (void *)&cmd_lfc_set_autoneg, (void *)&cmd_lfc_set_portid, NULL, }, -- 1.7.10.4