lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20230207101951.21a114fa@canb.auug.org.au>
Date:   Tue, 7 Feb 2023 10:19:51 +1100
From:   Stephen Rothwell <sfr@...b.auug.org.au>
To:     Daniel Borkmann <daniel@...earbox.net>,
        Alexei Starovoitov <ast@...nel.org>,
        Andrii Nakryiko <andrii@...nel.org>,
        David Miller <davem@...emloft.net>
Cc:     bpf <bpf@...r.kernel.org>, Networking <netdev@...r.kernel.org>,
        Kumar Kartikeya Dwivedi <memxor@...il.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux Next Mailing List <linux-next@...r.kernel.org>,
        Lorenzo Bianconi <lorenzo@...nel.org>,
        Marek Majtyka <alardam@...il.com>,
        Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>,
        Tony Nguyen <anthony.l.nguyen@...el.com>
Subject: linux-next: manual merge of the bpf-next tree with the net-next
 tree

Hi all,

Today's linux-next merge of the bpf-next tree got a conflict in:

  drivers/net/ethernet/intel/ice/ice_main.c

between commit:

  5b246e533d01 ("ice: split probe into smaller functions")

from the net-next tree and commit:

  66c0e13ad236 ("drivers: net: turn on XDP features")

from the bpf-next tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/net/ethernet/intel/ice/ice_main.c
index 433298d0014a,074b0e6d0e2d..000000000000
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@@ -4485,116 -4619,6 +4501,118 @@@ static int ice_register_netdev(struct i
  		return -EIO;
  
  	err = register_netdev(vsi->netdev);
 +	if (err)
 +		return err;
 +
 +	set_bit(ICE_VSI_NETDEV_REGISTERED, vsi->state);
 +	netif_carrier_off(vsi->netdev);
 +	netif_tx_stop_all_queues(vsi->netdev);
 +
 +	return 0;
 +}
 +
 +static void ice_unregister_netdev(struct ice_vsi *vsi)
 +{
 +	if (!vsi || !vsi->netdev)
 +		return;
 +
 +	unregister_netdev(vsi->netdev);
 +	clear_bit(ICE_VSI_NETDEV_REGISTERED, vsi->state);
 +}
 +
 +/**
 + * ice_cfg_netdev - Allocate, configure and register a netdev
 + * @vsi: the VSI associated with the new netdev
 + *
 + * Returns 0 on success, negative value on failure
 + */
 +static int ice_cfg_netdev(struct ice_vsi *vsi)
 +{
 +	struct ice_netdev_priv *np;
 +	struct net_device *netdev;
 +	u8 mac_addr[ETH_ALEN];
 +
 +	netdev = alloc_etherdev_mqs(sizeof(*np), vsi->alloc_txq,
 +				    vsi->alloc_rxq);
 +	if (!netdev)
 +		return -ENOMEM;
 +
 +	set_bit(ICE_VSI_NETDEV_ALLOCD, vsi->state);
 +	vsi->netdev = netdev;
 +	np = netdev_priv(netdev);
 +	np->vsi = vsi;
 +
 +	ice_set_netdev_features(netdev);
++	netdev->xdp_features = NETDEV_XDP_ACT_BASIC | NETDEV_XDP_ACT_REDIRECT |
++			       NETDEV_XDP_ACT_XSK_ZEROCOPY;
 +	ice_set_ops(netdev);
 +
 +	if (vsi->type == ICE_VSI_PF) {
 +		SET_NETDEV_DEV(netdev, ice_pf_to_dev(vsi->back));
 +		ether_addr_copy(mac_addr, vsi->port_info->mac.perm_addr);
 +		eth_hw_addr_set(netdev, mac_addr);
 +	}
 +
 +	netdev->priv_flags |= IFF_UNICAST_FLT;
 +
 +	/* Setup netdev TC information */
 +	ice_vsi_cfg_netdev_tc(vsi, vsi->tc_cfg.ena_tc);
 +
 +	netdev->max_mtu = ICE_MAX_MTU;
 +
 +	return 0;
 +}
 +
 +static void ice_decfg_netdev(struct ice_vsi *vsi)
 +{
 +	clear_bit(ICE_VSI_NETDEV_ALLOCD, vsi->state);
 +	free_netdev(vsi->netdev);
 +	vsi->netdev = NULL;
 +}
 +
 +static int ice_start_eth(struct ice_vsi *vsi)
 +{
 +	int err;
 +
 +	err = ice_init_mac_fltr(vsi->back);
 +	if (err)
 +		return err;
 +
 +	rtnl_lock();
 +	err = ice_vsi_open(vsi);
 +	rtnl_unlock();
 +
 +	return err;
 +}
 +
 +static int ice_init_eth(struct ice_pf *pf)
 +{
 +	struct ice_vsi *vsi = ice_get_main_vsi(pf);
 +	int err;
 +
 +	if (!vsi)
 +		return -EINVAL;
 +
 +	/* init channel list */
 +	INIT_LIST_HEAD(&vsi->ch_list);
 +
 +	err = ice_cfg_netdev(vsi);
 +	if (err)
 +		return err;
 +	/* Setup DCB netlink interface */
 +	ice_dcbnl_setup(vsi);
 +
 +	err = ice_init_mac_fltr(pf);
 +	if (err)
 +		goto err_init_mac_fltr;
 +
 +	err = ice_devlink_create_pf_port(pf);
 +	if (err)
 +		goto err_devlink_create_pf_port;
 +
 +	SET_NETDEV_DEVLINK_PORT(vsi->netdev, &pf->devlink_port);
 +
 +	err = ice_register_netdev(vsi);
  	if (err)
  		goto err_register_netdev;
  

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ