From owner-svn-src-all@freebsd.org Mon Jun 6 09:05:07 2016 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 78B19B6DDFA; Mon, 6 Jun 2016 09:05:07 +0000 (UTC) (envelope-from arybchik@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 4B2641F10; Mon, 6 Jun 2016 09:05:07 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u56956W1046731; Mon, 6 Jun 2016 09:05:06 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u56956x0046730; Mon, 6 Jun 2016 09:05:06 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201606060905.u56956x0046730@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Mon, 6 Jun 2016 09:05:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301490 - head/sys/dev/sfxge 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.22 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: Mon, 06 Jun 2016 09:05:07 -0000 Author: arybchik Date: Mon Jun 6 09:05:06 2016 New Revision: 301490 URL: https://svnweb.freebsd.org/changeset/base/301490 Log: sfxge(4): get RSS key to be programmed into NIC from the kernel Submitted by: Ivan Malov Reviewed by: gnn Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D6719 Modified: head/sys/dev/sfxge/sfxge_rx.c Modified: head/sys/dev/sfxge/sfxge_rx.c ============================================================================== --- head/sys/dev/sfxge/sfxge_rx.c Mon Jun 6 09:04:20 2016 (r301489) +++ head/sys/dev/sfxge/sfxge_rx.c Mon Jun 6 09:05:06 2016 (r301490) @@ -34,6 +34,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_rss.h" + #include #include #include @@ -55,6 +57,10 @@ __FBSDID("$FreeBSD$"); #include +#ifdef RSS +#include +#endif + #include "common/efx.h" @@ -160,6 +166,9 @@ sfxge_rx_qflush_failed(struct sfxge_rxq rxq->flush_state = SFXGE_FLUSH_FAILED; } +#ifdef RSS +static uint8_t toep_key[RSS_KEYSIZE]; +#else static uint8_t toep_key[] = { 0x6d, 0x5a, 0x56, 0xda, 0x25, 0x5b, 0x0e, 0xc2, 0x41, 0x67, 0x25, 0x3d, 0x43, 0xa3, 0x8f, 0xb0, @@ -167,6 +176,7 @@ static uint8_t toep_key[] = { 0x77, 0xcb, 0x2d, 0xa3, 0x80, 0x30, 0xf2, 0x0c, 0x6a, 0x42, 0xb7, 0x3b, 0xbe, 0xac, 0x01, 0xfa }; +#endif static void sfxge_rx_post_refill(void *arg) @@ -1127,6 +1137,9 @@ sfxge_rx_start(struct sfxge_softc *sc) (1 << EFX_RX_HASH_IPV4) | (1 << EFX_RX_HASH_TCPIPV4) | (1 << EFX_RX_HASH_IPV6) | (1 << EFX_RX_HASH_TCPIPV6), B_TRUE); +#ifdef RSS + rss_getkey(toep_key); +#endif if ((rc = efx_rx_scale_key_set(sc->enp, toep_key, sizeof(toep_key))) != 0) goto fail;