From owner-svn-src-head@freebsd.org Wed Dec 23 01:31:34 2015 Return-Path: Delivered-To: svn-src-head@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 1C146A4F2B1; Wed, 23 Dec 2015 01:31:34 +0000 (UTC) (envelope-from davidcs@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 D42F01017; Wed, 23 Dec 2015 01:31:33 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tBN1VXNi030996; Wed, 23 Dec 2015 01:31:33 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tBN1VWnA030993; Wed, 23 Dec 2015 01:31:32 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201512230131.tBN1VWnA030993@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Wed, 23 Dec 2015 01:31:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r292638 - head/sys/dev/bxe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Dec 2015 01:31:34 -0000 Author: davidcs Date: Wed Dec 23 01:31:32 2015 New Revision: 292638 URL: https://svnweb.freebsd.org/changeset/base/292638 Log: Check for packet_length is greater than 60 bytes as well as packet_length is greater than len_on_bd, before invoking the routine to handle jumbo over SGL (bxe_service_rxsgl()). Add counters for number of jumbo_over_SGL packets (rx_bxe_service_rxsgl) and erroneous jumbo_over_SGL packets (rx_erroneous_jumbo_sge_pkts) Fix formatting in bxe_sysctl_state() MFC after:5 days Modified: head/sys/dev/bxe/bxe.c head/sys/dev/bxe/bxe_stats.c head/sys/dev/bxe/bxe_stats.h Modified: head/sys/dev/bxe/bxe.c ============================================================================== --- head/sys/dev/bxe/bxe.c Tue Dec 22 23:21:06 2015 (r292637) +++ head/sys/dev/bxe/bxe.c Wed Dec 23 01:31:32 2015 (r292638) @@ -472,6 +472,10 @@ static const struct { 4, STATS_FLAGS_FUNC, "rx_pkts"}, { STATS_OFFSET32(rx_tpa_pkts), 4, STATS_FLAGS_FUNC, "rx_tpa_pkts"}, + { STATS_OFFSET32(rx_erroneous_jumbo_sge_pkts), + 4, STATS_FLAGS_FUNC, "rx_erroneous_jumbo_sge_pkts"}, + { STATS_OFFSET32(rx_bxe_service_rxsgl), + 4, STATS_FLAGS_FUNC, "rx_bxe_service_rxsgl"}, { STATS_OFFSET32(rx_jumbo_sge_pkts), 4, STATS_FLAGS_FUNC, "rx_jumbo_sge_pkts"}, { STATS_OFFSET32(rx_soft_errors), @@ -585,6 +589,10 @@ static const struct { 4, "rx_pkts"}, { Q_STATS_OFFSET32(rx_tpa_pkts), 4, "rx_tpa_pkts"}, + { Q_STATS_OFFSET32(rx_erroneous_jumbo_sge_pkts), + 4, "rx_erroneous_jumbo_sge_pkts"}, + { Q_STATS_OFFSET32(rx_bxe_service_rxsgl), + 4, "rx_bxe_service_rxsgl"}, { Q_STATS_OFFSET32(rx_jumbo_sge_pkts), 4, "rx_jumbo_sge_pkts"}, { Q_STATS_OFFSET32(rx_soft_errors), @@ -3475,11 +3483,14 @@ bxe_rxeof(struct bxe_softc *sc, m_adj(m, pad); m->m_pkthdr.len = m->m_len = len; - if (len != lenonbd){ + if ((len > 60) && (len > lenonbd)) { + fp->eth_q_stats.rx_bxe_service_rxsgl++; rc = bxe_service_rxsgl(fp, len, lenonbd, m, cqe_fp); if (rc) break; fp->eth_q_stats.rx_jumbo_sge_pkts++; + } else if (lenonbd < len) { + fp->eth_q_stats.rx_erroneous_jumbo_sge_pkts++; } /* assign packet to this interface interface */ @@ -16122,12 +16133,12 @@ bxe_sysctl_state(SYSCTL_HANDLER_ARGS) } if (result == 1) { - uint32_t temp; + uint32_t temp; sc = (struct bxe_softc *)arg1; BLOGI(sc, "... dumping driver state ...\n"); - temp = SHMEM2_RD(sc, temperature_in_half_celsius); - BLOGI(sc, "\t Device Temperature = %d Celsius\n", (temp/2)); + temp = SHMEM2_RD(sc, temperature_in_half_celsius); + BLOGI(sc, "\t Device Temperature = %d Celsius\n", (temp/2)); } return (error); Modified: head/sys/dev/bxe/bxe_stats.c ============================================================================== --- head/sys/dev/bxe/bxe_stats.c Tue Dec 22 23:21:06 2015 (r292637) +++ head/sys/dev/bxe/bxe_stats.c Wed Dec 23 01:31:32 2015 (r292638) @@ -1227,6 +1227,8 @@ bxe_drv_stats_update(struct bxe_softc *s UPDATE_ESTAT_QSTAT(rx_calls); UPDATE_ESTAT_QSTAT(rx_pkts); UPDATE_ESTAT_QSTAT(rx_tpa_pkts); + UPDATE_ESTAT_QSTAT(rx_erroneous_jumbo_sge_pkts); + UPDATE_ESTAT_QSTAT(rx_bxe_service_rxsgl); UPDATE_ESTAT_QSTAT(rx_jumbo_sge_pkts); UPDATE_ESTAT_QSTAT(rx_soft_errors); UPDATE_ESTAT_QSTAT(rx_hw_csum_errors); Modified: head/sys/dev/bxe/bxe_stats.h ============================================================================== --- head/sys/dev/bxe/bxe_stats.h Tue Dec 22 23:21:06 2015 (r292637) +++ head/sys/dev/bxe/bxe_stats.h Wed Dec 23 01:31:32 2015 (r292638) @@ -218,6 +218,8 @@ struct bxe_eth_stats { uint32_t rx_calls; uint32_t rx_pkts; uint32_t rx_tpa_pkts; + uint32_t rx_erroneous_jumbo_sge_pkts; + uint32_t rx_bxe_service_rxsgl; uint32_t rx_jumbo_sge_pkts; uint32_t rx_soft_errors; uint32_t rx_hw_csum_errors; @@ -319,6 +321,8 @@ struct bxe_eth_q_stats { uint32_t rx_calls; uint32_t rx_pkts; uint32_t rx_tpa_pkts; + uint32_t rx_erroneous_jumbo_sge_pkts; + uint32_t rx_bxe_service_rxsgl; uint32_t rx_jumbo_sge_pkts; uint32_t rx_soft_errors; uint32_t rx_hw_csum_errors; @@ -413,6 +417,8 @@ struct bxe_eth_q_stats_old { uint32_t rx_calls_old; uint32_t rx_pkts_old; uint32_t rx_tpa_pkts_old; + uint32_t rx_erroneous_jumbo_sge_pkts_old; + uint32_t rx_bxe_service_rxsgl_old; uint32_t rx_jumbo_sge_pkts_old; uint32_t rx_soft_errors_old; uint32_t rx_hw_csum_errors_old;