[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH v3 02/10] net: Pad short frames to minimum size before se
From: |
Peter Maydell |
Subject: |
Re: [RFC PATCH v3 02/10] net: Pad short frames to minimum size before send from SLiRP/TAP |
Date: |
Tue, 9 Mar 2021 10:13:28 +0000 |
On Tue, 9 Mar 2021 at 09:01, Bin Meng <bmeng.cn@gmail.com> wrote:
>
> Hi Jason,
>
> On Tue, Mar 9, 2021 at 5:00 PM Bin Meng <bmeng.cn@gmail.com> wrote:
> >
> > Hi Jason,
> >
> > On Tue, Mar 9, 2021 at 4:57 PM Jason Wang <jasowang@redhat.com> wrote:
> > >
> > >
> > > On 2021/3/9 4:35 下午, Bin Meng wrote:
> > > > Hi Jason,
> > > >
> > > > On Tue, Mar 9, 2021 at 4:23 PM Jason Wang <jasowang@redhat.com> wrote:
> > > >>
> > > >> On 2021/3/8 6:22 下午, Peter Maydell wrote:
> > > >>> I think the key thing we need to do here is make a decision
> > > >>> and be clear about what we're doing. There are three options
> > > >>> I can see:
> > > >>>
> > > >>> (1) we say that the net API demands that backends pad
> > > >>> packets they emit to the minimum ethernet frame length
> > > >>> unless they specifically are intending to emit a short frame,
> > > >>> and we fix any backends that don't comply (or equivalently,
> > > >>> add support in the core code for a backend to mark itself
> > > >>> as "I don't pad; please do it for me").
> > > >>>
> > > >>> (2) we say that the networking subsystem doesn't support
> > > >>> short packets, and just have the common code always enforce
> > > >>> padding short frames to the minimum length somewhere between
> > > >>> when it receives a packet from a backend and passes it to
> > > >>> a NIC model.
> > > >>>
> > > >>> (3) we say that it's the job of the NIC models to pad
> > > >>> short frames as they see them coming in.
> > > >> I'm not sure how much value we can gain from (1). So (2) looks better
> > > >> to me.
> > > >>
> > > >> Bin or Philippe, want to send a new version?
> > > >>
> > > > I think this series does what (2) asks for. Or am I missing anything?
> > >
> > >
> > > It only did the padding for user/TAP.
> >
>
> (hit send too soon ...)
>
> Ah, so we want this:
>
> if (sender->info->type != NET_CLIENT_DRIVER_NIC)
>
> correct?
No, option (2) is "always pad short packets regardless of
sender->info->type". Even if a NIC driver sends out a short
packet, we want to pad it, because we might be feeding it to
something that assumes it does not see short packets.
thanks
-- PMM
- [RFC PATCH v3 01/10] net: Use 'struct iovec' in qemu_send_packet_async_with_flags(), (continued)
- [RFC PATCH v3 01/10] net: Use 'struct iovec' in qemu_send_packet_async_with_flags(), Philippe Mathieu-Daudé, 2021/03/03
- [RFC PATCH v3 02/10] net: Pad short frames to minimum size before send from SLiRP/TAP, Philippe Mathieu-Daudé, 2021/03/03
- Re: [RFC PATCH v3 02/10] net: Pad short frames to minimum size before send from SLiRP/TAP, Jason Wang, 2021/03/07
- Re: [RFC PATCH v3 02/10] net: Pad short frames to minimum size before send from SLiRP/TAP, Bin Meng, 2021/03/07
- Re: [RFC PATCH v3 02/10] net: Pad short frames to minimum size before send from SLiRP/TAP, Peter Maydell, 2021/03/08
- Re: [RFC PATCH v3 02/10] net: Pad short frames to minimum size before send from SLiRP/TAP, Jason Wang, 2021/03/09
- Re: [RFC PATCH v3 02/10] net: Pad short frames to minimum size before send from SLiRP/TAP, Bin Meng, 2021/03/09
- Re: [RFC PATCH v3 02/10] net: Pad short frames to minimum size before send from SLiRP/TAP, Jason Wang, 2021/03/09
- Re: [RFC PATCH v3 02/10] net: Pad short frames to minimum size before send from SLiRP/TAP, Bin Meng, 2021/03/09
- Re: [RFC PATCH v3 02/10] net: Pad short frames to minimum size before send from SLiRP/TAP, Bin Meng, 2021/03/09
- Re: [RFC PATCH v3 02/10] net: Pad short frames to minimum size before send from SLiRP/TAP,
Peter Maydell <=
- Re: [RFC PATCH v3 02/10] net: Pad short frames to minimum size before send from SLiRP/TAP, Bin Meng, 2021/03/09
- Re: [RFC PATCH v3 02/10] net: Pad short frames to minimum size before send from SLiRP/TAP, Yan Vugenfirer, 2021/03/09
- Re: [RFC PATCH v3 02/10] net: Pad short frames to minimum size before send from SLiRP/TAP, Bin Meng, 2021/03/09
- Re: [RFC PATCH v3 02/10] net: Pad short frames to minimum size before send from SLiRP/TAP, Jason Wang, 2021/03/12
- Re: [RFC PATCH v3 02/10] net: Pad short frames to minimum size before send from SLiRP/TAP, Jason Wang, 2021/03/10
- Re: [RFC PATCH v3 02/10] net: Pad short frames to minimum size before send from SLiRP/TAP, Bin Meng, 2021/03/10
- Re: [RFC PATCH v3 02/10] net: Pad short frames to minimum size before send from SLiRP/TAP, Jason Wang, 2021/03/10
- Re: [RFC PATCH v3 02/10] net: Pad short frames to minimum size before send from SLiRP/TAP, Bin Meng, 2021/03/11
- Re: [RFC PATCH v3 02/10] net: Pad short frames to minimum size before send from SLiRP/TAP, Peter Maydell, 2021/03/11
- Re: [RFC PATCH v3 02/10] net: Pad short frames to minimum size before send from SLiRP/TAP, Bin Meng, 2021/03/11