Hi Eric,

I love your patch! Perhaps something to improve:

[auto build test WARNING on net-next/master]

url:    
https://github.com/0day-ci/linux/commits/Eric-Dumazet/tcp-add-rx-tx-cache-to-reduce-lock-contention/20190322-215506
config: i386-randconfig-x005-201911 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   In file included from include/linux/kernel.h:11:0,
                    from include/linux/delay.h:22,
                    from drivers//w1/w1.c:15:
   include/net/sock.h: In function 'sk_eat_skb':
   include/net/sock.h:2442:31: error: 'rps_needed' undeclared (first use in 
this function); did you mean 'free_netdev'?
     if (!static_branch_unlikely(&rps_needed) && !sk->sk_rx_skb_cache) {
                                  ^
   include/linux/compiler.h:33:34: note: in definition of macro 
'__branch_check__'
       ______r = __builtin_expect(!!(x), expect); \
                                     ^
   include/linux/jump_label.h:478:35: note: in expansion of macro 'unlikely'
    #define static_branch_unlikely(x) unlikely(static_key_enabled(&(x)->key))
                                      ^~~~~~~~
   include/linux/jump_label.h:478:44: note: in expansion of macro 
'static_key_enabled'
    #define static_branch_unlikely(x) unlikely(static_key_enabled(&(x)->key))
                                               ^~~~~~~~~~~~~~~~~~
>> include/net/sock.h:2442:7: note: in expansion of macro 
>> 'static_branch_unlikely'
     if (!static_branch_unlikely(&rps_needed) && !sk->sk_rx_skb_cache) {
          ^~~~~~~~~~~~~~~~~~~~~~
   include/net/sock.h:2442:31: note: each undeclared identifier is reported 
only once for each function it appears in
     if (!static_branch_unlikely(&rps_needed) && !sk->sk_rx_skb_cache) {
                                  ^
   include/linux/compiler.h:33:34: note: in definition of macro 
'__branch_check__'
       ______r = __builtin_expect(!!(x), expect); \
                                     ^
   include/linux/jump_label.h:478:35: note: in expansion of macro 'unlikely'
    #define static_branch_unlikely(x) unlikely(static_key_enabled(&(x)->key))
                                      ^~~~~~~~
   include/linux/jump_label.h:478:44: note: in expansion of macro 
'static_key_enabled'
    #define static_branch_unlikely(x) unlikely(static_key_enabled(&(x)->key))
                                               ^~~~~~~~~~~~~~~~~~
>> include/net/sock.h:2442:7: note: in expansion of macro 
>> 'static_branch_unlikely'
     if (!static_branch_unlikely(&rps_needed) && !sk->sk_rx_skb_cache) {
          ^~~~~~~~~~~~~~~~~~~~~~

vim +/static_branch_unlikely +2442 include/net/sock.h

  2430  
  2431  /**
  2432   * sk_eat_skb - Release a skb if it is no longer needed
  2433   * @sk: socket to eat this skb from
  2434   * @skb: socket buffer to eat
  2435   *
  2436   * This routine must be called with interrupts disabled or with the 
socket
  2437   * locked so that the sk_buff queue operation is ok.
  2438  */
  2439  static inline void sk_eat_skb(struct sock *sk, struct sk_buff *skb)
  2440  {
  2441          __skb_unlink(skb, &sk->sk_receive_queue);
> 2442          if (!static_branch_unlikely(&rps_needed) && 
> !sk->sk_rx_skb_cache) {
  2443                  sk->sk_rx_skb_cache = skb;
  2444                  skb_orphan(skb);
  2445                  return;
  2446          }
  2447          __kfree_skb(skb);
  2448  }
  2449  

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip

Reply via email to