[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <88B766C272F2C64B944B21AD078333151C961A10F5@EXMAIL.ad.emulex.com>
Date: Thu, 8 Mar 2012 22:16:13 -0800
From: <Parav.Pandit@...lex.Com>
To: <romieu@...zoreil.com>
CC: <netdev@...r.kernel.org>
Subject: RE: [RFC 2/2] be2net: Added functionality to support RoCE driver
Inline.
-----Original Message-----
From: Francois Romieu [mailto:romieu@...zoreil.com]
Sent: Friday, March 09, 2012 1:11 AM
To: Pandit, Parav
Cc: netdev@...r.kernel.org
Subject: Re: [RFC 2/2] be2net: Added functionality to support RoCE driver
Parav.Pandit@...lex.Com <Parav.Pandit@...lex.Com> :
> From: Francois Romieu [romieu@...zoreil.com]
[...]
> You can init the adequate operations set at dev_add / registration
> time so that the remaining be_roce_dev_xyz methods turn into noop for
> NIC without ROCE.
> [Parav] What do we gain by executing NO_OP function, where there is no need to do that?
We do not execute anything for NIC without ROCE.
For the ROCE case, it costs a new set of net_device_ops where the .open() and
.close() callbacks are different from the ones in be_netdev_ops. The former
.open() and .close() call into the latter. The current code does the opposite.
> What is the problem in performing this check and not executing those function? I find it more simpler and clean.
It is not a big problem. ROCE depends on NIC. The implementation exhibits a dependency in the opposite order.
> Also, add(), remove() etc operations are at driver level and not at device level. So with proposed implementation there is no need to store those 3 fn_pointers to device structure.
The functions pointers are already there. The driver .remove() handler can not be replaced but it can exchange the be_roce_supported() test for a !ocrdma_dev test. It should allow to remove if_type from be_adapter as it won't be used beyond .probe() (I only did a quick check).
It is up to you to weigh the net_device_ops cost. If more methods need to be modified for ROCE, the extra layer could be worth it. Your call.
[Parav] I understand your proposed design and benefit if we have more such differences with ROCE vs non ROCE NICs.
In near future those device_specific checks in either way doesn't differ much in either implementation. So I would like to keep it current way. When we add more features it will be more logical to adopt your newly proposed approach and use different netdev_ops structure.
I'll be addressing other review comments and one specifically to change void* to ocrdma_dev* with forward declaration.
Off for jogging.
--
Ueimor
--
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