[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <SJ1PR11MB61806B891253F57D3FED8603B8A29@SJ1PR11MB6180.namprd11.prod.outlook.com>
Date: Tue, 14 Feb 2023 06:49:27 +0000
From: "Zulkifli, Muhammad Husaini" <muhammad.husaini.zulkifli@...el.com>
To: Jakub Kicinski <kuba@...nel.org>
CC: "intel-wired-lan@...osl.org" <intel-wired-lan@...osl.org>,
"Gomes, Vinicius" <vinicius.gomes@...el.com>,
"naamax.meir@...ux.intel.com" <naamax.meir@...ux.intel.com>,
"Nguyen, Anthony L" <anthony.l.nguyen@...el.com>,
"leon@...nel.org" <leon@...nel.org>,
"davem@...emloft.net" <davem@...emloft.net>,
"pabeni@...hat.com" <pabeni@...hat.com>,
"edumazet@...gle.com" <edumazet@...gle.com>,
"tee.min.tan@...ux.intel.com" <tee.min.tan@...ux.intel.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"Neftin, Sasha" <sasha.neftin@...el.com>
Subject: RE: [PATCH net-next v3] igc: offload queue max SDU from tc-taprio
> -----Original Message-----
> From: Jakub Kicinski <kuba@...nel.org>
> Sent: Tuesday, 14 February, 2023 2:40 PM
> To: Zulkifli, Muhammad Husaini <muhammad.husaini.zulkifli@...el.com>
> Cc: intel-wired-lan@...osl.org; Gomes, Vinicius <vinicius.gomes@...el.com>;
> naamax.meir@...ux.intel.com; Nguyen, Anthony L
> <anthony.l.nguyen@...el.com>; leon@...nel.org; davem@...emloft.net;
> pabeni@...hat.com; edumazet@...gle.com; tee.min.tan@...ux.intel.com;
> netdev@...r.kernel.org; Neftin, Sasha <sasha.neftin@...el.com>
> Subject: Re: [PATCH net-next v3] igc: offload queue max SDU from tc-taprio
>
> On Tue, 14 Feb 2023 06:27:17 +0000 Zulkifli, Muhammad Husaini wrote:
> > > > + if (tx_ring->max_sdu > 0) {
> > > > + max_sdu = tx_ring->max_sdu +
> > > > + (skb_vlan_tagged(skb) ? VLAN_HLEN : 0);
> > > > +
> > > > + if (skb->len > max_sdu)
> > >
> > > You should increment some counter here. Otherwise it's a silent discard.
> >
> > I am thinking to use tx_dropped counters for this. Is it ok?
>
> Yup!
>
> > > > + goto skb_drop;
> > > > + }
> > > > +
> > > > if (!tx_ring->launchtime_enable)
> > > > goto done;
> > > >
> > > > @@ -1606,6 +1615,11 @@ static netdev_tx_t
> igc_xmit_frame_ring(struct sk_buff *skb,
> > > > dev_kfree_skb_any(first->skb);
> > >
> > > first->skb is skb, as far as I can tell, you can reshuffle this code
> > > first->to
> > > avoid adding the new return flow.
> >
> > What we try to do is to check the current max_sdu size at the
> > beginning stage of the func() and drop it quickly.
>
> I understand, what I'm saying is that the code which is already here can be
> reused, it currently operates on first->skb but it can as well use skb. And then
> you'll be able to jump to the same statement, rather than have to create a
> separate return.
Sure. Thanks
Powered by blists - more mailing lists