File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -712,7 +712,8 @@ static int veth_convert_skb_to_xdp_buff(struct veth_rq *rq,
712712 u32 frame_sz ;
713713
714714 if (skb_shared (skb ) || skb_head_is_locked (skb ) ||
715- skb_shinfo (skb )-> nr_frags ) {
715+ skb_shinfo (skb )-> nr_frags ||
716+ skb_headroom (skb ) < XDP_PACKET_HEADROOM ) {
716717 u32 size , len , max_head_size , off ;
717718 struct sk_buff * nskb ;
718719 struct page * page ;
@@ -777,9 +778,6 @@ static int veth_convert_skb_to_xdp_buff(struct veth_rq *rq,
777778
778779 consume_skb (skb );
779780 skb = nskb ;
780- } else if (skb_headroom (skb ) < XDP_PACKET_HEADROOM &&
781- pskb_expand_head (skb , VETH_XDP_HEADROOM , 0 , GFP_ATOMIC )) {
782- goto drop ;
783781 }
784782
785783 /* SKB "head" area always have tailroom for skb_shared_info */
You can’t perform that action at this time.
0 commit comments