Re: [PATCH RFC 1/3] vsock: support sockmap

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jan 21, 2023 at 11:22:31AM -0800, Cong Wang wrote:
> On Wed, Jan 18, 2023 at 12:27:39PM -0800, Bobby Eshleman wrote:
> > +static int vsock_read_skb(struct sock *sk, skb_read_actor_t read_actor)
> > +{
> > +	struct vsock_sock *vsk = vsock_sk(sk);
> > +
> > +	if (!vsk->transport)
> > +		return -ENODEV;
> > +
> > +	if (!vsk->transport->read_skb)
> > +		return -EOPNOTSUPP;
> 
> Can we move these two checks to sockmap update path? It would make
> vsock_read_skb() faster.
> 
> > +
> > +	return vsk->transport->read_skb(vsk, read_actor);
> > +}
> 
> Essentially can be just this one line.
> 
> Thanks.

That makes sense, will do.

Thanks,
Bobby



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux