All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sinan Kaya <okaya-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
To: eranlinuxmellanox-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Cc: Christoph Hellwig <hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	timur-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
	cov-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
	Yishai Hadas <yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH V2] net: ethernet: mellanox: correct page conversion
Date: Wed, 20 Apr 2016 09:38:43 -0400	[thread overview]
Message-ID: <57178663.4050503@codeaurora.org> (raw)
In-Reply-To: <571785A5.5040306-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>

Apologies,

Replied to an older post by mistake. I was trying to reply to Eran.

>Hi Sinan,
>
>We are working in Mellanox for a solution which
>removes the vmap call and allocate contiguous memory (using dma_alloc_coherent).
>
>Thanks,
>Eran
>
>
>On 4/20/2016 9:35 AM, Sinan Kaya wrote:
> On 4/19/2016 2:22 PM, Christoph Hellwig wrote:
>> What I think we need is something like the patch below.  In the long
>> ru nwe should also kill the mlx4_buf structure which now is pretty
>> pointless.
>>
> 

It is been 1.5 years since I reported the problem. We came up with three
different solutions this week. I'd like to see a version of the solution
to get merged until Mellanox comes up with a better solution with another
patch. My proposal is to use this one.

> 
> -- a/drivers/net/ethernet/mellanox/mlx4/alloc.c
> +++ b/drivers/net/ethernet/mellanox/mlx4/alloc.c
> @@ -588,7 +588,7 @@ int mlx4_buf_alloc(struct mlx4_dev *dev, int size, int max_direct,
>  {
>         dma_addr_t t;
> 
> -       if (size <= max_direct) {
> +       if ((size <= max_direct) || (BITS_PER_LONG == 64)){
>                 buf->nbufs        = 1;
>                 buf->npages       = 1;
>                 buf->page_shift   = get_order(size) + PAGE_SHIFT;
> 
> Of course, this is assuming that you are not ready to submit your patch yet. If you 
> are, feel free to post.
> 


-- 
Sinan Kaya
Qualcomm Technologies, Inc. on behalf of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: Sinan Kaya <okaya@codeaurora.org>
To: eranlinuxmellanox@gmail.com
Cc: Christoph Hellwig <hch@infradead.org>,
	linux-rdma@vger.kernel.org, timur@codeaurora.org,
	cov@codeaurora.org, Yishai Hadas <yishaih@mellanox.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH V2] net: ethernet: mellanox: correct page conversion
Date: Wed, 20 Apr 2016 09:38:43 -0400	[thread overview]
Message-ID: <57178663.4050503@codeaurora.org> (raw)
In-Reply-To: <571785A5.5040306@codeaurora.org>

Apologies,

Replied to an older post by mistake. I was trying to reply to Eran.

>Hi Sinan,
>
>We are working in Mellanox for a solution which
>removes the vmap call and allocate contiguous memory (using dma_alloc_coherent).
>
>Thanks,
>Eran
>
>
>On 4/20/2016 9:35 AM, Sinan Kaya wrote:
> On 4/19/2016 2:22 PM, Christoph Hellwig wrote:
>> What I think we need is something like the patch below.  In the long
>> ru nwe should also kill the mlx4_buf structure which now is pretty
>> pointless.
>>
> 

It is been 1.5 years since I reported the problem. We came up with three
different solutions this week. I'd like to see a version of the solution
to get merged until Mellanox comes up with a better solution with another
patch. My proposal is to use this one.

> 
> -- a/drivers/net/ethernet/mellanox/mlx4/alloc.c
> +++ b/drivers/net/ethernet/mellanox/mlx4/alloc.c
> @@ -588,7 +588,7 @@ int mlx4_buf_alloc(struct mlx4_dev *dev, int size, int max_direct,
>  {
>         dma_addr_t t;
> 
> -       if (size <= max_direct) {
> +       if ((size <= max_direct) || (BITS_PER_LONG == 64)){
>                 buf->nbufs        = 1;
>                 buf->npages       = 1;
>                 buf->page_shift   = get_order(size) + PAGE_SHIFT;
> 
> Of course, this is assuming that you are not ready to submit your patch yet. If you 
> are, feel free to post.
> 


-- 
Sinan Kaya
Qualcomm Technologies, Inc. on behalf of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

  parent reply	other threads:[~2016-04-20 13:38 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-16 22:23 [PATCH V2] net: ethernet: mellanox: correct page conversion Sinan Kaya
2016-04-18  6:54 ` Eli Cohen
2016-04-18 13:53   ` Sinan Kaya
2016-04-18 14:05     ` Eli Cohen
2016-04-18 14:32   ` Christoph Hellwig
2016-04-18 14:39     ` Eli Cohen
     [not found]       ` <DB5PR05MB1848424EC9DC8D4150EADB03C56B0-8IvNv+8VlcDdorXcTtKhldqRiQSDpxhJvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2016-04-18 15:17         ` Christoph Hellwig
2016-04-18 15:17           ` Christoph Hellwig
     [not found]           ` <20160418151702.GA26565-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2016-04-18 15:21             ` Sinan Kaya
2016-04-18 15:21               ` Sinan Kaya
     [not found]               ` <5714FB68.3020604-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2016-04-18 15:40                 ` Christoph Hellwig
2016-04-18 15:40                   ` Christoph Hellwig
2016-04-18 17:47                   ` Sinan Kaya
2016-04-19  7:50                   ` Sinan Kaya
     [not found] ` <1460845412-13120-1-git-send-email-okaya-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2016-04-18  4:00   ` David Miller
2016-04-18  4:00     ` David Miller
2016-04-18  5:06     ` okaya
     [not found]       ` <87c17d3f979cf0167cd37077f39d0534-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2016-04-18 15:59         ` David Miller
2016-04-18 15:59           ` David Miller
     [not found]           ` <20160418.115902.1053705461620271779.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2016-04-18 16:06             ` Sinan Kaya
2016-04-18 16:06               ` Sinan Kaya
2016-04-18 12:12   ` Christoph Hellwig
2016-04-18 12:12     ` Christoph Hellwig
2016-04-18 13:06     ` okaya
2016-04-18 13:10       ` Christoph Hellwig
2016-04-18 13:49         ` Sinan Kaya
2016-04-18 13:59           ` Christoph Hellwig
     [not found]           ` <5714E5D6.7050600-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2016-04-18 15:15             ` Timur Tabi
2016-04-18 15:15               ` Timur Tabi
     [not found]               ` <5714FA2C.4030209-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2016-04-18 15:22                 ` Sinan Kaya
2016-04-18 15:22                   ` Sinan Kaya
2016-04-19 18:22   ` Christoph Hellwig
2016-04-19 18:22     ` Christoph Hellwig
2016-04-19 18:37     ` Sinan Kaya
2016-04-20 11:08       ` Eran Ben Elisha
     [not found]     ` <20160419182212.GA8441-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2016-04-20 13:35       ` Sinan Kaya
2016-04-20 13:35         ` Sinan Kaya
     [not found]         ` <571785A5.5040306-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2016-04-20 13:38           ` Sinan Kaya [this message]
2016-04-20 13:38             ` Sinan Kaya
     [not found]             ` <57178663.4050503-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2016-04-20 13:41               ` Timur Tabi
2016-04-20 13:41                 ` Timur Tabi
2016-04-20 18:40           ` Eran Ben Elisha
2016-04-20 18:40             ` Eran Ben Elisha
     [not found]             ` <CAKHjkjmYNLABO10V1DZQmZ_zczjbfDZU0TDPHoMmv_1FMi9_gA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-04-20 18:42               ` Sinan Kaya
2016-04-20 18:42                 ` Sinan Kaya
2016-04-21 13:37               ` Or Gerlitz
2016-04-21 13:39                 ` Christoph Hellwig
     [not found]                   ` <20160421133903.GA19633-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2016-04-21 13:45                     ` Or Gerlitz
2016-04-25 13:47                   ` Eran Ben Elisha

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=57178663.4050503@codeaurora.org \
    --to=okaya-sgv2jx0feol9jmxxk+q4oq@public.gmane.org \
    --cc=cov-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=eranlinuxmellanox-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=timur-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.