From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f174.google.com (mail-pf0-f174.google.com [209.85.192.174]) by dpdk.org (Postfix) with ESMTP id E055E93B0 for ; Tue, 5 Jan 2016 17:32:05 +0100 (CET) Received: by mail-pf0-f174.google.com with SMTP id 65so177636091pff.3 for ; Tue, 05 Jan 2016 08:32:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=eg34lM1sEYf4tLwg7ykXXwV4w7o5DaneNtUbO8xAYPo=; b=RjRT5ZuEpoI6d7YOpatKQ4WLmyvYLrOFz5q4mKqDNGKmMmSsuEAQmj0I51IQ6q9tY1 3IJwVaDsuMUM20HRcAKEQU6W/xIDzWvBD+Q0/GW9VcTeA1Vlk+KH8WNjXPHIQKO+i68b TQuLM0Q8viKg+8QXFVlsWd7L0JDiRkzciY9ivmmdUkJNz3xbP9/dONFcnxeiFAAIyZpI qJtL0PHUomCXhK0TXm1Phydq56lH/lIn0em7WlWpT+Jm2Lr69DmAQXuUY055pac4JS9d V5//5DmZ5hUxnHUjAQqydqZA8riHa4xAi/r6NLKcaIU6gRIW7G5GLUVvbYevfiS7UZd+ VeTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=eg34lM1sEYf4tLwg7ykXXwV4w7o5DaneNtUbO8xAYPo=; b=PMSROcwBwT8u5jnUvjZcsLK4hXH7NFYgAAc9t4zOQr+Dcnxxok5KRVEPN7ez0O19fh 1SYNPysPr6M6wyWSBBbZCNSoojgiG3xlW2L5oathLGvoB4Qx6OehcfdFSdSKfNuDiCXC /CI30Q1zw0cX5GeEn6GiPna55B/PMahjRHx3ixFyeNEQCjIrCjUmkbdbmhlZFuUKzFcZ RV2DF6BLhRBQ0IwabdJESY2HkV/cFedA8wks18GxLKHt1RB/IGhfoR0DAzjQh7xOyyvA bD5sMuPPUQ+varmk6qui3/Su67Bv7iWTRe8vQhSg5z4qweeVkKr6SxLMdUkb18T7xgB6 W85w== X-Gm-Message-State: ALoCoQmKDTWSZw/xXlldApGw2Qi2cmTVNm+MRNDl0wkLwCbtRkCZIVkGy0meC3vjuUkvaMRhFK/t3TcUf7WDM2DgqtfQMBtZTw== X-Received: by 10.98.71.1 with SMTP id u1mr135074339pfa.139.1452011525225; Tue, 05 Jan 2016 08:32:05 -0800 (PST) Received: from xeon-e3.home.lan (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by smtp.gmail.com with ESMTPSA id y26sm62586136pfi.89.2016.01.05.08.32.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 05 Jan 2016 08:32:04 -0800 (PST) From: Stephen Hemminger To: sony.chacko@qlogic.com, harish.patil@qlogic.com, rasesh.mody@qlogic.com Date: Tue, 5 Jan 2016 08:32:00 -0800 Message-Id: <1452011520-8435-1-git-send-email-stephen@networkplumber.org> X-Mailer: git-send-email 2.1.4 Cc: dev@dpdk.org Subject: [dpdk-dev] [PATCH] bnx2x: remove unused mbuf_alloc_size X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2016 16:32:06 -0000 The mbuf_alloc_size is leftover from BSD or some other code base. It is set but never used in DPDK driver. After that the related defines can also be eliminated. Signed-off-by: Stephen Hemminger --- drivers/net/bnx2x/bnx2x.c | 9 --------- drivers/net/bnx2x/bnx2x.h | 18 ------------------ 2 files changed, 27 deletions(-) diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c index 67af5da..6ba6f44 100644 --- a/drivers/net/bnx2x/bnx2x.c +++ b/drivers/net/bnx2x/bnx2x.c @@ -2331,15 +2331,6 @@ static void bnx2x_set_fp_rx_buf_size(struct bnx2x_softc *sc) /* get the Rx buffer size for RX frames */ sc->fp[i].rx_buf_size = (IP_HEADER_ALIGNMENT_PADDING + ETH_OVERHEAD + sc->mtu); - - /* get the mbuf allocation size for RX frames */ - if (sc->fp[i].rx_buf_size <= MCLBYTES) { - sc->fp[i].mbuf_alloc_size = MCLBYTES; - } else if (sc->fp[i].rx_buf_size <= BNX2X_PAGE_SIZE) { - sc->fp[i].mbuf_alloc_size = PAGE_SIZE; - } else { - sc->fp[i].mbuf_alloc_size = MJUM9BYTES; - } } } diff --git a/drivers/net/bnx2x/bnx2x.h b/drivers/net/bnx2x/bnx2x.h index 2abab0c..9682b8d 100644 --- a/drivers/net/bnx2x/bnx2x.h +++ b/drivers/net/bnx2x/bnx2x.h @@ -151,23 +151,6 @@ struct bnx2x_device_type { #define FW_PREFETCH_CNT 16U #define DROPLESS_FC_HEADROOM 100 -#ifndef MCLSHIFT -#define MCLSHIFT 11 -#endif -#define MCLBYTES (1 << MCLSHIFT) - -#if !defined(MJUMPAGESIZE) -#if BNX2X_PAGE_SIZE < 2048 -#define MJUMPAGESIZE MCLBYTES -#elif BNX2X_PAGE_SIZE <= 8192 -#define MJUMPAGESIZE BNX2X_PAGE_SIZE -#else -#define MJUMPAGESIZE (8 * 1024) -#endif -#endif -#define MJUM9BYTES (9 * 1024) -#define MJUM16BYTES (16 * 1024) - /* * Transmit Buffer Descriptor (tx_bd) definitions* */ @@ -402,7 +385,6 @@ struct bnx2x_fastpath { uint8_t fw_sb_id; /* status block number in FW */ uint32_t rx_buf_size; - int mbuf_alloc_size; int state; #define BNX2X_FP_STATE_CLOSED 0x01 -- 2.1.4