DPDK patches and discussions
 help / color / mirror / Atom feed
From: Harish Patil <harish.patil@qlogic.com>
To: Stephen Hemminger <stephen@networkplumber.org>,
	Sony Chacko <sony.chacko@qlogic.com>,
	Rasesh Mody <rasesh.mody@qlogic.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] bnx2x: remove unused mbuf_alloc_size
Date: Tue, 5 Jan 2016 16:53:28 +0000	[thread overview]
Message-ID: <D2B134D0.116A74%harish.patil@qlogic.com> (raw)
In-Reply-To: <1452011520-8435-1-git-send-email-stephen@networkplumber.org>

>
>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 <stephen@networkplumber.org>
>---
> 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
>
>

Acked-by: Harish Patil <harish.patil@qlogic.com>


Thanks,
Harish


________________________________

This message and any attached documents contain information from the sending company or its parent company(s), subsidiaries, divisions or branch offices that may be confidential. If you are not the intended recipient, you may not read, copy, distribute, or use this information. If you have received this transmission in error, please notify the sender immediately by reply e-mail and then delete this message.

  reply	other threads:[~2016-01-05 16:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-05 16:32 Stephen Hemminger
2016-01-05 16:53 ` Harish Patil [this message]
2016-02-08 14:27   ` Bruce Richardson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D2B134D0.116A74%harish.patil@qlogic.com \
    --to=harish.patil@qlogic.com \
    --cc=dev@dpdk.org \
    --cc=rasesh.mody@qlogic.com \
    --cc=sony.chacko@qlogic.com \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).