code: func (c *cubicState) Update(packetsAcked int) {
  	if c.s.sndCwnd < c.s.sndSsthresh {
  		packetsAcked = c.updateSlowStart(packetsAcked)
  		if packetsAcked == 0 {
  			return
  		}
  	} else {
  		c.s.rtt.Lock()
  		srtt := c.s.rtt.srtt
  		c.s.rtt.Unlock()
  		c.s.sndCwnd = c.getCwnd(packetsAcked, c.s.sndCwnd, srtt)
  	}
  }
docs: // Update updates cubic's internal state variables. It must be called on every
  // ACK received.
  // Refer: https://tools.ietf.org/html/rfc8312#section-4