DPDK patches and discussions
 help / color / mirror / Atom feed
From: Kevin Traynor <ktraynor@redhat.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>,
	Ben Magistro <koncept1@gmail.com>,
	 dev@dpdk.org, Beilei Xing <beilei.xing@intel.com>,
	Luca Boccassi <bluca@debian.org>,
	Christian Ehrhardt <christian.ehrhardt@canonical.com>,
	"Xueming(Steven) Li" <xuemingl@nvidia.com>
Cc: ben.magistro@trinitycyber.com, stefan.baranoff@trinitycyber.com,
	Qi Zhang <qi.z.zhang@intel.com>
Subject: Re: [dpdk-dev] [PATCH] driver: i40evf device initialization
Date: Thu, 26 Aug 2021 11:46:14 +0100
Message-ID: <11dd4ae3-0396-b237-7f2b-1484f07bb637@redhat.com> (raw)
In-Reply-To: <94f93212-6432-710b-1135-638e359741da@intel.com>

+ Christian and Xueming

On 26/08/2021 11:25, Ferruh Yigit wrote:
> On 8/25/2021 8:45 PM, Ben Magistro wrote:
>> The i40evf driver is not initializing the eth_dev attribute which
>> can result in a nullptr dereference. Changes were modeled after the
>> iavf_dev_init() per suggestion from the mailing list[1].
>>
>> [1] https://mails.dpdk.org/archives/dev/2021-August/217251.html
>>
>> Signed-off-by: Ben Magistro <koncept1@gmail.com>
> 
> i40evf will be removed in this release. But I guess it helps for stable releases
> to first merge the fixes and later removed it, not sure.
> 
> @Luca, @Kevin, do you prefer this patch directly to stable repos, or through the
> main repo?

I'll leave to Luca/Xueming and Christian to say if they have a
preference, but I'd guess either way is fine from stable view once it
has fixes/stable tags or LTS patch prefix (it doesn't have any of these
at present).

> i40evf won't be tested in the main anyway, since it would be removed before -rc1
> testing, so it looks like there won't be any difference from testing point of view.
> 
> 
>> ---
>>  drivers/net/i40e/i40e_ethdev_vf.c | 8 ++++++--
>>  1 file changed, 6 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
>> index 0cfe13b7b2..ccdce9a16a 100644
>> --- a/drivers/net/i40e/i40e_ethdev_vf.c
>> +++ b/drivers/net/i40e/i40e_ethdev_vf.c
>> @@ -1564,8 +1564,9 @@ i40evf_dev_alarm_handler(void *param)
>>  static int
>>  i40evf_dev_init(struct rte_eth_dev *eth_dev)
>>  {
>> -	struct i40e_hw *hw
>> -		= I40E_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);
>> +	struct i40e_adapter *adapter =
>> +		I40E_DEV_PRIVATE_TO_ADAPTER(eth_dev->data->dev_private);
>> +	struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(adapter);
>>  	struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
>>  
>>  	PMD_INIT_FUNC_TRACE();
>> @@ -1596,11 +1597,14 @@ i40evf_dev_init(struct rte_eth_dev *eth_dev)
>>  	hw->device_id = pci_dev->id.device_id;
>>  	hw->subsystem_vendor_id = pci_dev->id.subsystem_vendor_id;
>>  	hw->subsystem_device_id = pci_dev->id.subsystem_device_id;
>> +	hw->bus.bus_id = pci_dev->addr.bus;
>>  	hw->bus.device = pci_dev->addr.devid;
>>  	hw->bus.func = pci_dev->addr.function;
>>  	hw->hw_addr = (void *)pci_dev->mem_resource[0].addr;
>>  	hw->adapter_stopped = 1;
>>  	hw->adapter_closed = 0;
>> +	hw->back = I40E_DEV_PRIVATE_TO_ADAPTER(eth_dev->data->dev_private);
>> +	adapter->eth_dev = eth_dev;
>>  
>>  	if(i40evf_init_vf(eth_dev) != 0) {
>>  		PMD_INIT_LOG(ERR, "Init vf failed");
>>
> 


  reply	other threads:[~2021-08-26 10:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-25 19:45 Ben Magistro
2021-08-26 10:25 ` Ferruh Yigit
2021-08-26 10:46   ` Kevin Traynor [this message]
2021-08-27  6:28     ` Xueming(Steven) Li
2021-08-30  9:43       ` Ferruh Yigit
2021-09-02 12:37         ` Xueming(Steven) Li
2021-09-14  2:52           ` Ben Magistro
2021-10-13 13:21             ` Ben Magistro
2021-10-15 11:10               ` Xueming(Steven) Li
2021-09-28 21:23 ` [dpdk-dev] [PATCH v2, 20.11] net/i40e: fix " Ben Magistro
2021-10-12 14:17 ` [dpdk-dev] [PATCH v3] " Ben Magistro
2021-11-08 11:21   ` Xueming(Steven) Li
2021-11-08 15:54   ` [dpdk-dev] [PATCH v4] " Ben Magistro
2021-11-27 13:34     ` [dpdk-stable][20.11] " Xueming(Steven) Li

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=11dd4ae3-0396-b237-7f2b-1484f07bb637@redhat.com \
    --to=ktraynor@redhat.com \
    --cc=beilei.xing@intel.com \
    --cc=ben.magistro@trinitycyber.com \
    --cc=bluca@debian.org \
    --cc=christian.ehrhardt@canonical.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=koncept1@gmail.com \
    --cc=qi.z.zhang@intel.com \
    --cc=stefan.baranoff@trinitycyber.com \
    --cc=xuemingl@nvidia.com \
    /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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ http://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git