Re: [RFC 12/19] RDMA/irdma: Implement device supported verb APIs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 12, 2019 at 03:27:07PM -0700, Jason Gunthorpe wrote:
> On Tue, Feb 12, 2019 at 03:43:55PM -0600, Shiraz Saleem wrote:
> 
> > +/**
> > + * irdma_disassociate_ucontext - Disassociate user context
> > + * @context: ib user context
> > + */
> > +static void irdma_disassociate_ucontext(struct ib_ucontext *context)
> > +{
> > +	struct irdma_ucontext *ucontext = to_ucontext(context);
> > +
> > +	struct irdma_vma_data *vma_data, *n;
> > +	struct vm_area_struct *vma;
> > +
> > +	irdma_dev_info(&ucontext->iwdev->rf->sc_dev, "called\n");
> > +	mutex_lock(&ucontext->vma_list_mutex);
> > +	list_for_each_entry_safe(vma_data, n, &ucontext->vma_list, list) {
> > +		vma = vma_data->vma;
> > +		zap_vma_ptes(vma, vma->vm_start, PAGE_SIZE);
> > +
> > +		vma->vm_flags &= ~(VM_SHARED | VM_MAYSHARE);
> > +		vma->vm_ops = NULL;
> > +		list_del(&vma_data->list);
> > +		kfree(vma_data);
> > +	}
> > +	mutex_unlock(&ucontext->vma_list_mutex);
> > +}
> 
> You need to study all the changes that have been done in the core code
> and make sure this driver is using all the latest stuff, I do not want
> to review a driver and find it is full of obsolete APIs like this
> above.
> 

I submitted a revised version addressing this problem. There were a few changes.
*updated disassociate_ucontext API
*updated alloc/dealloc PD APIs
*query ports via core
*remove MODULE_VER
*remove create_single_threaded_workqueue
*remove list_empty checks in irdma_dealloc_ucontext
*change all uapi headers to use __aligned_u64

Shiraz




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux