* IP over Infiniband
*/
-/** IPoIB MTU */
-#define IPOIB_MTU 2048
-
/** Number of IPoIB data send work queue entries */
#define IPOIB_DATA_NUM_SEND_WQES 2
int rc;
while ( qset->recv_fill < qset->recv_max_fill ) {
- iobuf = alloc_iob ( IPOIB_MTU );
+ iobuf = alloc_iob ( IPOIB_PKT_LEN );
if ( ! iobuf )
break;
if ( ( rc = ib_post_recv ( ibdev, qset->qp, iobuf ) ) != 0 ) {
#include <stdint.h>
#include <gpxe/netdevice.h>
+#include <gpxe/if_ether.h>
extern struct ll_protocol ethernet_protocol;
netdev = alloc_netdev ( priv_size );
if ( netdev ) {
netdev->ll_protocol = ðernet_protocol;
+ netdev->max_pkt_len = ETH_FRAME_LEN;
}
return netdev;
}
#include <gpxe/infiniband.h>
+/** IPoIB packet length */
+#define IPOIB_PKT_LEN 2048
+
/** IPoIB MAC address length */
#define IPOIB_ALEN 20
netdev = alloc_netdev ( priv_size );
if ( netdev ) {
netdev->ll_protocol = &ipoib_protocol;
+ netdev->max_pkt_len = IPOIB_PKT_LEN;
}
return netdev;
}
* This is the bitwise-OR of zero or more NETDEV_XXX constants.
*/
unsigned int state;
+ /** Maximum packet length
+ *
+ * This length includes any link-layer headers.
+ */
+ size_t max_pkt_len;
/** TX packet queue */
struct list_head tx_queue;
/** RX packet queue */