All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sowmini Varadhan <sowmini.varadhan@oracle.com>
To: David Miller <davem@davemloft.net>
Cc: Paul.Durrant@citrix.com, konrad.wilk@oracle.com,
	wei.liu2@citrix.com, netdev@vger.kernel.org,
	xen-devel@lists.xenproject.org
Subject: Re: [Xen-devel] xennet_start_xmit assumptions
Date: Fri, 20 Jan 2017 15:03:23 -0500	[thread overview]
Message-ID: <20170120200323.GA30186@oracle.com> (raw)
In-Reply-To: <20170120.143059.1390682983473502518.davem@davemloft.net>

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

  parent reply	other threads:[~2017-01-20 20:03 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-18 15:31 xennet_start_xmit assumptions Sowmini Varadhan
2017-01-18 19:25 ` Konrad Rzeszutek Wilk
2017-01-18 19:25 ` [Xen-devel] " Konrad Rzeszutek Wilk
2017-01-19  9:36   ` Paul Durrant
2017-01-19 11:14     ` Sowmini Varadhan
2017-01-19 11:14     ` [Xen-devel] " Sowmini Varadhan
2017-01-19 11:31       ` Paul Durrant
2017-01-19 11:37         ` [Xen-devel] " Sowmini Varadhan
2017-01-19 11:37         ` Sowmini Varadhan
2017-01-19 16:37       ` David Miller
2017-01-19 18:47         ` Sowmini Varadhan
2017-01-19 22:41           ` [Xen-devel] " Sowmini Varadhan
2017-01-20 19:30             ` David Miller
2017-01-20 20:03               ` Sowmini Varadhan
2017-01-20 20:03               ` Sowmini Varadhan [this message]
2017-01-20 19:30             ` David Miller
2017-01-19 22:41           ` Sowmini Varadhan
2017-01-25 15:06       ` Paul Durrant
2017-01-25 15:06       ` [Xen-devel] " Paul Durrant
2017-01-25 15:45         ` Sowmini Varadhan
2017-01-25 15:45         ` Sowmini Varadhan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170120200323.GA30186@oracle.com \
    --to=sowmini.varadhan@oracle.com \
    --cc=Paul.Durrant@citrix.com \
    --cc=davem@davemloft.net \
    --cc=konrad.wilk@oracle.com \
    --cc=netdev@vger.kernel.org \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.