In most of Afghanistan, the Taliban and drug gangs are non-existent or a minor presence, because the locals (tribal or government) have the power to handle whatever armed force the enemy can muster there. But most of the drugs are produced in two southern provinces (Kandahar and Helmand), and that's where the Taliban (and drug gangs) are strongest. In the rest of southern Afghanistan, the Taliban sustain themselves with bases across the border in Pakistan. While the Pakistani Army has shut down some of these bases in the last year, there are still many of these in North Waziristan (opposite southeastern Afghanistan) and Baluchistan (opposite southern Afghanistan, especially Helmand and Kandahar). Western diplomatic pressure on Pakistan is all about getting these terrorist sanctuaries shut down.
This Pakistani protection provides a floor that prevents them from being knocked down too far by our efforts. I've long lamented the fact that Pakistan is not wholly on our side in the war in Afghanistan and that this limits what we can do on our side of the border. Mind you, it is better to have their imperfect help than to have them fully on the other side. But this is a problem.
I've said it before and I'll say it again, knocking out the mullah regime in Iran and replacing it with a friendly government would cut the Gordian Knot in this problem (and others, for that matter). By allowing us to resupply Afghanistan through Iran (and other routes to the north) rather than through Pakistan, we eliminate one of the brakes on our pressure applied to Pakistan to crack down on elements within Pakistan that support jihadis.
Mind you, Pakistan's stability given their arsenal of nukes is still a brake on our pressure, but we could press Pakistan more when they don't have an effective hold on our supply lines to Afghanistan.