[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] xennet_start_xmit assumptions
On (01/20/17 14:30), David Miller wrote: > > CAP_SYS_RAWIO or not, the contract we have with the device is that > there will be at least enough bytes to cover a link layer header. I see. If that's the case (for all the kernel-driver interfaces), then the xen_netfront driver is probably not required to check for variants of sk_buffs like pure-non-linear etc. > This probably requires a little bit of an adjustment to the calling > convention. Perhaps: > > int dev_validate_header(const struct net_device *dev, > char *ll_header, int len); > > So then you can go: > > new_len = dev_validate_header(dev, skb->data, len); > if (new_len < 0) > goto out_cleanup_err; > if (new_len > len) > __skb_put(skb, new_len - len); > > Or something like that. ok let me work with that and get back (hopefully with an RFC patch). --Sowmini _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |