From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f65.google.com (mail-lf0-f65.google.com [209.85.215.65]) by dpdk.org (Postfix) with ESMTP id E12693237 for ; Thu, 30 Nov 2017 14:32:40 +0100 (CET) Received: by mail-lf0-f65.google.com with SMTP id e137so7913955lfg.5 for ; Thu, 30 Nov 2017 05:32:40 -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=+VeTSIpF5mPtCSbu3l9tN23TRKtaDyskcUvGtfFggr0=; b=E/vjC3z5IPiYSWY1kQSQh2E29XvR+7Qk3O96DP/xof8bpaaN1yYLsNNetWGbRHJJSC MW/J29cV8/aZ5VOBHOm4t4nILcAKsHHVYNvq029TnX5r9Z8zD98deI6gBhSP4Js1YgOe eCcTiag1JZ0Ybp5z1TpTR4zrywRJUeC63j0Am36rQ/z+rvdDLrLBv4zNtIp+TH0UIYFz P3dSTYdrPzZ8FomOuf1dGZe0hvXOahKNv4OGnqxQiRg8cSyYwSOu6BHbMKdkeQjMTYPd GqxwZ4y8wVtdNqcd9B7+MlCiAsTar4ZpVSdPdkwRpbjvypJA2nnMViOoXjyB0PWdEVWe iEBA== 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=+VeTSIpF5mPtCSbu3l9tN23TRKtaDyskcUvGtfFggr0=; b=iqypdyeNzfD0rJgQ46MS3t2lo++Ma3gHYE0uYQO6VNMmDllMPppev+VnwCtY7dv/Y2 xU3AdGWfTwEyz0VA5RK0perR7T3dCQ/yF9HNc3xvry7IQlfR65YTf7Th3E/Bny+KRX+t SMNheP9JroVO9VDunoZZ6xOMJ5rG92xizbBxarF5hLzAtruuzSt5jjEy/gh2y2Ybo6c2 W+Ky+sLO1PaLf7VDW6u8HF2sNj6GAvqp3NcU8pq//7QUZ9mCBPbY94t/22NfW8C6HxA1 UF6zOTpbU8TCctjcPz0Ku0v5HOF7jKw7QmULuSw8Lx/mY5fqWwCGCcMiibDlDppcjTe2 p7QQ== X-Gm-Message-State: AJaThX6lsOMEgZCg6Z+Nb3QoEGd4x5NqpGkLuFyS9DKr7khfxKHztYYR AjpIHlsmvbnx/UNdy2WPRJ6ppw91x4k= X-Google-Smtp-Source: AGs4zMZ57aZbhxDgZck6IiiYxuJaZ4qg9mXTgjbL1HYgK1Qkr/Un7gliMzg7t20n9e+dtewEBWZO/A== X-Received: by 10.46.89.129 with SMTP id g1mr3275357ljf.12.1512048760394; Thu, 30 Nov 2017 05:32:40 -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 x27sm717277lfb.23.2017.11.30.05.32.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 30 Nov 2017 05:32:39 -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: Thu, 30 Nov 2017 14:32:19 +0100 Message-Id: <1512048743-23749-4-git-send-email-tdu@semihalf.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512048743-23749-1-git-send-email-tdu@semihalf.com> References: <1512048743-23749-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: Thu, 30 Nov 2017 13:32:41 -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 e7703f7..89eec44 100644 --- a/drivers/net/mrvl/mrvl_ethdev.c +++ b/drivers/net/mrvl/mrvl_ethdev.c @@ -827,15 +827,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