• Jakub Kicinski's avatar
    tls: rx: inline consuming the skb at the end of the loop · 465ea735
    Jakub Kicinski authored
    tls_sw_advance_skb() always consumes the skb at the end of the loop.
    
    To fall here the following must be true:
    
     !async && !is_peek && !retain_skb
       retain_skb => !zc && rxm->full_len > len
         # but non-full record implies !zc, so above can be simplified as
       retain_skb => rxm->full_len > len
    
     !async && !is_peek && !(rxm->full_len > len)
     !async && !is_peek && rxm->full_len <= len
    
    tls_sw_advance_skb() returns false if len < rxm->full_len
    which can't be true given conditions above.
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    465ea735
tls_sw.c 63.6 KB