xen networking: add XDP offset adjustment to xen-netback
the patch basically adds the offset adjustment and netfront state reading to make XDP work on netfront side. Reviewed-by: Paul Durrant <paul@xen.org> Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
6c5aa6fc4d
commit
1c9535c701
@@ -258,6 +258,19 @@ static void xenvif_rx_next_skb(struct xenvif_queue *queue,
|
||||
pkt->extra_count++;
|
||||
}
|
||||
|
||||
if (queue->vif->xdp_headroom) {
|
||||
struct xen_netif_extra_info *extra;
|
||||
|
||||
extra = &pkt->extras[XEN_NETIF_EXTRA_TYPE_XDP - 1];
|
||||
|
||||
memset(extra, 0, sizeof(struct xen_netif_extra_info));
|
||||
extra->u.xdp.headroom = queue->vif->xdp_headroom;
|
||||
extra->type = XEN_NETIF_EXTRA_TYPE_XDP;
|
||||
extra->flags = 0;
|
||||
|
||||
pkt->extra_count++;
|
||||
}
|
||||
|
||||
if (skb->sw_hash) {
|
||||
struct xen_netif_extra_info *extra;
|
||||
|
||||
@@ -356,7 +369,7 @@ static void xenvif_rx_data_slot(struct xenvif_queue *queue,
|
||||
struct xen_netif_rx_request *req,
|
||||
struct xen_netif_rx_response *rsp)
|
||||
{
|
||||
unsigned int offset = 0;
|
||||
unsigned int offset = queue->vif->xdp_headroom;
|
||||
unsigned int flags;
|
||||
|
||||
do {
|
||||
|
Reference in New Issue
Block a user