]> git.karo-electronics.de Git - linux-beck.git/commitdiff
i40e/i40evf: use __GFP_NOWARN
authorJesse Brandeburg <jesse.brandeburg@intel.com>
Thu, 14 Jan 2016 00:51:48 +0000 (16:51 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 17 Feb 2016 23:15:37 +0000 (15:15 -0800)
The i40e and i40evf drivers now cleanly handle allocation
failures and can avoid kernel log spew from the memory allocator
when allocations fail, so set __GFP_NOWARN on Rx buffer alloc.

Change-ID: Ic9e1b83c495e2a3ef6b069ba7fb6e52ce134cd23
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_txrx.c
drivers/net/ethernet/intel/i40evf/i40e_txrx.c

index 8049206206f6eeb95c03705342243842256f6047..baaf0939a9132062e70eec14043457ede5ddedb5 100644 (file)
@@ -1292,8 +1292,10 @@ bool i40e_alloc_rx_buffers_1buf(struct i40e_ring *rx_ring, u16 cleaned_count)
                skb = bi->skb;
 
                if (!skb) {
-                       skb = netdev_alloc_skb_ip_align(rx_ring->netdev,
-                                                       rx_ring->rx_buf_len);
+                       skb = __netdev_alloc_skb_ip_align(rx_ring->netdev,
+                                                         rx_ring->rx_buf_len,
+                                                         GFP_ATOMIC |
+                                                         __GFP_NOWARN);
                        if (!skb) {
                                rx_ring->rx_stats.alloc_buff_failed++;
                                goto no_buffers;
@@ -1571,8 +1573,10 @@ static int i40e_clean_rx_irq_ps(struct i40e_ring *rx_ring, const int budget)
                rx_bi = &rx_ring->rx_bi[i];
                skb = rx_bi->skb;
                if (likely(!skb)) {
-                       skb = netdev_alloc_skb_ip_align(rx_ring->netdev,
-                                                       rx_ring->rx_hdr_len);
+                       skb = __netdev_alloc_skb_ip_align(rx_ring->netdev,
+                                                         rx_ring->rx_hdr_len,
+                                                         GFP_ATOMIC |
+                                                         __GFP_NOWARN);
                        if (!skb) {
                                rx_ring->rx_stats.alloc_buff_failed++;
                                failure = true;
index 616daae95e58600590ba36d9318151683b55ad80..1dbdcf8e0710c4b923eba9294979802560f9f7e4 100644 (file)
@@ -764,8 +764,10 @@ bool i40evf_alloc_rx_buffers_1buf(struct i40e_ring *rx_ring, u16 cleaned_count)
                skb = bi->skb;
 
                if (!skb) {
-                       skb = netdev_alloc_skb_ip_align(rx_ring->netdev,
-                                                       rx_ring->rx_buf_len);
+                       skb = __netdev_alloc_skb_ip_align(rx_ring->netdev,
+                                                         rx_ring->rx_buf_len,
+                                                         GFP_ATOMIC |
+                                                         __GFP_NOWARN);
                        if (!skb) {
                                rx_ring->rx_stats.alloc_buff_failed++;
                                goto no_buffers;
@@ -1034,8 +1036,10 @@ static int i40e_clean_rx_irq_ps(struct i40e_ring *rx_ring, const int budget)
                rx_bi = &rx_ring->rx_bi[i];
                skb = rx_bi->skb;
                if (likely(!skb)) {
-                       skb = netdev_alloc_skb_ip_align(rx_ring->netdev,
-                                                       rx_ring->rx_hdr_len);
+                       skb = __netdev_alloc_skb_ip_align(rx_ring->netdev,
+                                                         rx_ring->rx_hdr_len,
+                                                         GFP_ATOMIC |
+                                                         __GFP_NOWARN);
                        if (!skb) {
                                rx_ring->rx_stats.alloc_buff_failed++;
                                failure = true;