From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f68.google.com (mail-lf0-f68.google.com [209.85.215.68]) by dpdk.org (Postfix) with ESMTP id 374325A3E for ; Fri, 1 Dec 2017 16:20:09 +0100 (CET) Received: by mail-lf0-f68.google.com with SMTP id x20so12122058lff.1 for ; Fri, 01 Dec 2017 07:20:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=SqbIeGIReSIDvVPGnS+Bzothux5OU7Jr3FnyDzwdCoQ=; b=hTlv10QmqCzxJB2v4uBjhoZirUOxzmb3KTSHRxWi6EmqQP0fqyGP3xcTPMQ3Jys3pV rOsaU2fMGJvtxqUlObaTeOmIFKdrStTZ0bZOY1soQH2C8fj5pcV5fLuMUkx9HmkompIO kVereZa2LhMgUY23mx4GTfQ95f5XB+YWYV2QEWIcmJbdgLJqzTCgpnD2E4yOYja99Z9O hjqxRtojq0PCV2eQ58HmX/RprzO7xWwM2Ln7hLZxowcuUIARGa8AhCLMYq7u6KtZ7vcd Imn++aNqDJcOblfYMLNaxvMv5hn7/TRNMBvZHcBkZma1j5Ci4sZ30Scgi009SDb6IyQ5 E5eg== 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=SqbIeGIReSIDvVPGnS+Bzothux5OU7Jr3FnyDzwdCoQ=; b=bTuqtxTeYZ6PffDUxZqdi353VvCIKiByWEiyM6fSe1x2SCVc0DtFm4rNgUQuBg1JXi 2GUqlHrOAsB0qAchUzoMQ4MQVNoXFEO3SIJFki14lPkdO8vZIJaSAg6x4rBjIbe6gWOi gQxxbvNpeEmM4+bJbOt+AsW12m9o88SvgOdIyFllREVobN7SBgBfu6cYJHaSRqu6/j51 T2e+hWVZ+qhuiXe9/EtmAx37obA4/OaeLVtcObXy5Z1+eXJheSds0Pe8TxOMD+h8ghOH g7Bl8XR2PfD7fpLqlUsaWM4lJs5VjE+R+u1UUQbJMf1wNHuhIFOHgTXBNXIcXXKfWimK NXBA== X-Gm-Message-State: AJaThX42FDla6SP7HpxhWKn4ErKTo2xZtjqA7zU/hPPF3EdDPUNWcHBD spQw3xtJnISPl2Lb/FZJoGHBwN3QGvU= X-Google-Smtp-Source: AGs4zMZ7zGAWXCAhJ/KMM8agX/eOmjT1RN7xiOZdAxcfITwkyMx8KexrlcSk3jvURk9WiXV7xiBoBw== X-Received: by 10.46.101.74 with SMTP id z71mr5261372ljb.35.1512141608625; Fri, 01 Dec 2017 07:20:08 -0800 (PST) Received: from tdu.semihalf.local (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173]) by smtp.gmail.com with ESMTPSA id j1sm1177674lfe.66.2017.12.01.07.20.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 01 Dec 2017 07:20:07 -0800 (PST) From: Tomasz Duszynski To: dev@dpdk.org Cc: mw@semihalf.com, jck@semihalf.com, dima@marvell.com, nsamsono@marvell.com, jianbo.liu@arm.com, Tomasz Duszynski Date: Fri, 1 Dec 2017 16:19:48 +0100 Message-Id: <1512141592-16695-4-git-send-email-tdu@semihalf.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512141592-16695-1-git-send-email-tdu@semihalf.com> References: <1512048743-23749-1-git-send-email-tdu@semihalf.com> <1512141592-16695-1-git-send-email-tdu@semihalf.com> Subject: [dpdk-dev] [PATCH 3/7] net/mrvl: do not enable port after setting MAC address 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: Fri, 01 Dec 2017 15:20:09 -0000 Setting enabled port's mac address caused it to stop receiving packets. Now as that issue is fixed in library renabling port is no longer necessary. Signed-off-by: Tomasz Duszynski --- drivers/net/mrvl/mrvl_ethdev.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/net/mrvl/mrvl_ethdev.c b/drivers/net/mrvl/mrvl_ethdev.c index 47f12b8..c44a2bc 100644 --- a/drivers/net/mrvl/mrvl_ethdev.c +++ b/drivers/net/mrvl/mrvl_ethdev.c @@ -822,15 +822,14 @@ static void mrvl_mac_addr_set(struct rte_eth_dev *dev, struct ether_addr *mac_addr) { struct mrvl_priv *priv = dev->data->dev_private; + int ret; - pp2_ppio_set_mac_addr(priv->ppio, mac_addr->addr_bytes); - /* - * TODO - * Port stops sending packets if pp2_ppio_set_mac_addr() - * was called after pp2_ppio_enable(). As a quick fix issue - * enable port once again. - */ - pp2_ppio_enable(priv->ppio); + ret = pp2_ppio_set_mac_addr(priv->ppio, mac_addr->addr_bytes); + if (ret) { + char buf[ETHER_ADDR_FMT_SIZE]; + ether_format_addr(buf, sizeof(buf), mac_addr); + RTE_LOG(ERR, PMD, "Failed to set mac to %s\n", buf); + } } /** -- 2.7.4