From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <3chas3@gmail.com> Received: from mail-qt0-f196.google.com (mail-qt0-f196.google.com [209.85.216.196]) by dpdk.org (Postfix) with ESMTP id 4FAAC1B3A2 for ; Mon, 6 Aug 2018 22:06:12 +0200 (CEST) Received: by mail-qt0-f196.google.com with SMTP id w26-v6so2727114qto.5 for ; Mon, 06 Aug 2018 13:06:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=W9+HoaBkqvAcyGyW8aKqrZlJWqBzM8pnml99AF2b1zE=; b=TKag+zSuKUMlT59Du72SSyLp1U1zCfraLJ6KQxdwy9rDcgTvUhGk7ekeku7dJkE+Z4 ggp71nveyfqSAAGPJDgBtT7FJet7ZyHTUY1U/wVW6N0PGJId0aCyhI4FU6I927U5cJru Hx8iaYnxj6M7+ILJpzCB8XsUi/wuegKw+xcqwjhAwvgqDuYWS9P9YbuNGsTD5FItRPN4 sovuCuvucUUtEb+iepS++i1R51eCmFDjUnPDaAvUNInyHyImwAptQyN/M70kHUwD/fVq 1ISgFQgDq/cc450pfP2XoNlYYXmhEtBWXjCa61pBqH3MHffEbVdy+uZbNVAgUC+1KDNu yOkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=W9+HoaBkqvAcyGyW8aKqrZlJWqBzM8pnml99AF2b1zE=; b=rDweVKVb2Ku3fPabJbDPVO7/wbjRy9KkQ/qy78A+3O5l7gJiUFHOQWMxQgxdqBwcdj P1uzKTaewomlpimFLwoICXBHNxspcfbcXIYMJQTL1qHBJAkDix/ugXtu6QS50lJqQhyN 13Mvn04EJvp6Iy8vCeYsVUyGSxPlDTL2y8WzqjzzRQaaUEaYn8emyGcQZq7dXYXRueLH cHxut2BA/3+HeIgdjcpVmmRt6N8hqP7KMEcMiwdBsT5fgLn4AeyKpOK6btR0BFAUMZ0K e8B1aYTbZkYx/MDBISAftst4rVTKL0XC92xu7iXECgPI5espdTIz698TwKlXyr00eyag rZOw== X-Gm-Message-State: AOUpUlF5D50vWKzcaRE9DQPAQkqJnevD3lwGWtRhnVj5bjjQ4vZGwVXN 2dH2IGlwT5HVtye2B9jQPgA4Al74 X-Google-Smtp-Source: AAOMgpdynctjGUhQrkjXXIsnrLGeabfX8I16wkLN3M4cSQWMiodievHLx4PlRXqP5lGy0FawCQlOCA== X-Received: by 2002:ac8:30cd:: with SMTP id w13-v6mr15091644qta.247.1533585971553; Mon, 06 Aug 2018 13:06:11 -0700 (PDT) Received: from monolith.fios-router.home (pool-173-79-169-217.washdc.fios.verizon.net. [173.79.169.217]) by smtp.gmail.com with ESMTPSA id r27-v6sm12771752qkr.17.2018.08.06.13.06.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 06 Aug 2018 13:06:11 -0700 (PDT) From: Chas Williams <3chas3@gmail.com> To: dev@dpdk.org Cc: beilei.xing@intel.com, qi.z.zhang@intel.com, "Charles (Chas) Williams" Date: Mon, 6 Aug 2018 16:05:45 -0400 Message-Id: <20180806200545.32226-1-3chas3@gmail.com> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180801040712.13792-1-3chas3@gmail.com> References: <20180801040712.13792-1-3chas3@gmail.com> Subject: [dpdk-dev] [PATCH v2] net/i40e: stop lldp before setting local lldp MIB X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Aug 2018 20:06:12 -0000 From: "Charles (Chas) Williams" >>From the Intel Ethernet Controller X710/XXV710/XL710 Specifiction Update: Starting from NVM 5.02, if the Set Local LLDP MIB command is received while the DCBx specific agent is stopped, the command returns an EPERM error. If the command is received while the LLDP agent is stopped, it sets the local MIB without exchanging LLDP with peer, and returns SUCCESS. This results in the harmless, but annoying, diagnostic: default dcb config fails. err = -53, aq_err = 1. So, if possible (older firmwares cannot safely stop LLDP), stop the lldp daemon when we are in software mod before we attempt to call i40e_set_dcb_config. Signed-off-by: Chas Williams --- drivers/net/i40e/i40e_ethdev.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index a340540ef..de3761933 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -11232,6 +11232,16 @@ i40e_dcb_init_configure(struct rte_eth_dev *dev, bool sw_dcb) * LLDP MIB change event. */ if (sw_dcb == TRUE) { + /* When using NVM 6.01 or later, the RX data path does + * not hang if the FW LLDP is stopped. + */ + if (((hw->nvm.version >> 12) & 0xf) >= 6 && + ((hw->nvm.version >> 4) & 0xff) >= 1) { + ret = i40e_aq_stop_lldp(hw, TRUE, NULL); + if (ret != I40E_SUCCESS) + PMD_INIT_LOG(DEBUG, "Failed to stop lldp"); + } + ret = i40e_init_dcb(hw); /* If lldp agent is stopped, the return value from * i40e_init_dcb we expect is failure with I40E_AQ_RC_EPERM -- 2.14.4