> @@ -2709,7 +2709,10 @@ static void dfx_rcv_init(DFX_board_t *bp
>                       struct sk_buff *newskb;
>                       bp->descr_block_virt->rcv_data[i+j].long_0 = (u32) 
>(PI_RCV_DESCR_M_SOP |
>                               ((PI_RCV_DATA_K_SIZE_MAX / PI_ALIGN_K_RCV_DATA_BUFF) 
><< PI_RCV_DESCR_V_SEG_LEN));
> -                     newskb = dev_alloc_skb(NEW_SKB_SIZE);
> +                     while (!(newskb = dev_alloc_skb(NEW_SKB_SIZE))) {
> +                             printk(KERN_WARNING "%s: Could not allocate receive 
>buffer.\n", bp->dev->name);
> +                             schedule();
> +                     }

Wouldn't it be cleaner to malloc the new buffer and if that fails drop the
just received frame and reuse that skbuff?

schedule definitely isnt going to help

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to