[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9929d2390912071254v24eb6980s1b43cf2e6f86f1dc@mail.gmail.com>
Date: Mon, 7 Dec 2009 12:54:40 -0800
From: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
To: Neil Horman <nhorman@...driver.com>
Cc: netdev@...r.kernel.org, e1000-devel@...ts.sourceforge.net,
davem@...emloft.net, jesse.brandeburg@...el.com,
bruce.w.allan@...el.com, peter.p.waskiewicz.jr@...el.com,
john.ronciak@...el.com
Subject: Re: [PATCH 3/3] ixgb: increase skb size to prevent dma over skb
boundary
On Mon, Dec 7, 2009 at 06:49, Neil Horman <nhorman@...driver.com> wrote:
> Update xgb driver to not allow dma beyond the end of the allocated skb
>
> Signed-off-by: Neil Horman <nhorman@...driver.com>
>
> ixgb_main.c | 13 +++++++++----
> 1 file changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c
> index bcd0f01..2d8e699 100644
> --- a/drivers/net/ixgb/ixgb_main.c
> +++ b/drivers/net/ixgb/ixgb_main.c
> @@ -798,14 +798,19 @@ ixgb_setup_rctl(struct ixgb_adapter *adapter)
>
> rctl |= IXGB_RCTL_SECRC;
>
> - if (adapter->rx_buffer_len <= IXGB_RXBUFFER_2048)
> + if (adapter->rx_buffer_len <= IXGB_RXBUFFER_2048) {
> rctl |= IXGB_RCTL_BSIZE_2048;
> - else if (adapter->rx_buffer_len <= IXGB_RXBUFFER_4096)
> + adapter->rx_buffer_len = IXGB_RXBUFFER_2048;
> + } else if (adapter->rx_buffer_len <= IXGB_RXBUFFER_4096) {
> rctl |= IXGB_RCTL_BSIZE_4096;
> - else if (adapter->rx_buffer_len <= IXGB_RXBUFFER_8192)
> + adapter->rx_buffer_len = IXGB_RXBUFFER_4096;
> + } else if (adapter->rx_buffer_len <= IXGB_RXBUFFER_8192) {
> rctl |= IXGB_RCTL_BSIZE_8192;
> - else if (adapter->rx_buffer_len <= IXGB_RXBUFFER_16384)
> + adapter->rx_buffer_len = IXGB_RXBUFFER_8192;
> + } else if (adapter->rx_buffer_len <= IXGB_RXBUFFER_16384) {
> rctl |= IXGB_RCTL_BSIZE_16384;
> + adapter->rx_buffer_len = IXGB_RXBUFFER_16384;
> + }
>
> IXGB_WRITE_REG(&adapter->hw, RCTL, rctl);
> }
> --
I have added this patch to my queue of ixgb patches for
reveiw/testing. Upon successful review/testing I will submit to
Dave/netdev.
--
Cheers,
Jeff
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists