From owner-svn-src-all@freebsd.org Wed Mar 8 09:53:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B7A4D02F9C; Wed, 8 Mar 2017 09:53:21 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3F69E1F40; Wed, 8 Mar 2017 09:53:21 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v289rKah071250; Wed, 8 Mar 2017 09:53:20 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v289rKo6071249; Wed, 8 Mar 2017 09:53:20 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201703080953.v289rKo6071249@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 8 Mar 2017 09:53:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314904 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Mar 2017 09:53:21 -0000 Author: hselasky Date: Wed Mar 8 09:53:20 2017 New Revision: 314904 URL: https://svnweb.freebsd.org/changeset/base/314904 Log: Implement eth_zero_addr() in the LinuxKPI. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/etherdevice.h Modified: head/sys/compat/linuxkpi/common/include/linux/etherdevice.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/etherdevice.h Wed Mar 8 08:57:35 2017 (r314903) +++ head/sys/compat/linuxkpi/common/include/linux/etherdevice.h Wed Mar 8 09:53:20 2017 (r314904) @@ -100,6 +100,12 @@ eth_broadcast_addr(u8 *pa) } static inline void +eth_zero_addr(u8 *pa) +{ + memset(pa, 0, 6); +} + +static inline void random_ether_addr(u8 * dst) { if (read_random(dst, 6) == 0)