Netgear Aircard 341U in QMI mode, switching to 802.3

David McCullough david.mccullough at accelecon.com
Tue Jun 9 23:21:22 PDT 2015


Markus Gothe wrote the following:
> I might be wrong on this but wouldnt it make sense to kfree(skb); before changing the memory area pointed to???


I don't believe so,  further down in the code it checks for skb2 to determine
how to inform the upper layers of what to do with the old skb and deal with
the new skb.  The caller retains a reference to the old skb so we cannot
free it,

Cheers,
Davidm


> Den 9 jun 2015 09:42 skrev Bjørn Mork <bjorn at mork.no>:
> >
> > David McCullough <david.mccullough at accelecon.com> writes:
> >
> > > + if (skb_headroom(skb) < ETH_HLEN) {
> > > + skb2 = skb_copy_expand(skb, ETH_HLEN, 0, GFP_ATOMIC);
> > > + if (!skb2) {
> > > + dev->net->stats.rx_errors++;
> > > + return 0;
> > > + }
> > > + skb = skb2;
> > > + }
> >
> > Do you ever hit this?  Yes, I know we are not supposed to depend on the
> > built-in headroom, but NET_SKB_PAD is at least 32 bytes regardless of
> > platform AFAICS so this if test should never be true?
> >
> > But I suppose you had your reasons to add this.  In any case, I think we
> > should rather allocate the necessary headroom in the fist place if we
> > are going support raw-ip.  The rx_fixup header addition was really meant
> > to be an exceptional case, and not the modus operandi.  That's why I
> > found it acceptable to depend on the built-in headroom.
> >
> > > + dev->net->mtu = 1460;
> >
> > I noticed this recent discussion with interest:
> > https://forum.sierrawireless.com/viewtopic.php?f=117&t=8771&sid=e4a234dd9b4f3864b46973127a705273#p35800
> >
> > If we get the correct MTU from QMI, then we (that is userspace. as
> > that's where we do QMI) should probably configure the netdev
> > accordingly.
> >
> > > + /* Sprint 341u modem in pass through and non-pass-through modes */
> > > + {QMI_RAWIP_FIXED_INTF(0x1199,0x9057,8)},/* ippassthrough */
> > > + {QMI_RAWIP_FIXED_INTF(0x1199,0x9055,8)},/* non-passthrough */
> >
> > Right.  So that's the answer to the question about 9057 vs 9055, I
> > guess.  Ah, I see you're already on that.
> >
> > Bjørn
> > _______________________________________________
> > libqmi-devel mailing list
> > libqmi-devel at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/libqmi-devel
> _______________________________________________
> libqmi-devel mailing list
> libqmi-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libqmi-devel

-- 
David McCullough,  david.mccullough at accelecon.com,   Ph: 0410 560 763


More information about the libqmi-devel mailing list