Re: [PATCH net-next RFC] Generic XDP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Andrew Lunn <andrew@xxxxxxx>
Date: Sun, 9 Apr 2017 15:46:55 +0200

>> +	switch (act) {
>> +	case XDP_PASS:
>> +	case XDP_TX:
>> +		break;
>> +
>> +	default:
>> +		bpf_warn_invalid_xdp_action(act);
> 
> Hi David
> 
> You might want to put a /* fall through */ comment here, just to
> prevent newbies from submitting patches moving the default clause to
> the end.

Probably need two, ala:

	default:
		bpf_warn_invalid_xdp_action(act);
		/* fall through */
	case XDP_ABORTED:
		trace_xdp_exception(skb->dev, xdp_prog, act);
		/* fall through */
	case XDP_DROP:
	do_drop:
		kfree_skb(skb);
		break;

So that's what I've done.

Thanks!



[Index of Archives]     [Linux Networking Development]     [Fedora Linux Users]     [Linux SCTP]     [DCCP]     [Gimp]     [Yosemite Campsites]

  Powered by Linux