Thread (2 messages) flat view 2 messages, 2 authors, 2018-07-05

Re: [PATCH][net-next] net: limit each hash list length to MAX_GRO_SKBS

From: David Miller <davem@davemloft.net>
Date: 2018-07-05 01:04:51

From: Li RongQing <redacted>
Date: Wed,  4 Jul 2018 16:42:48 +0800
quoted hunk ↗ jump to hunk
@@ -4989,10 +4988,11 @@ static int napi_gro_complete(struct sk_buff *skb)
 	return netif_receive_skb_internal(skb);
 }
 
-static void __napi_gro_flush_chain(struct napi_struct *napi, struct list_head *head,
+static void __napi_gro_flush_chain(struct napi_struct *napi, int index,
 				   bool flush_old)
Hash is usually u32, so please lets make the type consistent.  Make index here
a 'u32' and also make 'i' in napi_gro_flush() a 'u32' too.
quoted hunk ↗ jump to hunk
@@ -5138,6 +5122,7 @@ static enum gro_result dev_gro_receive(struct napi_struct *napi, struct sk_buff
 	enum gro_result ret;
 	int same_flow;
 	int grow;
+	u32 hash = skb_get_hash_raw(skb) & (GRO_HASH_BUCKETS - 1);
Please preserve reverse christmas tree local variable ordering.

Otherwise this looks great.

Thank you.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help