From patchwork Mon Jul 9 17:14:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Lucero X-Patchwork-Id: 42638 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7D8315F3B; Mon, 9 Jul 2018 19:15:09 +0200 (CEST) Received: from netronome.com (host-79-78-33-110.static.as9105.net [79.78.33.110]) by dpdk.org (Postfix) with ESMTP id DCF375F2B; Mon, 9 Jul 2018 19:15:07 +0200 (CEST) Received: from netronome.com (localhost [127.0.0.1]) by netronome.com (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id w69HEw7i001931; Mon, 9 Jul 2018 18:14:58 +0100 Received: (from alucero@localhost) by netronome.com (8.14.4/8.14.4/Submit) id w69HEwTS001930; Mon, 9 Jul 2018 18:14:58 +0100 From: Alejandro Lucero To: dev@dpdk.org Cc: stable@dpdk.org Date: Mon, 9 Jul 2018 18:14:54 +0100 Message-Id: <1531156496-1702-1-git-send-email-alejandro.lucero@netronome.com> X-Mailer: git-send-email 1.9.1 Subject: [dpdk-dev] [PATCH 0/2] support MAC changes when no live changes allowed 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This is a patched to fix a functionality coming with the first public release: changing/setting MAC address. The original patch assumes all NICs can safely change or set the MAC in any case. However, this is not always true. NFP depends on the firmware capabilities and this is not always supported. There are other NICs with this same limitation, although, as far as I know, not in DPDK. Linux kernel has a IFF_LIVE_ADDR_CHANGE flag and two NICs are checking this flag for allowing or not live MAC changes. The flag proposed in this patch is just the opposite: advertise if live change not supported and assuming it is supported other way. Although most NICs support rte_eth_dev_default_mac_addr_set and this function returns and error when live change is not supported, note that this function is invoked during port start but the value returned is not checked. It is likely this is good enough for most of the cases, but bonding is relying on this start then mac set/change, and a PMD ports is not properly configured for being used as an slave port in some bonding modes.