From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f67.google.com (mail-lf0-f67.google.com [209.85.215.67]) by dpdk.org (Postfix) with ESMTP id 834567D19 for ; Tue, 5 Dec 2017 10:39:39 +0100 (CET) Received: by mail-lf0-f67.google.com with SMTP id x20so22489794lff.1 for ; Tue, 05 Dec 2017 01:39:39 -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=Kd0jUnKkiL9uYhELFNvcOuw7TwO4rp/clQZH7coXdqM=; b=DWiLQJLxCLvk+WjduTVyctyk6KzBLGfFSb3Kc8TNBG+vP7++alKSYDUs9Me0Z/xjqg GAJr2q5Qb5k+x5tzUO7qMD9SA95i/R+EDMCWqF4dzmYMZvdhUxkvoUX/xA6vnIZwUxti faTjH8wEfIVQ14oz1fzh1HepihzSxb77jjjjF1KCXVAn2HYIbqXUhPgi3XuiEz5B/a0n ouwRsQ7kRSW0k82u2kp9A/xsjqblv0zO+ea1C8/e/Rt9ZBs6w5rXxiZ/RCXbO9BC13B5 2O6uK2tP6zMoqDy0q4kKm/2LPZDcj5Tw44EspCySSESbXgdpFihLqkJb8Rd2N/d4+POp qLeA== 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=Kd0jUnKkiL9uYhELFNvcOuw7TwO4rp/clQZH7coXdqM=; b=rz4ArTQUFNx/hvlqRYdqB3WFS6ygKpIUOO7GuXQ3Ge7NFFd5WezlEG9R94xFxIg1Lt vQLZEJQgb+gBKpw/XehH5vKf6znx6vTQ3SaETNEUg6zU9Ag6pfW/SI4ZlRLtapnUHweK DHVJXUqVjhwvdDi4vyjeD8V0hJbV4nYa8obdXmsyIhVGFfwhH5LBiPgMmsV1YW6ZMyS7 n/J275mk95MBXcimnf0baLaD8Etbjb6xPfXiZwNAY5ssUciJodAppB3OJoIDq5Wj0hwu 8HlB3000gVbYXmiQw6xmolVyifj/hBBG2Bci8bef6yhPdeZG0ZDQjTYACs4iYbUa3XMk lIxw== X-Gm-Message-State: AJaThX4N2tHpJ4b0/VwutpVGMULHbSubRToWq7C1Uzn/YBVpWgSCcGKN MxQX+Hqux+cTZXZ40+2g3egBu1mac5I= X-Google-Smtp-Source: AGs4zMasJHyggtzbFuaOe5S5IKJ9tMqmg0k3j4MZoR0AsVL2OYlvgSMWJ/Z/RokKO1VtWfAou70aKw== X-Received: by 10.46.25.217 with SMTP id 86mr10485626ljz.145.1512466778982; Tue, 05 Dec 2017 01:39:38 -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 p5sm3334975ljc.7.2017.12.05.01.39.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 05 Dec 2017 01:39:38 -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: Tue, 5 Dec 2017 10:39:18 +0100 Message-Id: <1512466762-1982-4-git-send-email-tdu@semihalf.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512466762-1982-1-git-send-email-tdu@semihalf.com> References: <1512141592-16695-1-git-send-email-tdu@semihalf.com> <1512466762-1982-1-git-send-email-tdu@semihalf.com> Subject: [dpdk-dev] [PATCH v3 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: Tue, 05 Dec 2017 09:39:39 -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 Acked-by: Jianbo Liu --- 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