Re: [patch v2 32/37] add rxe_net.h
From: Bart Van Assche <hidden>
Date: 2011-08-07 08:51:11
On Sun, Jul 24, 2011 at 9:43 PM, [off-list ref] wrote:
+/* + * this should be defined in .../include/linux/if_ether.h + */ +#define ETH_P_RXE (0x8915) + +/* + * this should be defined in .../include/linux/netfilter.h + * to a specific value + */ +#define NFPROTO_RXE (0) + +/* + * these should be defined in .../include/linux/netfilter_rxe.h + */ +#define NF_RXE_IN (0) +#define NF_RXE_OUT (1)
Please update the cited header files instead of adding these symbols here.
+/* Should probably move to something other than an array...these can be big */ +#define RXE_MAX_IF_INDEX (384)
Has it been considered to change net_info[] from an array into a linked list ? As far as I can see none of the net_info[] accesses are in the fast path and the number of entries used in the (sparse) net_info[] array is small. Such a change would allow to eliminate the RXE_MAX_IF_INDEX artificial limit.
+struct rxe_net_info {
+ struct rxe_dev *rxe;
+ u8 port;
+ struct net_device *ndev;
+ int status;
+};Is there a reason why status and port are in struct rxe_net_info instead of struct rxe_dev ? Moving these two fields would allow several code simplifications IMHO. Bart. -- 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