From: Steven Smith Subject: Re: [PATCH 2/2] Use correct config option for ixgbe VMDq Date: Thu, 12 Feb 2009 14:04:13 +0000 Message-ID: <20090212140413.GA31122@weybridge.uk.xensource.com> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1988295817==" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Mitch Williams Cc: Steven Smith , "xen-devel@lists.xensource.com" , "joserenato.santos@hp.com" List-Id: xen-devel@lists.xenproject.org --===============1988295817== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jI8keyz6grp/JLjh" Content-Disposition: inline --jI8keyz6grp/JLjh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Applied, thanks. I had to fix it up a bit to not depend on patch 1, and to compensate for word wrapping. Steven. > The correct kernel configuration for VMDq support is > CONFIG_XEN_NETDEV2_VMQ, not CONFIG_XEN_NETDEV2_BACKEND. >=20 > Signed-off-by: Mitch Williams >=20 > diff -urpN a/drivers/net/ixgbe/ixgbe.h b/drivers/net/ixgbe/ixgbe.h > --- a/drivers/net/ixgbe/ixgbe.h 2009-02-06 09:03:44.000000000 -0800 > +++ b/drivers/net/ixgbe/ixgbe.h 2009-02-10 14:32:57.000000000 -0800 > @@ -35,7 +35,7 @@ > #include > #include > #include > -#ifdef CONFIG_XEN_NETDEV2_BACKEND > +#ifdef CONFIG_XEN_NETDEV2_VMQ > #include > #endif >=20 > @@ -423,7 +423,7 @@ struct ixgbe_adapter { > unsigned int lro_flushed; > unsigned int lro_no_desc; > #endif > -#ifdef CONFIG_XEN_NETDEV2_BACKEND > +#ifdef CONFIG_XEN_NETDEV2_VMQ > struct net_vmq *vmq; > u32 rx_queues_allocated; > #endif > diff -urpN a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_mai= n.c > --- a/drivers/net/ixgbe/ixgbe_main.c 2009-02-10 14:15:53.000000000 -0800 > +++ b/drivers/net/ixgbe/ixgbe_main.c 2009-02-10 14:32:47.000000000 -0800 > @@ -431,7 +431,7 @@ static void ixgbe_receive_skb(struct ixg > bool is_vlan =3D (status & IXGBE_RXD_STAT_VP); > u16 tag =3D le16_to_cpu(rx_desc->wb.upper.vlan); >=20 > -#ifdef CONFIG_XEN_NETDEV2_BACKEND > +#ifdef CONFIG_XEN_NETDEV2_VMQ > if ((adapter->flags & IXGBE_FLAG_VMDQ_ENABLED) && ring->queue_index) { > /* This is a VMDq packet destined for a VM. */ > vmq_netif_rx(skb, ring->queue_index); > @@ -519,7 +519,7 @@ static inline void ixgbe_rx_checksum(str > skb->ip_summed =3D CHECKSUM_UNNECESSARY; > adapter->hw_csum_rx_good++; >=20 > -#ifdef CONFIG_XEN_NETDEV2_BACKEND > +#ifdef CONFIG_XEN_NETDEV2_VMQ > if (adapter->flags & IXGBE_FLAG_VMDQ_ENABLED) > skb->proto_data_valid =3D 1; > #endif > @@ -567,7 +567,7 @@ static void ixgbe_alloc_rx_buffers(struc >=20 > if (!bi->skb) { > struct sk_buff *skb; > -#ifdef CONFIG_XEN_NETDEV2_BACKEND > +#ifdef CONFIG_XEN_NETDEV2_VMQ > if ((adapter->flags & IXGBE_FLAG_VMDQ_ENABLED) && > rx_ring->queue_index) { > skb =3D vmq_alloc_skb(adapter->netdev, > @@ -604,7 +604,7 @@ static void ixgbe_alloc_rx_buffers(struc > bi->skb =3D skb; > bi->dma =3D pci_map_single(pdev, skb->data, bufsz, > PCI_DMA_FROMDEVICE); > -#ifdef CONFIG_XEN_NETDEV2_BACKEND > +#ifdef CONFIG_XEN_NETDEV2_VMQ > } > #endif > } > @@ -1056,7 +1056,7 @@ static bool ixgbe_clean_rx_irq(struct ix > cleaned =3D true; > skb =3D rx_buffer_info->skb; > rx_buffer_info->skb =3D NULL; > -#ifdef CONFIG_XEN_NETDEV2_BACKEND > +#ifdef CONFIG_XEN_NETDEV2_VMQ > if ((adapter->flags & IXGBE_FLAG_VMDQ_ENABLED) && > rx_ring->queue_index) { > /* for Xen VMDq, packet data goes in first page of > @@ -1132,7 +1132,7 @@ static bool ixgbe_clean_rx_irq(struct ix > /* probably a little skewed due to removing CRC */ > total_rx_bytes +=3D skb->len; > total_rx_packets++; > -#ifdef CONFIG_XEN_NETDEV2_BACKEND > +#ifdef CONFIG_XEN_NETDEV2_VMQ > if (skb->data) > #endif > skb->protocol =3D eth_type_trans(skb, adapter->netdev); > @@ -2276,7 +2276,7 @@ static void ixgbe_configure_rx(struct ix > adapter->rx_ring[i].head =3D IXGBE_RDH(j); > adapter->rx_ring[i].tail =3D IXGBE_RDT(j); >=20 > -#ifndef CONFIG_XEN_NETDEV2_BACKEND > +#ifndef CONFIG_XEN_NETDEV2_VMQ > if (adapter->flags & IXGBE_FLAG_VMDQ_ENABLED) { > /* Reserve VMDq set 1 for FCoE, using 3k buffers */ > if ((i & adapter->ring_feature[RING_F_VMDQ].mask) =3D=3D 1) > @@ -2288,7 +2288,7 @@ static void ixgbe_configure_rx(struct ix > } > #else > adapter->rx_ring[i].rx_buf_len =3D rx_buf_len; > -#endif /* CONFIG_XEN_NETDEV2_BACKEND */ > +#endif /* CONFIG_XEN_NETDEV2_VMQ */ >=20 > #ifndef IXGBE_NO_INET_LRO > /* Intitial LRO Settings */ > @@ -2462,7 +2462,7 @@ static void ixgbe_restore_vlan(struct ix > } >=20 > #endif > -#ifndef CONFIG_XEN_NETDEV2_BACKEND > +#ifndef CONFIG_XEN_NETDEV2_VMQ > /** > * compare_ether_oui - Compare two OUIs > * @addr1: pointer to a 6 byte array containing an Ethernet address > @@ -2491,11 +2491,11 @@ static inline int is_fcoe_ether_addr(con > static const u8 fcoe_oui[] =3D { 0x0e, 0xfc, 0x00 }; > return compare_ether_oui(addr, fcoe_oui) =3D=3D 0; > } > -#endif /* CONFIG_XEN_NETDEV2_BACKEND */ > +#endif /* CONFIG_XEN_NETDEV2_VMQ */ >=20 > static u8 *ixgbe_addr_list_itr(struct ixgbe_hw *hw, u8 **mc_addr_ptr, > u32 *vmdq) > { > -#ifndef CONFIG_XEN_NETDEV2_BACKEND > +#ifndef CONFIG_XEN_NETDEV2_VMQ > struct ixgbe_adapter *adapter =3D hw->back; > #endif > struct dev_mc_list *mc_ptr; > @@ -2507,7 +2507,7 @@ static u8 *ixgbe_addr_list_itr(struct ix > *mc_addr_ptr =3D mc_ptr->next->dmi_addr; > else > *mc_addr_ptr =3D NULL; > -#ifndef CONFIG_XEN_NETDEV2_BACKEND > +#ifndef CONFIG_XEN_NETDEV2_VMQ > if (adapter->flags & IXGBE_FLAG_VMDQ_ENABLED) { > /* VMDQ set 1 is used for FCoE */ > if (adapter->ring_feature[RING_F_VMDQ].indices) > @@ -2904,7 +2904,7 @@ static void ixgbe_clean_rx_ring(struct i >=20 > rx_buffer_info =3D &rx_ring->rx_buffer_info[i]; > if (rx_buffer_info->skb) { > -#ifdef CONFIG_XEN_NETDEV2_BACKEND > +#ifdef CONFIG_XEN_NETDEV2_VMQ > if ((adapter->flags & IXGBE_FLAG_VMDQ_ENABLED) && > rx_ring->queue_index) { > pci_unmap_page(pdev, rx_buffer_info->dma, > @@ -3870,7 +3870,7 @@ int ixgbe_setup_rx_resources(struct ixgb > rx_ring->work_limit =3D rx_ring->count / 2; > #endif >=20 > -#ifdef CONFIG_XEN_NETDEV2_BACKEND > +#ifdef CONFIG_XEN_NETDEV2_VMQ > if ((adapter->flags & IXGBE_FLAG_VMDQ_ENABLED) && > rx_ring->queue_index) { > rx_ring->active =3D 0; > @@ -3879,7 +3879,7 @@ int ixgbe_setup_rx_resources(struct ixgb > #endif > rx_ring->active =3D 1; > rx_ring->allocated =3D 1; > -#ifdef CONFIG_XEN_NETDEV2_BACKEND > +#ifdef CONFIG_XEN_NETDEV2_VMQ > } > #endif >=20 > @@ -4002,7 +4002,7 @@ static int ixgbe_setup_all_rx_resources( > DPRINTK(PROBE, ERR, "Allocation for Rx Queue %u failed\n", i); > break; > } > -#ifdef CONFIG_XEN_NETDEV2_BACKEND > +#ifdef CONFIG_XEN_NETDEV2_VMQ > adapter->rx_queues_allocated =3D 0; > #endif > return err; > @@ -4048,7 +4048,7 @@ static int ixgbe_change_mtu(struct net_d > if ((new_mtu < 68) || (max_frame > IXGBE_MAX_JUMBO_FRAME_SIZE)) > return -EINVAL; >=20 > -#ifdef CONFIG_XEN_NETDEV2_BACKEND > +#ifdef CONFIG_XEN_NETDEV2_VMQ > /* Jumbo frames not currently supported in VMDq mode under Xen */ > if ((adapter->flags & IXGBE_FLAG_VMDQ_ENABLED) && > (max_frame > ETH_FRAME_LEN)) > @@ -4960,7 +4960,7 @@ static int ixgbe_ioctl(struct net_device >=20 > #endif >=20 > -#ifdef CONFIG_XEN_NETDEV2_BACKEND > +#ifdef CONFIG_XEN_NETDEV2_VMQ > int ixgbe_get_avail_queues(struct net_device *netdev, unsigned int queue= _type) > { > struct ixgbe_adapter *adapter =3D netdev_priv(netdev); > @@ -5142,7 +5142,7 @@ static void ixgbe_setup_vmq(struct ixgbe > adapter->netdev->vmq =3D vmq; > } > } > -#endif /* CONFIG_XEN_NETDEV2_BACKEND */ > +#endif /* CONFIG_XEN_NETDEV2_VMQ */ >=20 > #ifdef CONFIG_NET_POLL_CONTROLLER > /* > @@ -5442,7 +5442,7 @@ static int __devinit ixgbe_probe(struct >=20 > #endif > strcpy(netdev->name, "eth%d"); > -#ifdef CONFIG_XEN_NETDEV2_BACKEND > +#ifdef CONFIG_XEN_NETDEV2_VMQ > if (adapter->flags & IXGBE_FLAG_VMDQ_ENABLED) > ixgbe_setup_vmq(adapter); > #endif > @@ -5450,7 +5450,7 @@ static int __devinit ixgbe_probe(struct > if (err) > goto err_register; >=20 > -#ifndef CONFIG_XEN_NETDEV2_BACKEND > +#ifndef CONFIG_XEN_NETDEV2_VMQ > if (adapter->flags & IXGBE_FLAG_VMDQ_ENABLED) > ixgbe_sysfs_create(adapter); > #endif > @@ -5563,14 +5563,14 @@ static void __devexit ixgbe_remove(struc > } >=20 > #endif > -#ifdef CONFIG_XEN_NETDEV2_BACKEND > +#ifdef CONFIG_XEN_NETDEV2_VMQ > if (netdev->vmq) { > free_vmq(netdev->vmq); > netdev->vmq =3D 0; > } > #endif >=20 > -#ifndef CONFIG_XEN_NETDEV2_BACKEND > +#ifndef CONFIG_XEN_NETDEV2_VMQ > if (adapter->flags & IXGBE_FLAG_VMDQ_ENABLED) > ixgbe_sysfs_remove(adapter); > #endif > diff -urpN a/drivers/net/ixgbe/ixgbe_param.c b/drivers/net/ixgbe/ixgbe_pa= ram.c > --- a/drivers/net/ixgbe/ixgbe_param.c 2009-02-10 14:15:35.000000000 -0800 > +++ b/drivers/net/ixgbe/ixgbe_param.c 2009-02-10 14:32:40.000000000 -0800 > @@ -723,7 +723,7 @@ void __devinit ixgbe_check_options(struc > adapter->flags |=3D IXGBE_FLAG_RX_PS_CAPABLE; > } > #endif > -#ifdef CONFIG_XEN_NETDEV2_BACKEND > +#ifdef CONFIG_XEN_NETDEV2_VMQ > if ((adapter->flags & > (IXGBE_FLAG_RX_PS_CAPABLE | IXGBE_FLAG_VMDQ_ENABLED)) =3D=3D > (IXGBE_FLAG_RX_PS_CAPABLE | IXGBE_FLAG_VMDQ_ENABLED)) { --jI8keyz6grp/JLjh Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFJlCxdvAgSWYI3DVMRAp38AJ0UuRT7NoqoeR1AVQkfnioWeo9rBACdHQkj ovOo/3jiInmgH7oO+xVmdaI= =lioH -----END PGP SIGNATURE----- --jI8keyz6grp/JLjh-- --===============1988295817== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============1988295817==--