On Apr 22, 2013, at 1:30 PM, Doug Ledford <dledf...@redhat.com> wrote:

> However, for some reason I had it
> in my mind when I was reading the patch that it was against libibverbs.
> That's what I get for staying up late and reviewing when I'm tired :-/


There were other patches against libibverbs that were submitted at the same 
time.

That being said, I see two obvious ways to go forward, both of which have 
pros/cons:

1. Extend the enum ib_mtu to include new enum values for 1500 and 9000 -- 
probably with a different prefix to indicate that they're not IBTA-sanctioned 
values (note that this will also require corresponding changes in libibverbs, 
since MTU values get passed up from kernel to userspace).

PRO: fixes the immediate problem
PRO: probably the lowest impact solution; just adding some more enum values
CON: weird naming (IB_ and RDMA_ prefixes in the same ib_mtu enum; probably 
something similar in userspace)
CON: doesn't do anything to address other MTU values (e.g., what if someone has 
an MTU of 1498?)

2. Change all instances of ib_mtu/ibv_mtu to an int.  Code such as "switch(mtu) 
case IBV_MTU_1024: ..." will need to be updated to "switch(mtu) case 1024: ...".

PRO: solves the problem for all MTU values
PRO: eliminates the enum-to-int translation functions
CON: much driver code will need to be updated per above, and also update logic 
checking for out-of-bounds MTU calues
CON: similarly, userspace apps will need to be updated; it might be worthwhile 
to bump libibverbs to 2.x, and then intentionally change the MTU field names in 
ibv_port_attr and ibv_qp_attr so that apps using those fields will fail to 
compile with libibverbs 2.x (and therefore forcibly realize they need to adapt 
to the new int MTU values)

-- 
Jeff Squyres
jsquy...@cisco.com
For corporate legal information go to: 
http://www.cisco.com/web/about/doing_business/legal/cri/

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to